function ConfirmChoice() 

{ 

answer = confirm("Sure to do Delete this Record?")

if (answer == true) 

{ 

return true;
}
else
{
return false;
}
}


function validcp()
{
	

	
	if(document.frm.name.value == "")
	{ alert("Please Specify name "); document.frm.name.focus(); return false; }
	
		var reg1 = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var emailCheck =	document.frm.emailid.value; 
	if(reg1.test(emailCheck) == false)
	{ alert("Invalid email address"); document.frm.emailid.focus(); return false;
	}
	if(document.frm.remarks.value == "")
	{ alert("Please Specify remarks "); document.frm.remarks.focus(); return false; }
}


function validforgot()
{
	

	
	
		var reg1 = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var emailCheck =	document.frm.emailid.value; 
	if(reg1.test(emailCheck) == false)
	{ alert("Invalid email address"); document.frm.emailid.focus(); return false;
	}

}


function validlogin()
{
	

	
	
		var reg1 = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var emailCheck =	document.frm.emailid_h.value; 
	if(reg1.test(emailCheck) == false)
	{ alert("Invalid email address"); document.frm.emailid_h.focus(); return false;
	}
 if(document.getElementById("password_h").value == "")
			  {
			  alert("Password cannot be Blank!");
			  document.frm.password_h.focus();
			  return false;
			  }	  
				  
}






  function validreg_admin()
			  {
				  
			
			 var reg1 = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var emailCheck =	document.frm.emailid.value; 
	if(reg1.test(emailCheck) == false)
	{ alert("Invalid email address"); document.frm.emailid.focus(); return false;
	}
			  
			   if(document.getElementById("password").value == "")
			  {
			  alert("Password cannot be Blank!");
			  document.frm.password.focus();
			  return false;
			  }
			     if(document.getElementById("password1").value == "")
			  {
			  alert("Confirm Password cannot be Blank!");
			  document.frm.password1.focus();
			  return false;
			  }
			       if(document.getElementById("password").value != document.getElementById("password1").value)
			  {
			  alert("Please confirm password again!");
			  document.frm.password1.focus();
			  return false;
			  }
			  
			
			  }
			  



function validcu_admin()
			  {
				  
			 if(document.getElementById("title").value == "")
			  {
			  alert("Title cannot be Blank!");
			  document.frm.title.focus();
			  return false;
			  }	  
			  
			   if(document.getElementById("category").value == "")
			  {
			  alert("Category cannot be Blank! Please choose a category first");
			  
			  return false;
			  }	  
			  
			  }






			  function validreg()
			  {
				  
			 if(document.getElementById("first_name").value == "")
			  {
			  alert("First Name cannot be Blank!");
			  document.frm.first_name.focus();
			  return false;
			  }	  
				  
				  
				   if(document.getElementById("last_name").value == "")
			  {
			  alert("Last Name cannot be Blank!");
			  document.frm.last_name.focus();
			  return false;
			  }	  
			 var reg1 = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var emailCheck =	document.frm.emailid.value; 
	if(reg1.test(emailCheck) == false)
	{ alert("Invalid email address"); document.frm.emailid.focus(); return false;
	}
			  
			   if(document.getElementById("password").value == "")
			  {
			  alert("Password cannot be Blank!");
			  document.frm.password.focus();
			  return false;
			  }
			     if(document.getElementById("password1").value == "")
			  {
			  alert("Confirm Password cannot be Blank!");
			  document.frm.password1.focus();
			  return false;
			  }
			       if(document.getElementById("password").value != document.getElementById("password1").value)
			  {
			  alert("Please confirm password again!");
			  document.frm.password1.focus();
			  return false;
			  }
			  
			
			 
			  if(document.getElementById("address").value == "")
			  {
			  alert("Shipping Address cannot be Blank!");
			  document.frm.address.focus();
			  return false;
			  }
			  if(document.getElementById("city").value == "")
			  {
			  alert("Shipping City cannot be Blank!");
			  document.frm.city.focus();
			  return false;
			  }
			  if(document.getElementById("state").value == "")
			  {
			  alert("Shipping State cannot be Blank!");
			  document.frm.state.focus();
			  return false;
			  }
			   if(document.getElementById("zipcode").value == "")
			  {
			  alert("Shipping zipcode cannot be Blank!");
			  document.frm.zipcode.focus();
			  return false;
			  }
			  if(document.getElementById("country").value == "")
			  {
			  alert("Shipping country cannot be Blank!");
			  document.frm.country.focus();
			  return false;
			  }
			 
			  
			  if(document.getElementById("saddress").value == "")
			  {
			  alert("Billing Address cannot be Blank!");
			  document.frm.saddress.focus();
			  return false;
			  }
			  if(document.getElementById("scity").value == "")
			  {
			  alert("Billing City cannot be Blank!");
			  document.frm.scity.focus();
			  return false;
			  }
			  if(document.getElementById("sstate").value == "")
			  {
			  alert("Billing State cannot be Blank!");
			  document.frm.sstate.focus();
			  return false;
			  }
			  if(document.getElementById("szipcode").value == "")
			  {
			  alert("Billing zipcode cannot be Blank!");
			  document.frm.szipcode.focus();
			  return false;
			  }
			  if(document.getElementById("scountry").value == "")
			  {
			  alert("Billing country cannot be Blank!");
			  document.frm.scountry.focus();
			  return false;
			  }
			  
			  if(document.getElementById("phoneno").value == "")
			  {
			  alert("Telephone No cannot be Blank!");
			  document.frm.phoneno.focus();
			  return false;
			  }
			  
			   if(document.getElementById("mobileno").value == "")
			  {
			  alert("Mobile No cannot be Blank!");
			  document.frm.mobileno.focus();
			  return false;
			  }
			  }
			  
			   function validprof()
			  {
				  
			 if(document.getElementById("first_name").value == "")
			  {
			  alert("First Name cannot be Blank!");
			  document.frm.first_name.focus();
			  return false;
			  }	  
				  
				  
				   if(document.getElementById("last_name").value == "")
			  {
			  alert("Last Name cannot be Blank!");
			  document.frm.last_name.focus();
			  return false;
			  }	  
 
			   if(document.getElementById("password").value == "")
			  {
			  alert("Password cannot be Blank!");
			  document.frm.password.focus();
			  return false;
			  }
			     if(document.getElementById("password1").value == "")
			  {
			  alert("Confirm Password cannot be Blank!");
			  document.frm.password1.focus();
			  return false;
			  }
			       if(document.getElementById("password").value != document.getElementById("password1").value)
			  {
			  alert("Please confirm password again!");
			  document.frm.password1.focus();
			  return false;
			  }
			  
			
			 
			  if(document.getElementById("address").value == "")
			  {
			  alert("Shipping Address cannot be Blank!");
			  document.frm.address.focus();
			  return false;
			  }
			  if(document.getElementById("city").value == "")
			  {
			  alert("Shipping City cannot be Blank!");
			  document.frm.city.focus();
			  return false;
			  }
			  if(document.getElementById("state").value == "")
			  {
			  alert("Shipping State cannot be Blank!");
			  document.frm.state.focus();
			  return false;
			  }
			   if(document.getElementById("zipcode").value == "")
			  {
			  alert("Shipping zipcode cannot be Blank!");
			  document.frm.zipcode.focus();
			  return false;
			  }
			  if(document.getElementById("country").value == "")
			  {
			  alert("Shipping country cannot be Blank!");
			  document.frm.country.focus();
			  return false;
			  }
			 
			  
			  if(document.getElementById("saddress").value == "")
			  {
			  alert("Billing Address cannot be Blank!");
			  document.frm.saddress.focus();
			  return false;
			  }
			  if(document.getElementById("scity").value == "")
			  {
			  alert("Billing City cannot be Blank!");
			  document.frm.scity.focus();
			  return false;
			  }
			  if(document.getElementById("sstate").value == "")
			  {
			  alert("Billing State cannot be Blank!");
			  document.frm.sstate.focus();
			  return false;
			  }
			  if(document.getElementById("szipcode").value == "")
			  {
			  alert("Billing zipcode cannot be Blank!");
			  document.frm.szipcode.focus();
			  return false;
			  }
			  if(document.getElementById("scountry").value == "")
			  {
			  alert("Billing country cannot be Blank!");
			  document.frm.scountry.focus();
			  return false;
			  }
			  
			  if(document.getElementById("phoneno").value == "")
			  {
			  alert("Telephone No cannot be Blank!");
			  document.frm.phoneno.focus();
			  return false;
			  }
			  
			   if(document.getElementById("mobileno").value == "")
			  {
			  alert("Mobile No cannot be Blank!");
			  document.frm.mobileno.focus();
			  return false;
			  }
			  }
			  
			  
			  
	 function validcart()
			  {
				  
			 if(document.getElementById("first_name").value == "")
			  {
			  alert("First Name cannot be Blank!");
			  document.frm.first_name.focus();
			  return false;
			  }	  
				  
				  
				   if(document.getElementById("last_name").value == "")
			  {
			  alert("Last Name cannot be Blank!");
			  document.frm.last_name.focus();
			  return false;
			  }	  
 
			
			 
			  if(document.getElementById("address").value == "")
			  {
			  alert("Shipping Address cannot be Blank!");
			  document.frm.address.focus();
			  return false;
			  }
			  if(document.getElementById("city").value == "")
			  {
			  alert("Shipping City cannot be Blank!");
			  document.frm.city.focus();
			  return false;
			  }
			  if(document.getElementById("state").value == "")
			  {
			  alert("Shipping State cannot be Blank!");
			  document.frm.state.focus();
			  return false;
			  }
			   if(document.getElementById("zipcode").value == "")
			  {
			  alert("Shipping zipcode cannot be Blank!");
			  document.frm.zipcode.focus();
			  return false;
			  }
			  if(document.getElementById("country").value == "")
			  {
			  alert("Shipping country cannot be Blank!");
			  document.frm.country.focus();
			  return false;
			  }
			 
			  
			  if(document.getElementById("saddress").value == "")
			  {
			  alert("Billing Address cannot be Blank!");
			  document.frm.saddress.focus();
			  return false;
			  }
			  if(document.getElementById("scity").value == "")
			  {
			  alert("Billing City cannot be Blank!");
			  document.frm.scity.focus();
			  return false;
			  }
			  if(document.getElementById("sstate").value == "")
			  {
			  alert("Billing State cannot be Blank!");
			  document.frm.sstate.focus();
			  return false;
			  }
			  if(document.getElementById("szipcode").value == "")
			  {
			  alert("Billing zipcode cannot be Blank!");
			  document.frm.szipcode.focus();
			  return false;
			  }
			  if(document.getElementById("scountry").value == "")
			  {
			  alert("Billing country cannot be Blank!");
			  document.frm.scountry.focus();
			  return false;
			  }
			  
			  if(document.getElementById("phoneno").value == "")
			  {
			  alert("Telephone No cannot be Blank!");
			  document.frm.phoneno.focus();
			  return false;
			  }
			  
			   if(document.getElementById("mobileno").value == "")
			  {
			  alert("Mobile No cannot be Blank!");
			  document.frm.mobileno.focus();
			  return false;
			  }
			  }		  
			  
			  
			  
			  
			  
			  
			  
			  	  
			  
	 function validcart_nosess()
			  {
				  
			 if(document.getElementById("first_name").value == "")
			  {
			  alert("First Name cannot be Blank!");
			  document.frm.first_name.focus();
			  return false;
			  }	  
				  
				  
				   if(document.getElementById("last_name").value == "")
			  {
			  alert("Last Name cannot be Blank!");
			  document.frm.last_name.focus();
			  return false;
			  }	  
 
			var reg1 = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var emailCheck =	document.frm.emailid.value; 
	if(reg1.test(emailCheck) == false)
	{ alert("Invalid email address"); document.frm.emailid.focus(); return false;
	}
			 
			  if(document.getElementById("address").value == "")
			  {
			  alert("Shipping Address cannot be Blank!");
			  document.frm.address.focus();
			  return false;
			  }
			  if(document.getElementById("city").value == "")
			  {
			  alert("Shipping City cannot be Blank!");
			  document.frm.city.focus();
			  return false;
			  }
			  if(document.getElementById("state").value == "")
			  {
			  alert("Shipping State cannot be Blank!");
			  document.frm.state.focus();
			  return false;
			  }
			   if(document.getElementById("zipcode").value == "")
			  {
			  alert("Shipping zipcode cannot be Blank!");
			  document.frm.zipcode.focus();
			  return false;
			  }
			  if(document.getElementById("country").value == "")
			  {
			  alert("Shipping country cannot be Blank!");
			  document.frm.country.focus();
			  return false;
			  }
			 
			  
			  if(document.getElementById("saddress").value == "")
			  {
			  alert("Billing Address cannot be Blank!");
			  document.frm.saddress.focus();
			  return false;
			  }
			  if(document.getElementById("scity").value == "")
			  {
			  alert("Billing City cannot be Blank!");
			  document.frm.scity.focus();
			  return false;
			  }
			  if(document.getElementById("sstate").value == "")
			  {
			  alert("Billing State cannot be Blank!");
			  document.frm.sstate.focus();
			  return false;
			  }
			  if(document.getElementById("szipcode").value == "")
			  {
			  alert("Billing zipcode cannot be Blank!");
			  document.frm.szipcode.focus();
			  return false;
			  }
			  if(document.getElementById("scountry").value == "")
			  {
			  alert("Billing country cannot be Blank!");
			  document.frm.scountry.focus();
			  return false;
			  }
			  
			  if(document.getElementById("phoneno").value == "")
			  {
			  alert("Telephone No cannot be Blank!");
			  document.frm.phoneno.focus();
			  return false;
			  }
			  
			   if(document.getElementById("mobileno").value == "")
			  {
			  alert("Mobile No cannot be Blank!");
			  document.frm.mobileno.focus();
			  return false;
			  }
			  }		  
			  
			  
function fill_ship(check_value){

  if(document.getElementById("shippingcheck").checked==true){
  
    
	 document.getElementById("saddress").value=document.getElementById("address").value
	 document.getElementById("szipcode").value=document.getElementById("zipcode").value
	 document.getElementById("scity").value=document.getElementById("city").value
	 document.getElementById("sstate").value=document.getElementById("state").value

	   document.getElementById("scountry").value=document.getElementById("country").value
	 
	 }
  
  }

			  
	