// JavaScript Document
<!--validation for User_registration start-->
function check(){

	with(window.document.userinfo){
	if(userid.value==""){
		alert("Enter User Id !");
		userid.focus();
		return false;

	}
	if(password.value==""){
		alert("Enter Password !");
		password.focus();
		return false;}
		
		if(title.selectedIndex=='0')		
		    {
			alert("Please Choose Title !");
			title.focus();
			return(false);
			}

	if(fname.value==""){
		alert("Enter First Name !");
		fname.focus();
		return false;

	}

	if(lname.value==""){
		alert("Enter Last Name !");
		lname.focus();
		return false;

	}
	
		    if(email.value=="")		
		    {
			alert("Please Enter Email Id !");
			email.focus();
			return(false);
			}
			
	
  var str = new String(email.value);
  var isOK = true;
  rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/
  if( rExp.test(str) )
    isOK = false;
  if( str.indexOf('.') == -1 || str.indexOf('@') == -1 )
    isOK = false;
  if( str.slice(str.lastIndexOf('.')+1,str.length).length < 2 )
    isOK = false;
  if( str.slice(0,str.indexOf('@')).length < 1 )
    isOK = false;
  if( str.slice(str.indexOf('@')+1,str.lastIndexOf('.')).length < 1 )
    isOK = false;

  if( !isOK )
    alert( "Invalid email address" );

  return isOK;
  return false;


   if(telephone.value=="")
{
alert("Please Enter phone Number ");
telephone.focus();
return false;
}
var string=telephone.value;
var l=string.length;

if(l<10)
	{
	alert("Enter Correct Phone Number");
	telephone.focus();
	return false;
	}
    if(l>10)
	{
	alert("Enter Correct Phone Number");
	telephone.focus();
	return false;	
	}
	
if(isNaN(string))
 {
	alert(" Phone Number is not valid Enter valid Phone Number");
	telephone.focus();
    return false;
	}
		if(address.value==""){
		alert("Enter Address !");
		address.focus();
		return false;

	}
		if(city.value==""){
		alert("Enter City !");
		city.focus();
		return false;

	}
	if(state.value==""){
		alert("Enter State!");
		state.focus();
		return false;

	}
	if(country.value==""){
		alert("Enter Country !");
		country.focus();
		return false;

	}
	
	if(postcode.value==""){
		alert("Enter postal code !");
		postcode.focus();
		return false;

	}
    var st=postcode.value;

	
	if(isNaN(st))
	 {
	alert("PIN/ZIP  not numeric ,Enter Valid PIN/ZIP Code !");
	postcode.focus();
	return false;
	}
	

<!--CODE START FOR SHIPPN INFORMATION-->
	if(shipaddress.value==""){
		alert("Enter your  shipping Address !");
		shipaddress.focus();
		return false;

	}

	if(shipcity.value==""){
		alert("Enter Shipping City Name !");
		shipcity.focus();
		return false;
          }
		  
		   if(shipstate.value==""){
		alert("Enter Shipping state !");
		shipstate.focus();
		return false;
         }
	if(shipcountry.value==""){
		alert("Enter Shipping Country name  here");
		shipcountry.focus();
		return false;
       }
	if(shippostcode.value==""){
		alert("Enter Postal Code !");
		shippostcode.focus();
		return false;

	}
	var st1=shippostcode.value;
	if(isNaN(st1))
	 {
	alert("PIN/ZIP  not numeric, Enter Valid PIN/ZIP Code !");
	shippostcode.focus();
	return false;
	}

if(shiptelephone.value=="")
{
alert("Please Enter Phone Number ");
shiptelephone.focus();
return false;
}
var string=shiptelephone.value;
var l=string.length;

if(l<10)
	{
	alert("Enter Correct Phone Number");
	shiptelephone.focus();
	return false;
	}
    if(l>10)
	{
	alert("Enter Correct Phone Number");
	shiptelephone.focus();
	return false;	
	}
	
if(isNaN(string))
 {
	alert("Phone Number is not valid Enter Valid Phone Number");
	shiptelephone.focus();
    return false;
	}
    <!--CODE END FOR SHIPPN INFORMATION-->
	 
  if (terms.checked == false )
    {
        alert ( "Please check the Terms & Conditions box." );
        valid = false;
    }

}
}

        <!--validation for USER REGISTRATION FORM  End-->
		<!--SAME SHIPPING ADDRESS VALIDATI CODE START -->
		function setPaymentInfo(isChecked)
{
	with (window.document.userinfo) {
		if (isChecked) {
			
			shipaddress.value=address.value;
			shipcity.value   = city.value;
			shipstate.value       = state.value;
			shipcountry.value      = country.value;	
			shippostcode.value      = postcode.value;
			shiptelephone.value     =telephone.value;		
			
			
			
			shipaddress.readOnly  = true;
			shipcity.readOnly   = true;
			shipstate.readOnly       = true;
			shipcountry.readOnly      = true;		
			shippostcode.readOnly      = true;
			shiptelephone.readOnly      = true;
			
				
		} else {
			shipaddress.readOnly  = false;
			shipcity.readOnly   = false;
			shipstate.readOnly       = false;
			shipcountry.readOnly      = false;
			shippostcode.readOnly      = false;
		    shiptelephone.readOnly     = false;
		}
	}
}
<!--SAME SHIPPING ADDRESS VALIDATI CODE END -->		


<!--delete Confirmations start-->
			function confirm_delete(){
			// alert("nsdhjsdfjskdsk");
			var input=confirm(" Are you sure you want to delete");
			if(input==true){
			return true;
			 }else{ 
			return false;
			}
			 }
	
<!--delete Confirmations end-->	

<!--CONTACT US FORM VALIDATION START-->
function check1(){
    with(window.document.contactus){
	if(name.value==""){
		alert("Enter Name !");
		name.focus();
		return false;
		}
		 if(email.value=="")		
		    {
			alert("Please Enter Email Id !");
			email.focus();
			return(false);
			}
			
	
		  var str = new String(email.value);
		  var isOK = true;
		  rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/
		  if( rExp.test(str) )
			isOK = false;
		  if( str.indexOf('.') == -1 || str.indexOf('@') == -1 )
			isOK = false;
		  if( str.slice(str.lastIndexOf('.')+1,str.length).length < 2 )
			isOK = false;
		  if( str.slice(0,str.indexOf('@')).length < 1 )
			isOK = false;
		  if( str.slice(str.indexOf('@')+1,str.lastIndexOf('.')).length < 1 )
			isOK = false;
		
		  if( !isOK ){
			alert( "Invalid email address" );
		    email.focus();
		  return isOK;
		  return false;
		  }
		  if(contact.value=="")
{
alert("Please Enter Contact Number ");
contactno.focus();
return false;
}
var string=contact.value;
var l=string.length;

if(l<10)
	{
	alert("Enter Correct Contact Number");
	contactno.focus();
	return false;
	}
    if(l>15)
	{
	alert("Enter Correct contactno Number");
	contactno.focus();
	return false;	
	}
	
if(isNaN(string))
 {
	alert("Contact Number is not valid Enter valid Contact Number");
	contactno.focus();
    return false;
	}
	if(query.value=="")		
		    {
			alert("Please Enter Your Query !");
			query.focus();
			return(false);
			}
	}
}
<!--CONTACT US FORM VALIDATION END-->
<!--FEEDBACK FORM VALIDATION START-->
function check2(){

	with(window.document.feedback){
		
	if(name.value==""){
		alert("Enter Submitted By !");
		name.focus();
		return false;
		}
		 if(email.value=="")		
		    {
			alert("Please Enter Email Id !");
			email.focus();
			return(false);
			}
		  var str = new String(email.value);
		  var isOK = true;
		  rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/
		  if( rExp.test(str) )
			isOK = false;
		  if( str.indexOf('.') == -1 || str.indexOf('@') == -1 )
			isOK = false;
		  if( str.slice(str.lastIndexOf('.')+1,str.length).length < 2 )
			isOK = false;
		  if( str.slice(0,str.indexOf('@')).length < 1 )
			isOK = false;
		  if( str.slice(str.indexOf('@')+1,str.lastIndexOf('.')).length < 1 )
			isOK = false;
		
		  if( !isOK ){
			alert( "Invalid email address" );
			email.focus();
		  return isOK;
		  return false;}
		if(query.value==""){
		alert("Enter Feedback !");
		query.focus();
		return false;
		}
		  
	}
}
<!--FEEDBACK FORM VALIDATION END-->
<!--Track My ORDER FORM VALIDATION START-->
function check3(){

	with(window.document.track_order){
		
	if(name.value==""){
		alert("Enter Order Id !");
		name.focus();
		return false;
		}
	}
}
<!--Track My ORDER FORM VALIDATION END-->		

<!--pop1user  "START"-->
function popUpcolor(page,PWidth,PHeight,id) {
 eval("OneChoiceImaging"+id+"=window.open('"+page+"','OneChoiceImaging','toolbar=0,scrollbars=1,location=no,status=no,menubars=no,resizable=0,width="+PWidth+",height="+PHeight+",left=400,top=250')")

}
<!--pop1user  "END"-->

     <!--LOGIN USER "START"-->
      //function check12(){
     //alert("hsgdjshdj");
	//with(window.document.login){
//		
//	if(user.value==""){
//		alert("Enter User Id !");
//		user.focus();
//		return false;
//
//	}
//	if(password.value==""){
//		alert("Enter Password !");
//		password.focus();
//		return false;} 
//	}
	  //}
     <!--LOGIN USER "END"-->
<!--Validatio CODE FOR SEARCH "START"-->
 function check_search(){

	with(window.document.search_frm){
	//alert("sdhfjhdjkfhdh");	
	if(search1.value==""){
		
		alert("Enter Keyword !");
		search1.focus();
		return false;
		}
	if(category.selectedIndex=='0')		
	  {
		alert("Please Choose Any One Category !");
		category.focus();
		return(false);
		}
	}
 }
 <!--Validatio CODE FOR SEARCH "END"-->
 <!--Validation check NEWSLETTER IN FRONT SIDE "START"-->
// function check_news1(){
//
//	with(window.document.newsletter){
//		
//	if(name.value==""){
//		alert("Enter Name !");
//		name.focus();
//		return false;
//		}
//		 if(email.value=="")		
//		    {
//			alert("Please Enter Email Id !");
//			email.focus();
//			return(false);
//			}
//		  var str = new String(email.value);
//		  var isOK = true;
//		  rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|¬`\/\[\]]/
//		  if( rExp.test(str) )
//			isOK = false;
//		  if( str.indexOf('.') == -1 || str.indexOf('@') == -1 )
//			isOK = false;
//		  if( str.slice(str.lastIndexOf('.')+1,str.length).length < 2 )
//			isOK = false;
//		  if( str.slice(0,str.indexOf('@')).length < 1 )
//			isOK = false;
//		  if( str.slice(str.indexOf('@')+1,str.lastIndexOf('.')).length < 1 )
//			isOK = false;
//		
//		  if( !isOK ){
//			alert( "Invalid email address" );
//			email.focus();
//		  return isOK;
//		  return false;}
//		}
//}
// 
 <!--Validation check NEWSLETTER IN FRONT SIDE "START"-->