function checknoticefm(noticefm)
{
	if(noticefm.toemail.value == "")
	{
		alert("You must enter atleast one to email");
		noticefm.toemail.focus();
		return false;
	}
	return true;
}
function incqty(txtquantity)
{
	var q = parseInt(txtquantity.value);
	q = q + 1;
	if(q > 20)
		q = 20;
	txtquantity.value=q;
}

function validateNumeric(field) 
{
	var valid = "0123456789."
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) 
	{
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") 
			ok = "no";
	}
	if (ok == "no") 
	{
		alert("Please enter a numeric value");
		field.value = 1;
		field.focus();
		field.select();
		return false;
	}
}

function checkregqty(addtoregistry)
{
	if(addtoregistry.txtQty.value=="0" || addtoregistry.txtQty.value=="" )
	{
		alert("You missed quantity");
		addtoregistry.txtQty.focus();
		addtoregistry.txtQty.select();
		return false;
	}
	return true;
}
function checkrefferralfrm(referalfrm)
{  
	if(referalfrm.pname.value == "" )
	{
		alert("You missed Name");
		referalfrm.pname.focus();
		return false;
	}
	if(referalfrm.pemail.value == "" )
	{
		alert("You missed Email");
		referalfrm.pemail.focus();
		return false;
	}
	return true;

}
function checkhumanfrm(resfm)
{  
	if(resfm.fname.value == "" )
	{
		alert("You missed First Name");
		resfm.fname.focus();
		return false;
	}
	if(resfm.email.value == "" )
	{
		alert("You missed Email");
		resfm.email.focus();
		return false;
	}
	return true;

}

function checkonlineservyfrm(surveyfrm)
{  
	if(surveyfrm.fname.value=="")
	{
	alert("You missed First Name");
	surveyfrm.fname.focus();
	return false;
	}
	if(surveyfrm.lname.value=="")
	{
	alert("You missed Last Name");
	surveyfrm.lname.focus();
	return false;
	}
	if(surveyfrm.email.value=="")
	{
	alert("You missed e-mail");
	surveyfrm.email.focus();
	return false;
	}
	if(! surveyfrm.chksub.checked)
	{
	alert("Please Check the Checkbox");
	surveyfrm.chksub.focus();
	return false;
	}
	
	return true;

}

function checkprintloginfrm(adminlog)
{  
	if(adminlog.username.value == "" )
	{
		alert("You missed Username");
		adminlog.username.focus();
		return false;
	}
	if(adminlog.password.value == "" )
	{
		alert("You missed Password");
		adminlog.password.focus();
		return false;
	}
	return true;

}

function checkloginfrm(findfrm)
{
	if(findfrm.password.value == "" )
	{
		alert("You missed password");
		findfrm.password.focus();
		return false;
	}
	
	return true;
}

function showdiv(divname)
{
	divname.style.visibility="visible";
}
function hidediv(divname)
{
	divname.style.visibility="hidden";
}
function validsearch(searchfm)
{
	if(searchfm.searchfield.value=='')
	{
		window.alert('Please type a keyword');
		searchfm.searchfield.focus();
		return false;
	}
	return true;
}
function validnews(newsfm)
{
	if(newsfm.txtname.value=='')
	{
		window.alert('You missed name');
		newsfm.txtname.focus();
		return false;
	}
	if(newsfm.txtemail.value=='')
	{
		window.alert('You missed email');
		newsfm.txtemail.focus();
		return false;
	}
}
function decqty(txtquantity)
{
	var q = parseInt(txtquantity.value);
	q = q - 1;
	if(q < 1)
		q = 1;
	txtquantity.value=q;
}
function validateqty(txtquantity)
{
	validateNumeric(txtquantity);
}
function addtocart(idProd,txtqty,prodcolor,e)
{	
	if(e != 0)
	{
		var i = prodcolor.selectedIndex;
		if(i==0)
		{
			window.alert('Please select color');
			prodcolor.focus();
		}
		else
		{
		var s = prodcolor.options[i].value;
		window.location.href = '/addtocart.asp?Productno='+idProd+'&txtquantity='+txtqty.value+'&productcolor='+s;
		}
	}
	else
	{
	window.location.href = '/addtocart.asp?Productno='+idProd+'&txtquantity='+txtqty.value;
	}
}

function addtocart_reg(idProd,txtqty,prodcolor,e)
{	
	window.location.href = '/displaymessage.asp?regstat=yes&idProd='+idProd+'&txtqty='+txtqty.value+'';
}


function addtocartreg(idProd,txtqty,prodcolor,e)
{	alert('test');
	if(e != 0)
	{
		var i = prodcolor.selectedIndex;
		if(i==0)
		{
			window.alert('Please select color');
			prodcolor.focus();
		}
		else
		{
		var s = prodcolor.options[i].value;
		window.location.href = '/addtocart.asp?Productno='+idProd+'&txtquantity='+txtqty+'&productcolor='+s;
		}
	}
	else
	{
	window.location.href = '/addtocart.asp?Productno='+idProd+'&txtquantity='+txtqty;
	}
}

function buygiftcard(idGift,GiftFrom,GiftTo)
{	
	if(GiftFrom.value=="")
	{
		window.alert("You missed From name");
		GiftFrom.focus();
		return false;
	}
	if(GiftTo.value=="")
	{
		window.alert("You missed To name");
		GiftTo.focus();
		return false;
	}
	return true;
}

function detailsgiftcard(idGift)
{
	window.location.href = '/buygiftcard.asp?idGift='+idGift;
}
function updateqty(idCart,txtqty)
{
	window.location.href ='/shopping-cart.asp?idCartRow='+idCart+'&txtqty='+txtqty.value;
}
function setshipprice(shiplist)
{
window.location.href='shopping-cart.asp?shipment='+shiplist;
}
function checkaccept(cartdet)
{

	
	if(! document.cartdet.accept.checked)
 	{
   		alert("Please read & accept the return policy");
		document.cartdet.accept.focus();
		return false;
  	}
	else
	window.location.href="/checkout.asp";  

}
function clearcart(idcart)
{
	window.location.href ='/shopping-cart.asp?clearcart=yes&idCart='+idcart;
}
function  restvalues(custlog)
{
custlog.reset();

}
function checknews(newsfm)
{
	if (newsfm.txtname.value =="")
	{
		window.alert("You missed name");
		newsfm.txtname.focus();
		return false;
	}
	if (newsfm.txtemail.value =="")
	{
		window.alert("You missed email address");
		newsfm.txtemail.focus();
		return false;
	}
	return true;
}
function checkusr(custlog)
{

if(custlog.email)
{
	if (custlog.email.value =="")
	{
		window.alert("You missed email address");
		custlog.email.focus();
		return false;
	}
}
else
{
	if (custlog.username.value =="")
	{
		window.alert("You missed email address");
		custlog.username.focus();
		return false;
	}
}
	
	if (custlog.password.value =="")
	{
		window.alert("You missed  password");
		custlog.password.focus();
		return false;
	}
	return true;
}

function checkordfrm(orderform)
{
if (orderform.nametitle.selectedIndex == 0)
{
	window.alert("You missed title ");
	orderform.nametitle.focus();
	return false;
}
if (orderform.name.value =="")
{
window.alert("You missed name ");
orderform.name.focus();
return false;
}
if (orderform.lastname.value =="")
{
window.alert("You missed last name");
orderform.lastname.focus();
return false;
}

if (document.orderform.email.value =="")
{
window.alert("You missed email");
orderform.email.focus();
return false;
}

if (orderform.address1.value =="")
{
window.alert("You missed address1");
orderform.address1.focus();
return false;
}
if (orderform.city.value =="")
{
window.alert("You missed city");
orderform.city.focus();
return false;
}
if (orderform.state.value != "" & orderform.stateCode.value != "" )
{
window.alert("No need to enter both state and state code");
orderform.state.value =""
orderform.stateCode.value=""
orderform.state.focus();
return false;
}
if (orderform.countryCode.value =="")
{
window.alert("You missed country code");
orderform.countryCode.focus();
return false;
}

if (orderform.zip.value =="")
{
window.alert("You missed zip");
orderform.zip.focus();
return false;
}

if (orderform.shpAddress1.value =="")
{
window.alert("You missed shipping address1");
orderform.shpAddress1.focus();
return false;
}

if (orderform.shpCity.value =="")
{
window.alert("You missed shipping  city");
orderform.shpCity.focus();
return false;
}
if (orderform.shpState.value != "" & document.orderform.shpStateCode.value != "" )
{
window.alert("No need to enter both shipping state and state code");
orderform.shpState.value =""
orderform.shpStateCode.value=""
orderform.shpState.focus();
return false;
}
if (orderform.shpCountryCode.value =="")
{
window.alert("You missed shipping  country code");
orderform.shpCountryCode.focus();
return false;
}



if (orderform.shpZip.value =="")
{
window.alert("You missed shipping  zip");
orderform.shpZip.focus();
return false;
}
return true;
}
function checkordfrmgift(orderform)
{
if (orderform.nametitle.selectedIndex == 0)
{
	window.alert("You missed title ");
	orderform.nametitle.focus();
	return false;
}
if (orderform.name.value =="")
{
window.alert("You missed name ");
orderform.name.focus();
return false;
}
if (orderform.lastname.value =="")
{
window.alert("You missed last name");
orderform.lastname.focus();
return false;
}

if (document.orderform.email.value =="")
{
window.alert("You missed email");
orderform.email.focus();
return false;
}

if (orderform.address1.value =="")
{
window.alert("You missed address1");
orderform.address1.focus();
return false;
}
if (orderform.city.value =="")
{
window.alert("You missed city");
orderform.city.focus();
return false;
}
if (orderform.state.value != "" & orderform.stateCode.value != "" )
{
window.alert("No need to enter both state and state code");
orderform.state.value =""
orderform.stateCode.value=""
orderform.state.focus();
return false;
}
if (orderform.countryCode.value =="")
{
window.alert("You missed country code");
orderform.countryCode.focus();
return false;
}

if (orderform.zip.value =="")
{
window.alert("You missed zip");
orderform.zip.focus();
return false;
}

if (orderform.shpAddress1.value =="")
{
window.alert("You missed shipping address1");
orderform.shpAddress1.focus();
return false;
}

if (orderform.shpCity.value =="")
{
window.alert("You missed shipping  city");
orderform.shpCity.focus();
return false;
}
if (orderform.shpState.value != "" & document.orderform.shpStateCode.value != "" )
{
window.alert("No need to enter both shipping state and state code");
orderform.shpState.value =""
orderform.shpStateCode.value=""
orderform.shpState.focus();
return false;
}
if (orderform.shpCountryCode.value =="")
{
window.alert("You missed shipping  country code");
orderform.shpCountryCode.focus();
return false;
}



if (orderform.shpZip.value =="")
{
window.alert("You missed shipping  zip");
orderform.shpZip.focus();
return false;
}
/*if(orderform.shipment.selectedIndex == 0 )
{
	window.alert("Please Select Shipment Type");
	orderform.shipment.focus();
	return false;
}*/

/*if (orderform.idShipment.value =="")
{
window.alert("You missed Shipment type");
orderform.idShipment.focus();
return false;
}*/

return true;
}
 function assign_values(orderform)
      {
      if(document.orderform.separateShipping.checked)
	   {
	    orderform.shipname.value=document.orderform.name.value;
		orderform.shiplastname.value=document.orderform.lastname.value;
	    orderform.shpAddress1.value=document.orderform.address1.value;
		orderform.shpAddress2.value=document.orderform.address2.value;
		orderform.shpCity.value=document.orderform.city.value;
		orderform.shpState.value=document.orderform.state.value;
		orderform.shpZip.value=document.orderform.zip.value;
		orderform.shpStateCode.value=document.orderform.stateCode.value;
		orderform.shpCountryCode.value=document.orderform.countryCode.value;
		
		
	  }
	  else
	  {
	  orderform.shpAddress1.value="";
	  orderform.shpAddress2.value="";
	  orderform.shpCity.value="";
	  orderform.shpState.value="";
	  orderform.shpZip.value="";
	  orderform.shpStateCode.value="";
	  orderform.shpCountryCode.value="";
	  	  
	  }
    }
	function assign_regvalues(registryform)
      {
      if(document.registryform.separateShipping.checked)
	   {
	    registryform.shpAddress1.value=document.registryform.address1.value;
		registryform.shpAddress2.value=document.registryform.address2.value;
		registryform.shpCity.value=document.registryform.city.value;
		registryform.shpState.value=document.registryform.state.value;
		registryform.shpZip.value=document.registryform.zip.value;
		registryform.shpStateCode.value=document.registryform.stateCode.value;
		registryform.shpCountryCode.value=document.registryform.countryCode.value;
		
		
	  }
	  else
	  {
	  registryform.shpAddress1.value="";
	  registryform.shpAddress2.value="";
	  registryform.shpCity.value="";
	  registryform.shpState.value="";
	  registryform.shpZip.value="";
	  registryform.shpStateCode.value="";
	  registryform.shpCountryCode.value="US";
	  	  
	  }
    }
function checkcontactfrm(contactfm)
{  
	if (contactfm.fname.value =="")
	{
	window.alert("You missed First Name");
	contactfm.fname.focus();
	return false;
	}
	
	if (contactfm.lname.value =="")
	{
	window.alert("You missed Last Name");
	contactfm.lname.focus();
	return false;
	}
	
	if (contactfm.cname.value =="")
	{
	window.alert("You missed Company Name");
	contactfm.cname.focus();
	return false;
	}
	
	if (document.contactfm.countryCode.value =="")
	{
	window.alert("You missed Country Name");
	contactfm.countryCode.focus();
	return false;
	}
	
	if (document.contactfm.phone.value =="")
	{
	window.alert("You missed Telephone");
	contactfm.phone.focus();
	return false;
	}

	if (document.contactfm.email.value =="")
	{
	window.alert("You missed Email");
	contactfm.email.focus();
	return false;
	}
	if (document.contactfm.Pic.value =="")
	{
		window.alert("You missed Security Code");
		document.contactfm.Pic.focus();
		return false;
	}

	return true;
	}
	
	function checkregistryfrm(orderform)
	{  
		if (orderform.firstname.value =="")
		{
		window.alert("You missed mother's name ");
		orderform.name.focus();
		return false;
		}
		if (orderform.lastname.value =="")
		{
		window.alert("You missed mother's last name");
		orderform.lastname.focus();
		return false;
		}
		/*if (orderform.coregname.value =="")
		{
		window.alert("You missed father's name ");
		orderform.coregname.focus();
		return false;
		}
		if (orderform.coreglastname.value =="")
		{
		window.alert("You missed father's last name");
		orderform.coreglastname.focus();
		return false;
		}
		if (orderform.regMonth.selectedIndex == 0 || orderform.regDay.selectedIndex == 0 || orderform.regYear.selectedIndex == 0 )
		{
			window.alert("You missed Date of occasion ");
			orderform.regMonth.focus();
			return false;
		}*/
		if (orderform.email.value =="")
		{
		window.alert("You missed email");
		orderform.email.focus();
		return false;
		}
		
		if (orderform.password.value =="")
		{
		window.alert("You missed registry access password");
		orderform.password.focus();
		return false;
		}
		
		if (orderform.cpassword.value =="")
		{
		window.alert("You missed registry Confirm password");
		orderform.cpassword.focus();
		return false;
		}
		
		/*if (orderform.address1.value =="")
		{
		window.alert("You missed address1");
		orderform.address1.focus();
		return false;
		}
		if (orderform.city.value =="")
		{
		window.alert("You missed city");
		orderform.city.focus();
		return false;
		}
		if (orderform.state.value != "" & orderform.stateCode.value != "" )
		{
		window.alert("No need to enter both state and state code");
		orderform.state.value =""
		orderform.stateCode.value=""
		orderform.state.focus();
		return false;
		}*/	
		if (orderform.stateCode.value =="")
		{
		window.alert("You missed State Code");
		orderform.stateCode.focus();
		return false;
		}
		
		if (orderform.countryCode.value =="")
		{
		window.alert("You missed country code");
		orderform.countryCode.focus();
		return false;
		}
		
		if (orderform.zip.value =="")
		{
		window.alert("You missed zip");
		orderform.zip.focus();
		return false;
		}
		
		/*if (orderform.shpAddress1.value =="")
		{
		window.alert("You missed shipping address1");
		orderform.shpAddress1.focus();
		return false;
		}
		
		if (orderform.shpCity.value =="")
		{
		window.alert("You missed shipping  city");
		orderform.shpCity.focus();
		return false;
		}
		if (orderform.shpState.value != "" & document.orderform.shpStateCode.value != "" )
		{
		window.alert("No need to enter both shipping state and state code");
		orderform.shpState.value =""
		orderform.shpStateCode.value=""
		orderform.shpState.focus();
		return false;
		}
		if (orderform.shpZip.value =="")
		{
		window.alert("You missed shipping  zip");
		orderform.shpZip.focus();
		return false;
		}
		if (orderform.shpCountryCode.value =="")
		{
		window.alert("You missed shipping  country code");
		orderform.shpCountryCode.focus();
		return false;
		}*/
		return true;
	}

function checkcredit(saveorder)
{
	if (saveorder.cardNumber.value =="")
	{
		window.alert("You missed credit card number ");
		saveorder.cardNumber.focus();
		return false;
	}
		
		
	return true;
}
function validgiftpurchase(cardform)
{
	if (cardform.cardNumber.value =="")
	{
		window.alert("You missed credit card number ");
		cardform.cardNumber.focus();
		return false;
	}
}

function checkprinttransfer(cutR)
{
	if (cutR.file1.value =="")
	{
		window.alert("You missed File");
		cutR.file1.focus();
		return false;
	}
	return true;
}

function checkreg(cutR)
{
	/*if (cutR.nametitle.selectedIndex == 0)
	{
		window.alert("You missed title ");
		cutR.nametitle.focus();
		return false;
	}*/
	if (cutR.firstname.value =="")
	{
	window.alert("You missed first name ");
	cutR.firstname.focus();
	return false;
	}
	if (cutR.lastname.value =="")
	{
	window.alert("You missed last name");
	cutR.lastname.focus();
	return false;
	}
	
	
	if (cutR.email.value =="")
	{
	window.alert("You missed email");
	cutR.email.focus();
	return false;
	}
	if (cutR.username.value =="")
	{
	window.alert("You missed Username");
	cutR.username.focus();
	return false;
	}
	
	if (cutR.password.value =="")
	{
	window.alert("You missed password");
	cutR.password.focus();
	return false;
	}
	if (cutR.cpassword.value =="")
	{
	window.alert("You missed confirm password");
	cutR.cpassword.focus();
	return false;
	}
	if (cutR.cpassword.value !=cutR.password.value)
	{
	window.alert("Confirm password and password should be same");
	cutR.cpassword.value="";
	cutR.password.value="";
	cutR.password.focus();
	return false;
	}
	/*if (cutR.address1.value =="")
	{
	window.alert("You missed address1");
	cutR.address1.focus();
	return false;
	}
	if (cutR.city.value =="")
	{
	window.alert("You missed city");
	cutR.city.focus();
	return false;
	}
	if (cutR.state.value != "" & cutR.stateCode.value != "" )
	{
	window.alert("No need to enter both state and other state ");
	cutR.state.value =""
	cutR.stateCode.value=""
	cutR.state.focus();
	return false;
	}*/
	if (cutR.stateCode.value =="")
	{
	window.alert("You missed state ");
	cutR.stateCode.focus();
	return false;
	}
	
	if (cutR.zip.value =="")
	{
	window.alert("You missed zip");
	cutR.zip.focus();
	return false;
	}
	
	if (cutR.countryCode.value =="")
	{
	window.alert("You missed country ");
	cutR.countryCode.focus();
	return false;
	}
	
	

	return true;
}	

function checkmodify(modCust)
{
	
	if (modCust.firstname.value =="")
	{
	window.alert("You missed first name ");
	modCust.firstname.focus();
	return false;
	}
	if (modCust.lastname.value =="")
	{
	window.alert("You missed last name");
	modCust.lastname.focus();
	return false;
	}
			
	if (modCust.email.value =="")
	{
	window.alert("You missed email");
	modCust.email.focus();
	return false;
	}
	
	if (modCust.password.value =="")
	{
	window.alert("You missed password");
	modCust.password.focus();
	return false;
	}
	if (modCust.cpassword.value =="")
	{
	window.alert("You missed confirm password");
	modCust.cpassword.focus();
	return false;
	}
	if (modCust.cpassword.value !=modCust.password.value)
	{
	window.alert("Confirm password and password should be same");
	modCust.cpassword.value="";
	modCust.password.value="";
	modCust.password.focus();
	return false;
	}
	/*if (modCust.address1.value =="")
	{
	window.alert("You missed address1");
	modCust.address1.focus();
	return false;
	}
	if (modCust.city.value =="")
	{
	window.alert("You missed city");
	modCust.city.focus();
	return false;
	}
	if (modCust.state.value != "" & modCust.stateCode.value != "" )
	{
	window.alert("No need to enter both state and other state");
	modCust.state.value =""
	modCust.stateCode.value=""
	modCust.state.focus();
	return false;
	}*/
	if (modCust.stateCode.value =="")
	{
	window.alert("You missed state");
	modCust.stateCode.focus();
	return false;
	}
	
	if (modCust.zip.value =="")
	{
	window.alert("You missed zip");
	modCust.zip.focus();
	return false;
	}
	
	if (modCust.CountryCode.value =="")
	{
	window.alert("You missed country ");
	modCust.CountryCode.focus();
	return false;
	}
	
	

	return true;
}	
function checksaveorder(saveorder,otype)
{ 
	if(otype == 0)
	{
		var strva="";
	  	var res;
		if (saveorder.ShoppingType.value == 1)
		{
			strva="Do you want to proceed with checkout";
			res=confirm(strva);	
			if (!res)
				return false;
			if(saveorder.idPayment.value=="10")
			{	saveorder.action='giftcardpurchase.asp';
				if (saveorder.giftcardNumber.value =="")
				{
					window.alert("You missed gift certificate number ");
					saveorder.giftcardNumber.focus();
					return false;
				}
				if (saveorder.giftcardNumber.value.length !=15)
				{
					window.alert("Your gift certificate number is wrong!! ");
					saveorder.giftcardNumber.focus();
					saveorder.giftcardNumber.select();
					return false;
				}
			}
			
			else if(saveorder.idPayment.value=="9")
			{
				if (saveorder.cardNumber.value =="")
				{
					window.alert("You missed credit card number ");
					saveorder.cardNumber.focus();
					return false;
				}
			}
		}
	  	if (saveorder.ShoppingType.value==2)
		{
			strva="Do you want to save your order";	
			res=confirm(strva);	
			if(!res){return false;}
		}
		return true;
	}
	else
	{
		if(saveorder.idPayment.value=="10")
		{	saveorder.action='save_giftcardpurchase.asp';
			if (saveorder.giftcardNumber.value =="")
			{
				window.alert("You missed gift certificate number ");
				saveorder.giftcardNumber.focus();
				return false;
			}
			
			if (saveorder.giftcardNumber.value.length !=15)
			{
				window.alert("Your gift certificate number is wrong!! ");
				saveorder.giftcardNumber.focus();
				saveorder.giftcardNumber.select();
				return false;
			}
		}
		else if(saveorder.idPayment.value=="9")
		{
			if (saveorder.cardNumber.value =="")
			{
				window.alert("You missed credit card number ");
				saveorder.cardNumber.focus();
				return false;
			}
		}
	}
}

function windowprint(idprd)
{
window.open("/viewproductdetails.asp?idProd="+idprd+"", 'newpage','scrollbars=yes,status=no,width=690,height=600');

}

function printreg()
{
window.open("/printregistryitems.asp"+"", 'newpage','scrollbars=yes,status=no,width=690,height=600');
}
function checkemailfm(emailfm)
{
    if (emailfm.firstName.value =="")
	{
	window.alert("You missed  name ");
	emailfm.firstName.focus();
	return false;
	}
	
	 if (emailfm.email.value =="")
	{
	window.alert("You missed from email ");
	emailfm.email.focus();
	return false;
	}
	 if (emailfm.toemail.value =="")
	{
	window.alert("You missed to email ");
	emailfm.toemail.focus();
	return false;
	}
   

	
	return true;
}
function deleteproduct(idWish,currentPage)
{

   var res;	
   res=confirm("Do you want to delete this product from wishlist " );	
	if (res)
	{
	window.location.href="customerwishlist.asp?delete=yes&idWish="+idWish+"&curPage="+currentPage;
	}
}
function windowopen1(idprd,imgw,imgh)
{
	var imgwidth,imgheight;
	imgwidth=parseInt(imgw)+100;
	imgheight=parseInt(imgh)+100;
	if (parseInt(imgwidth) < 250 )
	{
	imgwidth=250;
	}
	
	window.open("/viewproductimage.asp?idProd="+idprd+"", 'newpage1','scrollbars=no,status=no,width='+imgwidth+',height='+imgheight+'');
	
}
	

function windowlogout(idprd)
{
	var imgwidth,imgheight;
	imgwidth=500;//parseInt(imgw)+100;
	imgheight=400;//parseInt(imgh)+100;
	if (parseInt(imgwidth) < 250 )
	{
	imgwidth=250;
	}
	//<a class=catlink href="logoutregistry.asp?idProd=<%=pIdProduct %>">logout</a>
	window.location.href = "/logoutregistry.asp?idProd="+idprd+"";
	
}

	function windowopenGIFT(idprd,imgw,imgh)
	{
	var imgwidth,imgheight;
	imgwidth=parseInt(imgw)+100;
	imgheight=parseInt(imgh)+100;
	if (parseInt(imgwidth) < 250 )
	{
	imgwidth=250;
	}
	
	window.open("/viewgiftimage.asp?idProd="+idprd+"", 'newpage1','scrollbars=no,status=no,width='+imgwidth+',height='+imgheight+'');
	
	}
	
	function showcouponNo(ptype,couponNo)
	{
		var i = ptype.selectedIndex;
		var v = ptype.options[i].value;
		if(v=="10")
			couponNo.disabled=true;
		else
			couponNo.disabled=false;
	}