function showImage(imageType, imgStr) {
	sWidth = screen.availWidth;
	sHeight = screen.availHeight;
	
	sTop = (sHeight - 200) / 2;
	sLeft = (sWidth - 200) / 2;
	
	if(imageType == "icon"){
		imgwidth = 200;
		imgheight = 150;
	}
	else{
		imgwidth = 400;
		imgheight = 300;
	}
	
	window.open("admin/uploadedfiles/products/" + imgStr, "productimages", "width=" + imgwidth + ",height=" + imgheight + ",top=" + sTop + ",left=" + sLeft + ",toolbar=0,menubar=0,status=0,scrollbars=0,resizable=0");
	return;
}

function archivedNewsLetterDetails(ID)
	{
		window.location.href= "viewNewsLetter.asp?news_id=" + ID ;

	}
function checkFeedBack(){
		yourname = trimSpaces(document.feedbackFrm.yourname.value);
		if(yourname.length <= 0){
			alert("Please enter your name.");
			document.feedbackFrm.yourname.focus();
			return false;
		}
		
		address = trimSpaces(document.feedbackFrm.address.value);
		if(address.length <= 0){
			alert("Please enter your address.");
			document.feedbackFrm.address.focus();
			return false;
		}
		
		email = trimSpaces(document.feedbackFrm.email.value);
		if(email.length <= 0){
			alert("Please enter your email ID.");
			document.feedbackFrm.email.focus();
			return false;
		}
		if(!checkEmail(email)){
			document.feedbackFrm.email.focus();
			return false;
		}
		
		comments = trimSpaces(document.feedbackFrm.comments.value);
		if(comments.length <= 0){
			alert("Please enter your comments/suggestions.");
			document.feedbackFrm.comments.focus();
			return false;
		}
		
	}
	
function checkEnquiry()
{
	custName = trimSpaces(document.forms[0].custName.value);
	if(custName.length<=0)
		{
			alert("Enter your name");
			document.forms[0].custName.focus();
			return false;
			
		}
	email = trimSpaces(document.forms[0].email.value);
	if(email.length<=0)
		{
			alert("Enter the email address");
			document.forms[0].email.focus();
			return false;
			
		}
	else if(! checkEmail(email))
		{
			document.forms[0].email.focus();
			return false;
		}	
	custComments = trimSpaces(document.forms[0].custComments.value);
	if(custComments.length<=0)
		{
			alert("Enter your comments");
			document.forms[0].custComments.focus();
			return false;
			
		}
	document.forms[0].frmAction.value="yes";	
	return true;	
}

function checkTellAFriend(){
		yourname = trimSpaces(document.TellFriendFrm.yourname.value);
		if(yourname.length <= 0){
			alert("Please enter your name.");
			document.TellFriendFrm.yourname.focus();
			return false;
		}
		
		youremail = trimSpaces(document.TellFriendFrm.youremail.value);
		if(youremail.length <= 0){
			alert("Please enter your email ID.");
			document.TellFriendFrm.youremail.focus();
			return false;
		}		
		
		if(!checkEmail(youremail)){
			document.TellFriendFrm.youremail.focus();
			return false;
		}
		
		friendname = trimSpaces(document.TellFriendFrm.friendname.value);
		if(friendname.length <= 0){
			alert("Please enter your friend's name.");
			document.TellFriendFrm.friendname.focus();
			return false;
		}
		
		friendemail = trimSpaces(document.TellFriendFrm.friendemail.value);
		if(friendemail.length <= 0){
			alert("Please enter your friend's email ID.");
			document.TellFriendFrm.friendemail.focus();
			return false;
		}		
		
		if(!checkEmail(friendemail)){
			document.TellFriendFrm.friendemail.focus();
			return false;
		}		

		
	}

function announcementDetails(ID)
	{
	
	pageUrl="viewAnnouncementDetails.asp?announcement_id=" + ID
	window.location.href = pageUrl

	}

function postFaq()
 {
	faqQuestion = trimSpaces(document.forms[0].faqQuestion.value);
	if(faqQuestion.length <= 0)
	 {
		alert("Please enter the question");
		document.forms[0].faqQuestion.focus();
		return false;
	 }
	 
	 faqEmail = trimSpaces(document.forms[0].faqEmail.value);
 if(faqEmail.length<=0)
	{
		alert("Enter the email address");
		document.forms[0].faqEmail.focus();
		return false;
	}
	if(faqEmail.length > 0)
	 {
		if(! checkEmail(faqEmail))
			{
				document.forms[0].faqEmail.focus();
				return false;
			}
	 }

	
	document.forms[0].frmAction.value = "yes";
}	

function newsDetails(ID)
	{
	
	pageUrl="newsDetails.asp?news_id=" + ID
	window.location.href = pageUrl

	}