
 function clearTip(field)
	{
		if(field.defaultValue == field.value)
		field.value = "";
	}

	function writeTip(field)
	{
		if(field.value == "")
			field.value = field.defaultValue;
	}
	
	/* Forgot Password */
	function checkforgot()
	{	
		if (document.fpass.txtemail.value=="")
		{
			alert("Please enter the email address");
			document.fpass.txtemail.focus();
			return false;
		}
		else
		{	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
			var matchArray = fpass.txtemail.value.match(emailPat);
			if (matchArray == null)
			{
				strd = "Please enter the valid email address";
				alert (strd);
				document.fpass.txtemail.focus();
				return false;
			}					
		}
		return true;
	}
	
	/* New User Registration */
	function fillship()
	{
		if (document.Form1.sameinfo.checked==true)
		{
			document.Form1.txt_shipname.value=document.Form1.txtFirstName.value;
			document.Form1.txt_shiplname.value=document.Form1.txtLastName.value;
			document.Form1.txt_shipaddress.value=document.Form1.txtAddress1.value;
			document.Form1.txt_shipcity.value=document.Form1.txtTown.value;
			document.Form1.shippostcode.value=document.Form1.txtPostalCode.value;
			document.Form1.db_shipcountry.value=document.Form1.cmbcountry.value;
		}
		else
		{
			document.Form1.txt_shipname.value="";
			document.Form1.txt_shiplname.value="";
			document.Form1.txt_shipaddress.value="";
			document.Form1.txt_shipcity.value="";
			document.Form1.shippostcode.value="";
			document.Form1.db_shipcountry.SelectedValue=":: Select Country ::";
		}
		
	}
	function fillbill()
	{
		if (document.Form1.bsameinfo.checked==true)
		{
			document.Form1.bfname.value=document.Form1.txtFirstName.value;
			document.Form1.blname.value=document.Form1.txtLastName.value;
			document.Form1.badd.value=document.Form1.txtAddress1.value;
			document.Form1.bcity.value=document.Form1.txtTown.value;
			document.Form1.bpost.value=document.Form1.txtPostalCode.value;
			document.Form1.db_bcountry.value=document.Form1.cmbcountry.value;
		}
		else
		{
			document.Form1.bfname.value="";
			document.Form1.blname.value="";
			document.Form1.badd.value="";
			document.Form1.bcity.value="";
			document.Form1.bpost.value="";
			document.Form1.db_bcountry.value=":: Select Country ::";
		}
	}
	function validation()
	{	
		var strd;
		if (document.Form1.txtUsername.value == "")
		{
			strd = "Please enter the username";
			alert(strd);
			document.Form1.txtUsername.focus();
			return false;
		}
		if (document.Form1.txtPassword.value == "")
		{
			strd = "Please enter the password";
			alert(strd);
			document.Form1.txtPassword.focus();
			return false;
		}
		if (document.Form1.txtFirstName.value == "")
		{
			strd = "Please enter the first name";
			alert(strd);
			document.Form1.txtFirstName.focus();
			return false;
		}
		if (document.Form1.txtLastName.value == "")
		{
			strd = "Please enter the last name";
			alert(strd);
			document.Form1.txtLastName.focus();
			return false;
		}
		
		if (document.Form1.txtEmail.value == "")
		{
			strd = "Please enter the email address";
			alert(strd);
			document.Form1.txtEmail.focus();
			return false;
		}
		else
		{	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
			var matchArray = Form1.txtEmail.value.match(emailPat);
			if (matchArray == null)
			{
				strd = "Please enter the valid email address";
				alert (strd);
				document.Form1.txtEmail.focus();
				return false;
			}					
		}
		if (document.Form1.txtphone.value == "")
		{	
			strd = "Please enter the phone number";
			alert(strd);
			document.Form1.txtphone.focus();
			return false;
		}
		if (document.Form1.txtAddress1.value=="")
		{
			strd= "Please enter the address1";
			alert(strd);
			document.Form1.txtAddress1.focus();
			return false;
		}
		if (document.Form1.txtTown.value=="")
		{
			strd= "Please enter the city";
			alert(strd);
			document.Form1.txtTown.focus();
			return false;
		}
		if (document.Form1.txtPostalCode.value == "")
		{
			strd = "Please enter the postal code";
			alert(strd);
			document.Form1.txtPostalCode.focus();
			return false;
		}
		if (document.Form1.cmbcountry.value == ":: Select Country ::")
		{
			strd = "Please select the country";
			alert(strd);
			document.Form1.cmbcountry.focus();
			return false;
		}
		if (document.Form1.txt_shipname.value == "")
		{
			strd = "Please select the shipping first name";
			alert(strd);
			document.Form1.txt_shipname.focus();
			return false;
		}
		if (document.Form1.txt_shiplname.value == "")
		{
			strd = "Please select the shipping last name";
			alert(strd);
			document.Form1.txt_shiplname.focus();
			return false;
		}
		if (document.Form1.txt_shipaddress.value == "")
		{
			strd = "Please select the shipping address";
			alert(strd);
			document.Form1.txt_shipaddress.focus();
			return false;
		}
		if (document.Form1.txt_shipcity.value == "")
		{
			strd = "Please select the shipping city";
			alert(strd);
			document.Form1.txt_shipcity.focus();
			return false;
		}
		if (document.Form1.shippostcode.value == "")
		{
			strd = "Please select the shipping postal code";
			alert(strd);
			document.Form1.shippostcode.focus();
			return false;
		}
		if (document.Form1.db_shipcountry.value == ":: Select Country ::")
		{
			strd = "Please select the shipping country";
			alert(strd);
			document.Form1.db_shipcountry.focus();
			return false;
		}
		if (document.Form1.bfname.value == "")
		{
			strd = "Please enter the billing first name";
			alert(strd);
			document.Form1.bfname.focus();
			return false;
		}
		if (document.Form1.blname.value == "")
		{
			strd = "Please enter the billing last name";
			alert(strd);
			document.Form1.blname.focus();
			return false;
		}
		if (document.Form1.badd.value == "")
		{
			strd = "Please enter the billing address";
			alert(strd);
			document.Form1.badd.focus();
			return false;
		}
		if (document.Form1.bcity.value == "")
		{
			strd = "Please enter the billing city";
			alert(strd);
			document.Form1.bcity.focus();
			return false;
		}
		if (document.Form1.bpost.value == "")
		{
			strd = "Please enter the billing post code";
			alert(strd);
			document.Form1.bpost.focus();
			return false;
		}
		if (document.Form1.db_bcountry.value == ":: Select Country ::")
		{
			strd = "Please select the billing country";
			alert(strd);
			document.Form1.db_bcountry.focus();
			return false;
		}
	}
	function noChars(e)
	{	
		var keynum
		var keychar
		var numcheck

		if(window.event) // IE
			{
			keynum = e.keyCode
			}
		else if(e.which) // Netscape/Firefox/Opera
			{
			keynum = e.which
			}
		keychar = String.fromCharCode(keynum)
		numcheck = /\d/
		return numcheck.test(keychar)
	}
	
	/* User Login validation */
	function validlogin()
	{
		if (document.frmcustomerLogin.username.value=="")
		{
			alert("Please enter the username");
			document.frmcustomerLogin.username.focus();
			return false;
		}
		if (document.frmcustomerLogin.password.value=="")
		{
			alert("Please enter the password");
			document.frmcustomerLogin.password.focus();
			return false;
		}
		return true;
	}
	
	/* Quantity Value Validation */
	function validprod()
		{
			if(document.addtobasket.h_pricevalue.value == "M")
			{
				
				if(document.addtobasket.qty.value == "")
				{
					alert ("Please Enter a Valid Numeric Quantity.");
					document.addtobasket.qty.focus();
					return false;
				}
				else if(document.addtobasket.qty.value == 0 || document.addtobasket.qty.value < 1000)
				{
					alert ("Minimum quantity is atleast 1000");
					document.addtobasket.qty.focus();
					return false;
				}
				else if(parseInt(document.addtobasket.qty.value) >99999)
				{
					alert ("Please Enter a Valid Numeric Quantity Less Than 99999");
					document.addtobasket.qty.focus();
					return false;
				}
				else
				{
					var result = true;
					charset="1234567890";
					str=document.addtobasket.qty.value;
					for (var i=0;i<str.length;i++) 
					{
						if (charset.indexOf(str.substr(i,1))<0)
						{
							result = false;
							break;
						}
					}
					if(result==false) 
					{
					document.addtobasket.qty.value="";
					alert ("Please enter a valid Numeric Quantity.");
					document.addtobasket.qty.focus();
					return false;
					}
				}
			}
			else
			{
				if(document.addtobasket.qty.value == "")
				{
					alert ("Please Enter a Valid Numeric Quantity.");
					document.addtobasket.qty.focus();
					return false;
				}
				else if(document.addtobasket.qty.value == 0)
				{
					alert ("Please Enter a Valid Numeric Quantity More Than 0");
					document.addtobasket.qty.focus();
					return false;
				}
				else if(parseInt(document.addtobasket.qty.value) >99999)
				{
					alert ("Please Enter a Valid Numeric Quantity Less Than 99999");
					document.addtobasket.qty.focus();
					return false;
				}
				else
				{
					var result = true;
					charset="1234567890";
					str=document.addtobasket.qty.value;
					for (var i=0;i<str.length;i++) 
					{
						if (charset.indexOf(str.substr(i,1))<0)
						{
							result = false;
							break;
						}
					}
					if(result==false) 
					{
					document.addtobasket.qty.value="";
					alert ("Please enter a valid Numeric Quantity.");
					document.addtobasket.qty.focus();
					return false;
					}
				}
			}
		}	
			
	/* Quantity Value Validation On Basket Page */
	function validbasket()
		{
			var totrec=document.basket.qty.length;
			
			if (totrec>=2)
			{
			
				for(var j=0;j<totrec;j++)
				{
					
					if(document.basket.qty[j].value=="")
					{
						alert ("Please Enter a Valid Numeric Quantity.");
						document.basket.qty[j].focus();
						return false;
					}
					else if((document.basket.qty[j].value<=999)&&(document.basket.mea[j].value=="M"))
					{
						alert ("Minimum quantity is atleast 1000.");
						document.basket.qty[j].focus();
						return false;
					}
					else if((document.basket.qty[j].value>99999)&&(document.basket.mea[j].value=="M"))
					{
						alert ("Please Enter a Valid Numeric Quantity Less Than 99999");
						document.basket.qty[j].focus();
						return false;
					}					
					else if((document.basket.qty[j].value<=0)&&(document.basket.mea[j].value=="EA"))
					{
						alert ("Please Enter a Valid Numeric Quantity More Than 0.");
						document.basket.qty[j].focus();
						return false;
					}
					else if((parseInt(document.basket.qty[j].value)>99999)&&(document.basket.mea[j].value=="EA"))
					{
						alert ("Please Enter a Valid Numeric Quantity Less Than 99999");
						//document.addtobasket.qty.focus();
						document.basket.qty[j].focus();
						return false;
					}
					else
					{
						var result = true;
						charset="1234567890";
						str=document.basket.qty[j].value;
						for (var i=0;i<str.length;i++) 
						{
							if (charset.indexOf(str.substr(i,1))<0)
							{
								result = false;
								break;
							}
						}
						if(result==false) 
						{
						document.basket.qty[j].value="";
						alert ("Please enter a valid Numeric Quantity.");
						document.basket.qty[j].focus();
						return false;
						}
					}
				}
			
			}
			else
			{
				if(document.basket.qty.value=="")
				{
					alert ("Please Enter a Valid Numeric Quantity.");
					document.basket.qty.focus();
					return false;
				}
				else if((document.basket.qty.value<=999)&&(document.basket.mea.value=="M"))
				{
					alert ("Minimum quantity is atleast 1000.");
					document.basket.qty.focus();
					return false;
				}
				else if((document.basket.qty.value<=0)&&(document.basket.mea.value=="M"))
				{
					alert ("Please Enter a Valid Numeric Quantity More Than 0.");
					document.basket.qty.focus();
					return false;
				}
				else if((parseInt(document.basket.qty.value)>99999)&&(document.basket.mea.value=="M"))
				{
					alert ("Please Enter a Valid Numeric Quantity Less Than 99999");
					//document.addtobasket.qty.focus();
					document.basket.qty.focus();
					return false;
				}
				else
				{
					var result = true;
					charset="1234567890";
					str=document.basket.qty.value;
					for (var i=0;i<str.length;i++) 
					{
						if (charset.indexOf(str.substr(i,1))<0)
						{
							result = false;
							break;
						}
					}
					if(result==false) 
					{
					document.basket.qty.value="";
					alert ("Please enter a valid Numeric Quantity.");
					document.basket.qty.focus();
					return false;
					}
				}
			}
		}
		
	
	/* Quantity Value Validation On Product and Special page */
	function validqty(objfrm,objqty)
	{  
		var qty=document[objfrm][objqty].value;
		if(qty=="")
		{
			alert("Please Enter Numeric Quantity");
			document[objfrm][objqty].focus();
			return false;
		}
		else if(document[objfrm][objqty].value==0)
		{
			alert ("Please Enter a Valid Numeric Quantity More Than 0.");
			document[objfrm][objqty].focus();
			return false;
		}
		else
		{
			var result = true;
			charset="1234567890";
			str=document[objfrm][objqty].value;
			for (var i=0;i<str.length;i++) 
			{
				if (charset.indexOf(str.substr(i,1))<0)
				{
					result = false;
					break;
				}
			}
			if(result==false) 
			{
			document[objfrm][objqty].value="";
			alert ("Please enter a valid Numeric Quantity.");
			document[objfrm][objqty].focus();
			return false;
			}
		}
	
	}
	
	/* Search Validation */
	function validationsearch()
	{
		var str;
		if(document.frmSearch.m_txtSearch.value == " search here..." || document.frmSearch.m_txtSearch.value == "")
		{
			str= document.frmSearch.m_txtSearch.value;
			alert("Please enter search item");
			document.frmSearch.m_txtSearch.focus();
			return false
		}
		return true;
	}		
	
	/* User Validation */
	function UserValidation()
	{
	if(document.frmmyaccount.txtusername.value == "")
	{
		alert("Please enter User Name");
		document.frmmyaccount.txtusername.focus();
		return false;
	}
	if(document.frmmyaccount.txtpassword.value == "")
	{
		alert("Please enter Password");
		document.frmmyaccount.txtpassword.focus();
		return false;
	}
	return true;
	}
	
	/* FAQ Validation */
	function validatefaq()
	{
		if (document.frmFaq.search1.value == "Enter search item" || document.frmFaq.search1.value == "")
		{
			alert("Enter text for search");
			document.frmFaq.search1.focus();
			return false;
		}
		frmFaq.action="faqdetails.aspx?flag=2&search="+document.frmFaq.search1.value;
		return true;
	}

	/* ContactUs page Validation */
	function ValidateContactUs()
	{
 		var ErrMsg="";
		var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
		var matchArray = Form1.Contactus2_txtEmail.value.match(emailPat);
		var ErrorDisp = "You are missing following entries.\n";
		ErrorDisp += "----------------------------------------\n";
		
		if((document.Form1.Contactus2_txtFname.value=="") || (document.Form1.Contactus2_txtFname.value=="Enter First Name"))
		{
			alert("First name required\n");
			document.Form1.Contactus2_txtFname.focus();
			return false;
		}
		
		if(document.Form1.Contactus2_txtFname.value.charAt(0)==' ')
		{    alert("First name required"); 
			document.Form1.Contactus2_txtFname.focus();
			return false;
		}
		
		if(document.Form1.Contactus2_txtEmail.value==""||document.Form1.Contactus2_txtEmail.value=="Enter your Email")
		{
			alert("Email required");		
			document.Form1.Contactus2_txtEmail.focus();
			return false;
		}
		else if (matchArray == null)
		{
			alert("Invalid Email format");
			document.Form1.Contactus2_txtEmail.focus();
			return false;
		}
		
		if(document.Form1.Contactus2_txtComments.value==""||document.Form1.Contactus2_txtComments.value=="Enter your comments here")
		{
			alert("Comments required");
			document.Form1.Contactus2_txtComments.focus();
			return false;		
		}
		
		if(document.Form1.Contactus2_txtComments.value.charAt(0)==' ')
		{  
			alert("No spaces allowed.");
			document.Form1.Contactus2_txtComments.focus();
			return false;
		}
		if(document.Form1.Contactus2_txtComments.value.length > 250)
		{
				alert("Please enter only 250 characters");
				document.Form1.Contactus2_txtComments.focus();
				return false; 
		}
		 
		if((document.Form1.Contactus2_CodeNumberTextBox.value=="") || (document.Form1.Contactus2_CodeNumberTextBox.value=="Enter Code"))
		{
			alert("Verification code required");
			document.Form1.Contactus2_CodeNumberTextBox.focus();
			return false;
		}
	
	/*if(document.Form1.Contactus2_ddlCountry.selectedIndex==".::Please Select::.")
	{
		ErrMsg += "Country required\n";
	}*/
	
	if (ErrMsg=="")
	{
		return true;
	}
	else
	{	
		alert(ErrorDisp+ErrMsg);
		return false;
	}
}

/* FaqDetails page Validation */
	function ValidateFaqDetails()
	{
		var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
		var matchArray = Form1.TextBox2.value.match(emailPat);
		if(document.Form1.TextBox2.value=="")
		{
			alert("Email required");
			document.Form1.TextBox2.focus();
			return false;
		}
		else if (matchArray == null)
		{
			alert("Invalid Email format");
			document.Form1.TextBox2.focus();
			return false;
		}
		if(document.Form1.txtArea.value=="")
		{
			alert("Question required");
			document.Form1.txtArea.focus();
			return false;
		}
		return true;
	}

function ValidateProfile()
{
	
 	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form2.Profile1_txtEmail.value.match(emailPat);
	if(document.Form2.Profile1_txtFName.value=="")
	{  
		alert("First name required");
		document.Form2.Profile1_txtFName.focus();
		return false;
	}
	if(document.Form2.Profile1_txtFName.value.charAt(0)==' ')
	{   alert("No spaces allowed.\n");
		document.Form2.Profile1_txtFName.focus();
		return false;
	}
	if(document.Form2.Profile1_txtUserName.value=="")
	{
		alert("User name required");
		document.Form2.Profile1_txtUserName.focus();
		return false;
	}
	if(document.Form2.Profile1_txtUserName.value.charAt(0)==' ')
	{   alert("No spaces allowed.\n");
		document.Form2.Profile1_txtUserName.focus();
		return false; 
    }
	if(document.Form2.Profile1_txtPassword.value=="")
	{
		alert("Password required");
		document.Form2.Profile1_txtPassword.focus();
		return false;
	}
	if(document.Form2.Profile1_txtPassword.value.charAt(0)==' ')
	{    alert("No spaces allowed.\n"); 
		document.Form2.Profile1_txtPassword.focus();
		return false;
	 }
	if(document.Form2.Profile1_txtEmail.value=="")
	{
		alert("Email required");
		document.Form2.Profile1_txtEmail.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.Form2.Profile1_txtEmail.focus();
		return false;
	}
	
	if(document.Form2.Profile1_ddlCountry.value==".::Please Select::.")
	{
		alert("Country required");
		return false;
	}
	
	if(document.Form2.Profile1_txtAns.value=="")
	{
		alert("Answer required");
		document.Form2.Profile1_txtAns.focus();
		return false;
	}
	if(document.Form2.Profile1_txtAns.value.charAt(0)==' ')
	{    alert("No spaces allowed.\n");
	document.Form2.Profile1_txtAns.focus(); 
	return false;
	 }
	return true;
	}
	
function loopy() {
		loc = window.location.href
		sPos =loc.lastIndexOf("/")+1;
		if (sPos != -1) loc = loc.substring(0,sPos); // loose existing search
		window.location = loc+'logout.aspx';
	}

function popup(url)
{
	width = 450;
	height = 345;
	xx = window.screen.width;
	yy = window.screen.height;
	xx = (xx/2) - (width/2);
	yy = (yy/2) - (height);
	style = 'left = ' +  xx + ',top = ' + yy + ',width='+ width +',height=' + height + ',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no';
	newwindow=window.open(url,'name',style);
	if (window.focus) {newwindow.focus()}
}

function HeaderEmailValidation()
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray =document.newsletter.m_txtNewsLetter.value.match(emailPat);
	if(document.newsletter.m_txtNewsLetter.value==" ")
	{
		alert("Enter Email address.");
		document.newsletter.m_txtNewsLetter.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format.");
		document.newsletter.m_txtNewsLetter.value="";
		document.newsletter.m_txtNewsLetter.focus();
		return false;
	}
}


function HeaderLoginValidation()
{
	if(document.login.m_txtUserName.value==" ")
	{
		alert("Enter your username.");
		document.login.m_txtUserName.focus();
		return false;
	}
	
	if(document.login.m_txtPassword.value=="")
	{
		alert("Enter your password.");
		document.login.m_txtPassword.focus();
		return false;
	}
	return true;
}

function HeaderSearchValidation()
{
	if(document.Search.m_txtSearch.value==" ")
	{
		alert("Enter search text.");
		document.Search.m_txtSearch.focus();
		return false;
	}
}

/* Clear Field Function */
	function clrfield()
	{
		document.Form1.txtUsername.value ="";
		document.Form1.txtPassword.value ="";
		document.Form1.txtFirstName.value ="";
		document.Form1.txtLastName.value ="";
		document.Form1.txtEmail.value = "";
		document.Form1.txtphone.value = "";
		document.Form1.txtCompany.value = "";
		document.Form1.txtAddress1.value = "";
		document.Form1.txtAddress2.value = "";
		document.Form1.txtTown.value = "";
		document.Form1.txtPostalCode.value = "";
		document.Form1.cmbcountry.value =":: Select Country ::";
		document.Form1.txt_shipname.value ="";
		document.Form1.txt_shiplname.value ="";
		document.Form1.txt_shipaddress.value ="";
		document.Form1.txt_shipcity.value ="";
		document.Form1.shippostcode.value ="";
		document.Form1.db_shipcountry.value =":: Select Country ::";
		document.Form1.bfname.value="";
		document.Form1.blname.value="";
		document.Form1.badd.value="";
		document.Form1.bcity.value="";
		document.Form1.bpost.value="";
		document.Form1.db_bcountry.value=":: Select Country ::";
		return false;
	}

/* PopupImage Function start */		

	 PositionX = 10;
PositionY = 10;
defaultWidth  = 200;
defaultHeight = 200;
var AutoClose = true;
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
function popupImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');
writeln('var isNN,isIE;');
writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE){'); 
writeln('window.resizeTo(eval(document.images[0].width + 30), eval(document.images[0].height + 100));');  
writeln('}');
writeln('if (isNN){'); 
writeln('window.innerWidth=document.images[aboutusimage].width+80;');  
writeln('window.innerHeight=document.images[aboutusimage].height+80;}}');

writeln('function doTitle(){document.title="Johnson Bag Company : Product Image";}');
writeln('</sc'+'ript>');
if (!AutoClose) 
writeln('</head><body bgcolor=FFFFFF scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=FFFFFF scroll="no" onload="reSizeToImage();doTitle();self.focus()">');// onblur="self.close();" //  
writeln('<table border=0 cellpadding=5 cellspacing=5 width=100% height=100% >');
writeln('<tr><td align=center style="font-size:12px;"><A href="javascript:window.close()"><font color="#000000">Close Window</font></A></font></td></tr>');
if(imageURL == "dynamicdata/ProductImages/Big_Images/")
writeln('<tr><td valign=middle align=center><img name="aboutusimage" src="'+imageURL+'no-img.gif" style="display:block;width:100px;height:100px;"></td></tr>');
else
writeln('<tr><td colspan=2 valign=middle align=center><img name="aboutusimage" src="'+imageURL+'" style="display:block"></td></tr>');
writeln('</table>');
close();   
}}
	
 /* PopupImage Function end */	
 
 

 function delconfirm()
	{
		return confirm("do you want delete this record");
	}
