function empty()
		{
				
		}
		function checkforempty()
		{
			if ((document.frm2.mobileprodname.value)=="")
				{
				alert("Model Name Cannot Be Left Blank");
				document.frm2.mobileprodname.focus();
				return false;
				}
			if (isNaN(document.frm2.mobileprodheight.value))
				{
				alert("Height Cannot Be A Text Value");
				document.frm2.mobileprodheight.focus();
				return false;
				}
			if ((document.frm2.mobileprodheight.value)=="")
				{
				alert("Height Cannot Be Left Blank");
				document.frm2.mobileprodheight.focus();
				return false;
				}
			if (isNaN(document.frm2.mobileprodweight.value))
				{
				alert("Weight Cannot Be A Text Value");
				document.frm2.mobileprodweight.focus();
				return false;
				}
			if ((document.frm2.mobileprodweight.value)=="")
				{
				alert("Weight Cannot Be Left Blank");
				document.frm2.mobileprodweight.focus();
				return false;
				}
			if (isNaN(document.frm2.mobileprodwidth.value))
				{
				alert("Width Cannot Be A Text Value");
				document.frm2.mobileprodwidth.focus();
				return false;
				}
			if ((document.frm2.mobileprodwidth.value)=="")
				{
				alert("Width Cannot Be Left Blank");
				document.frm2.mobileprodwidth.focus();
				return false;
				}
			if (isNaN(document.frm2.mobileprodthick.value))
				{
				alert("Thickness Cannot Be A Text Value");
				document.frm2.mobileprodthick.focus();
				return false;
				}
			if ((document.frm2.mobileprodthick.value)=="")
				{
				alert("Thickness Cannot Be Left Blank");
				document.frm2.mobileprodthick.focus();
				return false;
				}
			if (isNaN(document.frm2.mobileprodttime.value))
				{
				alert("Talk Time Cannot Be A Text Value");
				document.frm2.mobileprodttime.focus();
				return false;
				}
			if ((document.frm2.mobileprodttime.value)=="")
				{
				alert("Talk Time Cannot Be Left Blank");
				document.frm2.mobileprodttime.focus();
				return false;
				}
			if ((document.frm2.mobileprodmemory.value)=="")
				{
				alert("Memory Cannot Be Left Blank");
				document.frm2.mobileprodmemory.focus();
				return false;
				}
			if (isNaN(document.frm2.mobileprodsp.value))
				{
				alert("Selling Price Cannot Be A Text Value");
				document.frm2.mobileprodsp.focus();
				return false;
				}
			if ((document.frm2.mobileprodsp.value)=="")
				{
				alert("Selling Price Cannot Be Left Blank");
				document.frm2.mobileprodsp.focus();
				return false;
				}
			if (isNaN(document.frm2.mobileprodmrpprice.value))
				{
				alert("MRP Price Cannot Be A Text Value");
				document.frm2.mobileprodmrpprice.focus();
				return false;
				}
			if ((document.frm2.mobileprodmrpprice.value)=="")
				{
				alert("MRP Price Cannot Be Left Blank");
				document.frm2.mobileprodmrpprice.focus();
				return false;
				}
		}


		function blank()
		{
			if ((document.addcat.companyname.value)=="")
				{
				alert("Field Cannot Be Left Blank");
				document.addcat.companyname.focus();
				return false;
				}
		}
		function modelvalidate()
		{
			if ((document.addmodel.modelcode.value)=="")
			{
				alert("Field Cannot Be Left Blank");
				document.addmodel.modelcode.focus();
				return false;
			}
		}
		function accvalidate()
		{
			if ((document.addcat.accessoriesname.value)=="")
			{
				alert("Field Cannot Be Left Blank");
				document.addcat.accessoriesname.focus();
				return false;
			}
		}
		function accdetailvalid()
		{
			if ((document.addcatdetail.accdetailitemname.value)=="")
			{
				alert("Field Cannot Be Left Blank");
				document.addcatdetail.accdetailitemname.focus();
				return false;
			}
		}
		function logincheck()
		{
			
			if ((document.logininfo.loginname.value)=="")
			{
				alert("Login Name Cannot Be Left Blank");
				document.logininfo.loginname.focus();
				return false;
			}
			if ((document.logininfo.passwordvalue.value)=="")
			{
				alert("Password Value Cannot Be Left Blank");
				document.logininfo.passwordvalue.focus();
				return false;
			}

		}

	// Credit Card Format Validator
// Version 1.0 completed April 28, 2002
// Programmer:  William Bontrager
// Website: http://willmaster.com

// Customization:
//
// There are 4 customization steps:
//

// Step 1:
// Between the quotes, type what the alert box message shall say when
// the credit card is unknown and the number did not pass?
// To force a line break, use "\n" (without the quotes).
// For no message, type "" (nothing between the quotes).

Step1Message = "Credit card is not known.\nCredit card number is invalid.";

//
// Step 2:
// Between the quotes, type what the alert box message shall say when
// the credit card is known and the number did not pass?
// To force a line break, use "\n" (without the quotes).
// For no message, type "" (nothing between the quotes).

Step2Message = "Credit card number is invalid.";

//
// Step 3:
// Between the quotes, type what the alert box message shall say when
// the credit card is unknown and the number passed?
// To force a line break, use "\n" (without the quotes).
// For no message, type "" (nothing between the quotes).

Step3Message = "Credit card is not known.";

//
// Step 4:
// When the credit card is known and the number passed, 
// the script can display the credit card type and the 
// number (stripped of hyphens and other non-digit characters).
// To display this message, type a Y or a y between the quotes.
// To not display this message, type "" (no space between the quotes).

DisplayAllOkayMessage = "y";



////////////////////////////////////////
//                                    //
// No further customization required. //
//                                    //
////////////////////////////////////////


////////////////////////////////////////
//
//    N O T E S :
//
// Three global variables are set when function Validate() is called.
// If appropriate, your application can consult these variables:
//
// Variable Name     Value
// ^^^^^^^^^^^^^     ^^^^^
// ccType          - The name of the credit card, if determinable. 
//                   Otherwise null.
// ccNumberOkay    - Digit 1 if the credit card number is of a valid 
//                   format. Otherwise digit 0.
// ccNumberChecked - The credit card number that was checked (all spaces 
//                   and non-digit characters stripped out). Example:
//                   CC # 1234-5678-901-234 is checked as 12345678901234
//
////////////////////////////////////////



ccType = '';
ccNumberOkay = 0;
ccNumberChecked = '';

function StripNonDigits(number) {
var Re = /\d+/g;
if(Re.lastIndex > 1) { Re.lastIndex = 0; }
var Array = Re.exec(number);
if(Re.lastIndex < 1) { return 'X'; }
var ss = Array.join();
while(Re.lastIndex > 0 && Re.lastIndex < number.length) {
	Array = Re.exec(number);
	if(Array) { ss += Array.join(); }
	}
return ss;
} // StripNonDigits()


function GetType(number) {
var len = number.length;
var Re = /^5[1-5]/;
	if(Re.lastIndex > 1) { Re.lastIndex = 0; }
		var Array = Re.exec(number);
			if(Array && len == 16) { return 'MasterCard'; }
Re = /^4/;
	if(Re.lastIndex > 1) { Re.lastIndex = 0; }
		Array = Re.exec(number);
			if(Array && (len == 13 || len == 16)) { return 'Visa'; }
Re = /^3[47]/;
	if(Re.lastIndex > 1) { Re.lastIndex = 0; }
		Array = Re.exec(number);
			if(Array && len == 15) { return 'American Express'; }
Re = /^(30[0-5]|3[68])/;
	if(Re.lastIndex > 1) { Re.lastIndex = 0; }
		Array = Re.exec(number);
			if(Array && len == 14) { return 'Diners Club'; }
Re = /^6011/;
	if(Re.lastIndex > 1) { Re.lastIndex = 0; }
		Array = Re.exec(number);
			if(Array && len == 14) { return 'Discover'; }
Re = /^(3|1800|2131)/;
	if(Re.lastIndex > 1) { Re.lastIndex = 0; }
		Array = Re.exec(number);
			if(Array && (len == 15 || len == 16)) { return 'JCB'; }
return '';
} // GetType()


function Reverse(number) {
var n = '';
for(i = number.length; i >= 0; i--) { n += number.substr(i,1); }
return n;
} // Reverse()


function AddedTogether(number) {
var n = 0;
for(i = 0; i < number.length; i++) {
	var s = number.substr(i,1);
	var si = parseInt(s,10);
	if(i % 2 > 0) {
		var ii = si * 2;
		if(ii < 10) { n += ii; }
		else {
			var ss = ' ' + ii;
			for(xi = 1; xi < ss.length; xi++) {
				var xs = ss.substr(xi,1);
				var xsi = parseInt(xs,10);
				n += xsi;
				} // for
			} // else
		} // if
	else { n += si; }
	} // for
return n;
} // AddedTogether()


function Mod10(n) {
var reversed = Reverse(n);
var total = AddedTogether(reversed);
if(total % 10 > 0) { return 0; }
return 1;
} // Mod10()
	
function CCValidate()
	{
		n=document.frm1.ccnumber.value
			if (n=="")
			{
				alert("Credit Card Number Cannot be left Blank");
				return false;
			}

		if (isNaN(n))
			{
				alert("Invalid Credit Cart Number");
				return false;
			}

		ccNumberChecked = StripNonDigits(n);
		if(ccNumberChecked == 'X') {
			alert('Please supply a credit card number.');
			return false;
			}
		ccType = GetType(ccNumberChecked);
		ccNumberOkay = Mod10(ccNumberChecked);
		var fourth = '-- Credit Card --\n' + ccType + '\n' + ccNumberChecked;
		if(     Step1Message.length > 0 && ccType.length < 2 && ccNumberOkay == 0) { alert(Step1Message); }
		else if(Step2Message.length > 0 && ccNumberOkay == 0                     ) { alert(Step2Message); }
		else if(Step3Message.length > 0 && ccType.length < 2                     ) { alert(Step3Message); }
		else if(DisplayAllOkayMessage == "y" || DisplayAllOkayMessage == "Y"     ) { alert(fourth);       }
				
		return false;
	} // Validate()




function valemail()
{
email=document.frm1.email.value


		if (email == "" || email.indexOf('@',0) == -1 || email.indexOf('.',0) == -1) 
			 {
			   alert ("Please enter a valid E-mail Address") ;
			   document.frm1.email.focus();
				document.frm1.email.select();
			   return false ;
			 }
}

	function validatefirst()
	{
		if ((document.frm1.name.value)=="") 
		{
			alert("Name Cannot Be Left Blank");
			document.frm1.name.focus();
			return false;
		}
		if ((document.frm1.address.value)=="") 
		{
			alert("Address1 Cannot Be Left Blank");
			document.frm1.addresst.focus();
			return false;
		}
		if ((document.frm1.city.value)=="") 
		{
			alert("City Cannot Be Left Blank");
			document.frm1.city.focus();
			return false;
		}
		if ((document.frm1.state.value)=="") 
		{
			alert("State Cannot Be Left Blank");
			document.frm1.state.focus();
			return false;
		}
		if ((document.frm1.zipcode.value)=="") 
		{
			alert("Zip Code Cannot Be Left Blank");
			document.frm1.zipcode.focus();
			return false;
		}
		if (isNaN(document.frm1.zipcode.value))
		{
			alert("Zip Code Cannot Be A Text Value");
			document.frm1.zipcode.focus();	
			return false;
		}
		if ((document.frm1.phone.value)=="") 
		{
			alert("Phone Number Cannot Be Left Blank");
			document.frm1.phone.focus();
			return false;
		}
		if (isNaN(document.frm1.phone.value))
		{
			alert("Phone Cannot Be A Text Value");
			document.frm1.phone.focus();	
			return false;
		}
		email=document.frm1.email.value


		if (email == "" || email.indexOf('@',0) == -1 || email.indexOf('.',0) == -1) 
			 {
			   alert ("Please enter a valid E-mail Address") ;
			   document.frm1.email.focus();
				document.frm1.email.select();
			   return false ;
			 }

		pwd=document.frm1.password.value
		cnf=document.frm1.confirmpass.value

		if (cnf!="")
		{
		if (pwd!=cnf)
			{
				alert("Confirm Password is not same as the Password");
				document.frm1.confirmpass.focus();
				document.frm1.confirmpass.select();

				return false;
			}
		}
	}

	function validatecarddetail()
	{
		if ((document.frm3.nameofcard.value)=="")
		{
			alert("Card Name Cannot Be Left Blank");
			document.frm3.nameofcard.focus();
			return false;
		}
		if ((document.frm3.cardnumber.value)=="") 
		{
			alert("Card Number Cannot Be Left Blank");
			document.frm3.cardnumber.focus();
			return false;
		}
		if (isNaN(document.frm3.cardnumber.value))
		{
			alert("Card Number Cannot Be A Text Value");
			document.frm3.cardnumber.focus();
			return false;
		}
	}
//	if (isNaN(document.frm2.mobileprodmrpprice.value))
	function Validate()
	{
		//return CCValidate();
		
		var ph, pwd, cnf
			ph=document.frm1.phone.value
			pwd=document.frm1.pwd.value
			cnf=document.frm1.confirm.value
			email=document.frm1.email.value
			country=document.frm1.country[document.frm1.country.selectedIndex].value;
			add = document.frm1.address.value

		if (add=="")
		{
			alert("Card Holder Address cannot be left blank");
			document.frm1.address.focus();
			return false ;
		}

		if (country=="")
		{
			alert("Select the Country");
			document.frm1.country.focus();
			return false ;
		}

		if (email == "" || email.indexOf('@',0) == -1 || email.indexOf('.',0) == -1) 
			 {
			   alert ("Please enter a valid E-mail Address") ;
			   document.frm1.email.focus();
				document.frm1.email.select();
			   return false ;
			 }

		if (ph!="")
		{
			if (isNaN(ph))
				{
					alert("Phone should be in numeric");
					document.frm1.phone.focus();
					document.frm1.phone.select();
					return false;
				}
		}

		
		if (pwd=="")
		{
			alert("Password cannot be left blank");
			document.frm1.pwd.focus();
			document.frm1.pwd.select();
			return false;
		}

		if (cnf=="")
		{
			alert("Confirm Password cannot be left blank");
			document.frm1.confirm.focus();
			document.frm1.confirm.select();
			return false;
		}

		if (cnf!="")
		{
		if (pwd!=cnf)
			{
				alert("Confirm Password is not same as the Password");
				document.frm1.confirm.focus();
				document.frm1.confirm.select();

				return false;
			}
		}

	}

	function oncheck()
	{
		var add, ch, val1
		val1 = document.frm1.sameadd.length;
		add = document.frm1.address1.value

			//document.frm1.sameadd.checked=true;
			
			if (document.frm1.sameadd.checked==true)
			{
				document.frm1.address2.value = add;
			}

			if (document.frm1.sameadd.checked==false)
			{
				document.frm1.address2.value ='';
			}
	}

	function checksame()
	{
		var add
		add = document.frm1.address1.value

		if (document.frm1.address2.checked==true)
		{
			document.frm1.address2.value = add;
		}
	}

	function emailvalidate()
	{
		var email
		email=document.frm1.newuseremail.value;
		if (email == "" || email.indexOf('@',0) == -1 || email.indexOf('.',0) == -1) 
			 {
			   alert ("Please enter a valid E-mail Address") ;
			   document.frm1.newuseremail.focus();
				document.frm1.newuseremail.select();
			   return false ;
			 }
	}
	
	function emailvalidate1()
	{
		var email
		email=document.userinfo.useremail.value;
		if (email == "" || email.indexOf('@',0) == -1 || email.indexOf('.',0) == -1) 
			 {
			   alert ("Please enter a valid E-mail Address") ;
			   document.userinfo.useremail.focus();
				document.userinfo.useremail.select();
			   return false ;
			 }
		if ((document.userinfo.userpassword.value)=="")
		{
			alert("Password Value Cannot Be Left Blank");
			document.userinfo.userpassword.focus();
			return false ;
		}
	}

	function Validate1()
	{
		//return CCValidate();
		
		var ph, pwd, cnf
			ph=document.frm1.phone.value			
			email=document.frm1.email.value
			country=document.frm1.country[document.frm1.country.selectedIndex].value;
			add = document.frm1.address.value

		if (add=="")
		{
			alert("Card Holder Address cannot be left blank");
			document.frm1.address.focus();
			return false ;
		}

		if (country=="")
		{
			alert("Select the Country");
			document.frm1.country.focus();
			return false ;
		}

		if (email == "" || email.indexOf('@',0) == -1 || email.indexOf('.',0) == -1) 
			 {
			   alert ("Please enter a valid E-mail Address") ;
			   document.frm1.email.focus();
				document.frm1.email.select();
			   return false ;
			 }

		if (ph!="")
		{
			if (isNaN(ph))
				{
					alert("Phone should be in numeric");
					document.frm1.phone.focus();
					document.frm1.phone.select();
					return false;
				}
		}		
	}



function DelCat()
{
	 var val1;
	 val1 = window.document.frm1.checkvalue.length;

	 //alert("... : "+ val1);

	 blnflag = false;
	 if (val1==null)
	 {
		 if (document.frm1.checkvalue.checked==true)
			{
				blnflag = true;
			}
	 }
	 
	 for(i=0;i<val1;i++)
		{
			if (document.frm1.checkvalue[i].checked==true)
			{
				blnflag = true;
			}
		}
	
	if (blnflag == true)
	{
		if (confirm("Are you sure you want to delete selected records?"))
		{
			frm1.submit();
		}
		else
		{
			return false;
		}
	}
	else
	{
		alert("Please Select at least one record.");
		return false;
	}
}


function transfer()
		{
			document.location.href="index.asp";
		}
	function transfertodelete()
		{
			document.location.href="emptycart.asp";
		}
	function transfertocheckout()
		{
			document.location.href="usersignin.asp";
		}
		function transfertocheckout2()
		{
			document.location.href="reviewreturning.asp";
		}

function transfer()
		{
			location="index.asp";
		}

function transfertodelete()
		{
			document.location.href="emptycart.asp";
		}




/*function DelCat()
{
	 var val1
	 val1 = document.frm1.checkvalue.length;
	 blnflag = false;
	 if (val1==null)
	 {
		 if (document.frm1.checkvalue.checked==true)
			{
				blnflag = true;
			}
	 }
	 
	 for(i=0;i<val1;i++)
		{
			if (document.frm1.checkvalue[i].checked==true)
			{
				blnflag = true;
			}
		}
	
	if (blnflag)
	{
		if (confirm("Are you sure you want to delete selected records?"))
			frm1.submit();
	}
	else
		alert("Please Select at least onerecord(...).");
}*/

function validatefirstlog()
	{
		
		email=document.frm1.email.value


		if (email == "" || email.indexOf('@',0) == -1 || email.indexOf('.',0) == -1) 
			 {
			   alert ("Please enter a valid E-mail Address") ;
			   document.frm1.email.focus();
				document.frm1.email.select();
			   return false ;
			 }

		 pwd=document.frm1.custpassword.value
		cnf=document.frm1.custconfirmpassword.value

		if (cnf!="")
		{
		if (pwd!=cnf)
			{
				alert("Confirm Password is not same as the Password");
				document.frm1.custconfirmpassword.focus();
				document.frm1.custconfirmpassword.select();

				return false;
			}
		}
		if ((document.frm1.name.value)=="") 
		{
			alert("Name Cannot Be Left Blank");
			document.frm1.name.focus();
			return false;
		}
		if ((document.frm1.address.value)=="") 
		{
			alert("Address1 Cannot Be Left Blank");
			document.frm1.address.focus();
			return false;
		}
		if ((document.frm1.city.value)=="") 
		{
			alert("City Cannot Be Left Blank");
			document.frm1.city.focus();
			return false;
		}
		if ((document.frm1.state.value)=="") 
		{
			alert("State Cannot Be Left Blank");
			document.frm1.state.focus();
			return false;
		}
		if ((document.frm1.zipcode.value)=="") 
		{
			alert("Zip Code Cannot Be Left Blank");
			document.frm1.zipcode.focus();
			return false;
		}
		if (isNaN(document.frm1.zipcode.value))
		{
			alert("Zip Code Cannot Be A Text Value");
			document.frm1.zipcode.focus();	
			return false;
		}
		if ((document.frm1.phone.value)=="") 
		{
			alert("Phone Number Cannot Be Left Blank");
			document.frm1.phone.focus();
			return false;
		}
		if (isNaN(document.frm1.phone.value))
		{
			alert("Phone Cannot Be A Text Value");
			document.frm1.phone.focus();	
			return false;
		}
		

		
	}


function lastvalidate()
{
	var mm;
	var dt;
	var yr;
	if((window.document.reorder.mmdate.value=="") || (window.document.reorder.dddate.value=="") || (window.document.reorder.yydate.value==""))
	{
		alert("please fill the date.");
		document.reorder.yydate.focus();
		return false;
	}
	else
	{
	mm=window.document.reorder.mmdate.value;
	dt=window.document.reorder.dddate.value;
	yr=window.document.reorder.yydate.value;
	var finaldate = dt + "/" + mm + "/" + yr;
	if(!convert_date(finaldate))
		{
			document.reorder.mmdate.focus();
			return false;
		}
	if( window.document.pnote.value.length > 254)
		{
			alert("Personal Note Cannot Be more than 255 characters");
			document.reorder.pnote.focus();
			return false;
		}
	if( window.document.direct.value.length > 254)
		{
			alert("Directives for Us Cannot Be more than 255 characters");
			document.reorder.direct.focus();
			return false;
		}
	if ((window.document.reorder.ShippingName.value)=="") 
			{
				alert("Shipping Name Cannot Be Left Blank");
				document.reorder.ShippingName.focus();
				return false;
			}
	if ((document.reorder.ShippingAddress1.value)=="") 
			{
				alert("Shipping Address Cannot Be Left Blank");
				document.reorder.ShippingAddress1.focus();
				return false;
			}
	if ((document.reorder.ShippingCity.value)=="") 
			{
				alert("Shipping city Cannot Be Left Blank");
				document.reorder.ShippingCity.focus();
				return false;
			}
	if ((document.reorder.ShippingPhone.value)=="") 
			{
				alert("Shipping Phone no. Cannot Be Left Blank");
				document.reorder.ShippingPhone.focus();
				return false;
			}
	if ((document.reorder.ShippingState.value)=="") 
			{
				alert("Shipping state Cannot Be Left Blank");
				document.reorder.ShippingState.focus();
				return false;
			}
/*	if ((document.reorder.ShippingRegion.value)=="") 
			{
				alert("Shipping Region Cannot Be Left Blank");
				document.reorder.ShippingRegion.focus();
				return false;
			}

	if ((document.reorder.ShippingZipCode.value)=="") 
			{
				alert("Shipping zip code Cannot Be Left Blank");
				document.reorder.ShippingZipCode.focus();
				return false;
			}
*/
	if ((document.reorder.ccard_no.value)=="") 
			{
				alert("Shipping Name Cannot Be Left Blank");
				document.reorder.ccard_no.focus();
				return false;
			}
	if (isNaN(document.reorder.ccard_no.value))
			{
				alert("Phone Cannot Be A Text Value");
				document.reorder.ccard_no.focus();	
				return false;
			}
	}
}


function emailvalidate2()
	{
		var email
		email=document.userinfo.useremail.value;
		if (email == "" || email.indexOf('@',0) == -1 || email.indexOf('.',0) == -1) 
			 {
			   alert ("Please enter a valid E-mail Address") ;
			   document.userinfo.useremail.focus();
				document.userinfo.useremail.select();
			   return false ;
			 }
		if ((document.userinfo.userpassword.value)=="")
		{
			alert("Password Value Cannot Be Left Blank");
			document.userinfo.userpassword.focus();
			return false ;
		}

       if ((document.userinfo.userpassword1.value)=="")
		{
			alert("Please Confirm your Password");
			document.userinfo.userpassword1.focus();
			return false ;
		}
	}

	function guestsignin()
	{
		if ((document.guestbook.Name.value)=="")
		{
			alert("Name field Cannot Be Left Blank");
			document.guestbook.Name.focus();
			return false ;
		}

        var email
		email=document.guestbook.Email.value;
		if (email == "" || email.indexOf('@',0) == -1 || email.indexOf('.',0) == -1) 
			 {
			   alert ("Please enter a valid E-mail Address") ;
			   document.guestbook.Email.focus();
				document.guestbook.Email.select();
			   return false ;
			 }
   
   if ((document.guestbook.City.value)=="")
		{
			alert("Please Enter City Name");
			document.guestbook.City.focus();
			return false ;
		}

	}

	
function ValidateForm()
{
if (search.price1.value == "")
 {
  alert("Please Enter Price1");
  search.price1.focus();
  return false;
 }
 else
  {
   var telvalue;
   telvalue = search.price1.value;
   if(!IsNumeric(telvalue))
    {
     alert("Price Should be Numeric");
	 search.price1.value="";
	 search.price1.focus();
     return false;
    }
  }


if (search.price2.value == "")
 {
  alert("Please Enter Price2");
  search.price2.focus();
  return false;
 }
 else
  {
   var telvalue;
   telvalue = search.price2.value;
   if(!IsNumeric(telvalue))
    {
     alert("Price Should be Numeric");
	 search.price2.value="";
	 search.price2.focus();
     return false;
    }
  }
}

function IsNumeric(sText)
 {
    var ValidChars = "0123456789";
    var IsNumber=true;
    var Char;
 
  for (i = 0; i < sText.length && IsNumber == true; i++) 
    { 
		Char = sText.charAt(i); 
    if (ValidChars.indexOf(Char) == -1) 
		{
			IsNumber = false;
		}
    }
return IsNumber;
}



function copybillold()
{
	document.reorder.ship_name.value=document.reorder.bill_name.value;
	document.reorder.ship_co.value=document.reorder.bill_co.value;
	document.reorder.ship_ph.value=document.reorder.bill_ph.value;
	document.reorder.ship_add.value=document.reorder.bill_add.value;
	document.reorder.ship_add1.value=document.reorder.bill_add1.value;
	document.reorder.ship_city.value=document.reorder.bill_city.value;
	document.reorder.ship_reg.value=document.reorder.bill_reg.value;
	document.reorder.ship_pcode.value=document.reorder.bill_pcode.value;
}
function openpop()
{
	window.open("creditcard.htm","cidinfo","toolbar=no,scrollbars=yes,width=650,height=500,top=80,left=80");
}

function copybill()
{
	document.reorder.ShippingName.value=document.reorder.BillingName.value;
	document.reorder.ShippingCompanyName.value=document.reorder.BillingCompanyName.value;
	document.reorder.ShippingPhone.value=document.reorder.BillingPhone.value;
	document.reorder.ShippingAddress1.value=document.reorder.BillingAddress1.value;
	//document.reorder.ShippingAddress2.value=document.reorder.BillingAddress2.value;
	document.reorder.ShippingCity.value=document.reorder.BillingCity.value;
	document.reorder.ShippingRegion.value=document.reorder.BillingRegion.value;
	document.reorder.ShippingZipCode.value=document.reorder.BillingZipCode.value;
	document.reorder.ShippingState.value=document.reorder.BillingState.value;
}

function showdetails(id)
{
	var url = "info.asp?prodid="+id;
	
	//var win = "width=300,height=300,top=300,left=500,toolbar=no,menubar=no,location=0,status=0,scrollbars=no,resizable=no";
	var win = " width=300,height=300,top=300,left=500";
	alert(url+','+win);
	window.open(url, win);
}




//--- Right Click Disable Function Starts here -----------

 //Set the message for the alert box
am = "Right click is disabled!";
 
 //do not edit below this line
// ===========================
bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"
bFF = navigator.appName=="Firefox"
 
function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
   else if (bFF && (event.button >1)) {
     alert(am)
     return false;
   }
}
 
document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
 
//--- Right Click Disable Function ends here -----------


function buynow(id)
{
	var path = "add-cart.asp?Types=flower&command=ADD&id="+id;
	window.opener.location= path;
	window.close();
}


//----- Forgot Password Starts------------------
function ckeckmail()
{
if (ForgotPassword.email.value == "")
 {
  alert("Please Enter Email Address");
  ForgotPassword.email.focus();
  return false;
 }
 
if (ForgotPassword.email.value == "" || ForgotPassword.email.value.indexOf('@',0) == -1 || ForgotPassword.email.value.indexOf('.',0) == -1) 
  {
    alert ("Please enter a valid E-mail Address") ;
    ForgotPassword.email.focus() ;
    return false ;
  }
}

//---------- Forgot Password ends -------------



function Validatecontactus()
{
if (Contact.name.value == "")
 {
  alert("Please Enter Your Name");
  Contact.name.focus();
  return false;
 }
 
if (Contact.email.value == "")
 {
  alert("Please Enter Email Address");
  Contact.email.focus();
  return false;
 }
 
if (Contact.email.value == "" || Contact.email.value.indexOf('@',0) == -1 || Contact.email.value.indexOf('.',0) == -1) 
  {
    alert ("Please enter a valid E-mail Address") ;
    Contact.email.focus() ;
    return false ;
  }

if (Contact.address.value == "")
 {
  alert("Please Enter Your address");
  Contact.address.focus();
  return false;
 }

if (Contact.phone.value == "")
 {
  alert("Please Enter Your Phone");
  Contact.phone.focus();
  return false;
 }
return true;
}

function doClock(){ // By Paul Davis - www.kaosweaver.com
  var t=new Date(),a=doClock.arguments,str="",i,a1,lang="1";
  var month=new Array('January','Jan', 'February','Feb', 'March','Mar', 'April','Apr', 'May','May', 'June','Jun', 'July','Jul', 'August','Aug', 'September','Sep', 'October','Oct', 'November','Nov', 'December','Dec');
  var tday= new Array('Sunday','Sun','Monday','Mon', 'Tuesday','Tue', 'Wednesday','Wed','Thursday','Thr','Friday','Fri','Saturday','Sat');
  for(i=0;i<a.length;i++) {a1=a[i].charAt(1);switch (a[i].charAt(0)) {
  case "M":if  ((Number(a1)==3) && ((t.getMonth()+1)<10)) str+="0";
  str+=(Number(a1)>1)?t.getMonth()+1:month[t.getMonth()*2+Number(a1)];break;
  case "D": if ((Number(a1)==1) && (t.getDate()<10)) str+="0";str+=t.getDate();break;
  case "Y": str+=(a1=='0')?t.getFullYear():t.getFullYear().toString().substring(2);break;
  case "W":str+=tday[t.getDay()*2+Number(a1)];break; default: str+=unescape(a[i]);}}
  return str;
}

function mytime()
{
 var currentTime = new Date();
 var sec = currentTime.getSeconds();
 var hours = currentTime.getHours();
 var minutes = currentTime.getMinutes();
 
 if (minutes < 10)
 minutes = "0" + minutes;
 
 document.write(hours + ":" + minutes + ":" + sec + " ");
 if(hours > 11){
 document.write("PM");
 } else {
 document.write("AM");
 }
}