function Trim(str)
{

  return LTrim(RTrim(str));

}


function LTrim(str)
{

  for (var i=0; str.charAt(i)==" "; i++)
  {
    str =  str.substring(i,str.length-1);
  }
  return str;
}


function RTrim(str)
{

  for (var i=str.length-1; str.charAt(i)==" "; i--)
  {  
    str = str.substring(0,i);
  }
  return str;
}


function enterRTrim(str)
{
var whitespace = new String(" \t\n\r");

   var s = new String(str);

   if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
      // We have a string with trailing blank(s)...

      var i = s.length - 1;       // Get length of string

      // Iterate from the far right of string until we
      // don't have any more whitespace...
      while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
         i--;


      // Get the substring from the front of the string to
      // where the last non-whitespace character is...
      s = s.substring(0, i+1);
   }

   return s;

}
function enterLTrim(str)
{
 var whitespace = new String(" \t\n\r");

   var s = new String(str);

   if (whitespace.indexOf(s.charAt(0)) != -1) {
      // We have a string with leading blank(s)...

      var j=0, i = s.length;

      // Iterate from the far left of string until we
      // don't have any more whitespace...
      while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
         j++;

      // Get the substring from the first non-whitespace
      // character to the end of the string...
      s = s.substring(j, i);
   }
   return s;

}
function enterTrim(str)
{
return enterRTrim(enterLTrim(str));

}


function isNum(phone)
{
 var reNum=/^[0-9\-]+$/;
	if(!reNum.test(phone))
	{
		return false;
	}
		return true;
}
function isNumeric(elem){
	var reNum=/^[0-9]+$/;
	if(!reNum.test(elem))
	{
		return false;
	}
		return true;
}
function isqty(elem){
	var reNum=/^[0-9]+$/;
	if(!reNum.test(elem))
	{
		return false;
	}
		return true;
}
function isusername(usename)
{
 var reNum=/^[a-zA-Z0-9\._@]+$/;
	if(!reNum.test(usename))
	{
		return false;
	}
		return true;
}
function isAlphabet(elem){
	var alphaExp = /^[a-zA-Z]+$/;
	
	if(!alphaExp.test(elem))
	{
	    return false;
		
	}
		return true;
	
}

function ismaxlength_textarea(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

function numbersonly(myfield, e, dec)
{
   var unicode=e.charCode? e.charCode : e.keyCode    
    if (unicode!=8 && unicode!=9)
    { //if the key isn't the backspace key (which we should allow)
   
        if (unicode<48||unicode>57)  //if not a number
        return false //disable key press
    } 
    return true;   
}

function validatePwd(fieldname) {
      //Initialise variables
        var errorMsg = "";
        var space = " ";
        //fieldname = document.myform.password;
        fieldvalue = fieldname;
        fieldlength = fieldvalue.length;

        //It must not contain a space
        if (fieldvalue.indexOf(space) > -1) {
            errorMsg += "\nPasswords cannot include a space.\n";
        }
        //It must contain at least one character     
        if (!((fieldvalue.match(/[A-Z]/)) || (fieldvalue.match(/[a-z]/)))) {
            errorMsg += "\nStrong passwords must include at least one character.\n";
        }
        //It must contain at least one number
        if (!(fieldvalue.match(/\d/))) {
            errorMsg += "\nStrong passwords must include at least one number.\n";
        }
        //It must be at least 7 characters long.
        if (!((fieldlength >= 7) && (fieldlength <= 16))) {
            errorMsg += "\nStrong passwords must be between 7-16 characters long.\n";
        }
        //If there is aproblem with the form then display an error
        if (errorMsg != "") {
           // msg="";
           // msg = "______________________________________________________\n\n";
           // msg += "Please correct the problem(s) with your trial password test it again.\n";
          //  msg += "______________________________________________________\n";
           // errorMsg += alert(msg + errorMsg + "\n\n");
           errorMsg += alert(errorMsg);
            return false;
        }
        return true;
    }

function submit_product(pid)
{
    var pid=pid;
    var productqty=productqty_validate(pid);
    var form_name="buy_now_"+pid;   
   if(productqty==true)
    {
     document.getElementById(form_name).action="./index.php?action=shopping&act=cartcontent&opt=add_product&ref=1";
     document.getElementById(form_name).submit();
    }
   if(productqty==false)
   {
        return false;
   }

}
function submit_product_buynow(pid)
{
    var pid=pid;
    var productqty=productqty_validate(pid);
    var form_name="buy_now_"+pid;   
   if(productqty==true)
    {
     document.getElementById(form_name).action="./index.php?action=shopping&act=cartcontent&opt=add_product&ref=0";
     document.getElementById(form_name).submit();
    }
   if(productqty==false)
   {
        return false;
   }

}

function productqty_validate(pid)
	{
	        var field_name="products_qty_"+pid;
	        if(RTrim(document.getElementById(field_name).value)=="")
                {
                    alert("Please enter product qty");
                    document.getElementById(field_name).focus();
                    document.getElementById(field_name).value="";
                    return false;
                }
                
                
                if(((document.getElementById(field_name).value)=="0") || ((document.getElementById(field_name).value)=="00"))
                {
                    alert("Please enter correct product qty");
                    document.getElementById(field_name).focus();
                    document.getElementById(field_name).value="";
                    return false;
                }
                
              if(!isqty(document.getElementById(field_name).value))
			  {
				alert("Please enter correct product qty");
				document.getElementById(field_name).focus();
				return false;
			 }
                
                
	return true;
	}
	
function cust_accounteditvalid()
{
        invalid =" ";
		/*
        var radio_choice = false;
        for (counter = 0; counter < document.frm_accountedit.customer_gender.length; counter++)
        {
        if (document.frm_accountedit.customer_gender[counter].checked)
        radio_choice = true; 
        }

        if (!radio_choice)
        {
        alert("Please choose a gender type.")
        return (false);
        }
   */           

    if(RTrim(document.frm_accountedit.customer_fname.value)=="")
        {
            alert("Please enter first name");
            document.frm_accountedit.customer_fname.focus();
            return false;
        }
      if(RTrim(document.frm_accountedit.customer_lname.value)=="")
        {
            alert("Please enter last name");
            document.frm_accountedit.customer_lname.focus();
            return false;
        }
		/*
        if(RTrim(document.frm_accountedit.customer_dob.value)=="0000-00-00 00:00:00")
        {
            alert("Please Select data of birth");
            document.frm_accountedit.customer_dob.focus();
            return false;
        }
        if(RTrim(document.frm_accountedit.customer_dob.value)=="")
        {
            alert("Please Select data of birth");
            document.frm_accountedit.customer_dob.focus();
            return false;
        }
		*/
        if(RTrim(document.frm_accountedit.customer_email.value)=="")
        {
            alert("Please enter Email Id");
            document.frm_accountedit.customer_email.focus();
            return false;
        }
        if (document.frm_accountedit.customer_email.value != "")
		{
		        re=/\w{1,}/;
		        emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/ ; 
		        if(!(emailExp.test(document.frm_accountedit.customer_email.value)))
		        {
		        alert("Please Enter Correct Email Id");
		        document.frm_accountedit.customer_email.focus();
		        return false;
		        }
		}
        
       if(RTrim(document.frm_accountedit.customer_phoneno.value)=="")
        {
            alert("Please enter phone number");
            document.frm_accountedit.customer_phoneno.focus();
            return false;
        }
      if(RTrim(document.frm_accountedit.customer_phoneno.value)!="")
        {
            if(!isNum(document.frm_accountedit.customer_phoneno.value))
			  {
				alert("Please enter correct phone number");
				document.frm_accountedit.customer_phoneno.focus();
				return false;
			 }
        }
        if(RTrim(document.frm_accountedit.customer_faxno.value)!="")
        {
            if(!isNum(document.frm_accountedit.customer_faxno.value))
			  {
				alert("Please enter correct fax number");
				document.frm_accountedit.customer_faxno.focus();
				return false;
			 }
        }
       return true;
}

function addressbook_validate()
{
  
      var radio_choice = false;
       var invalid =" ";
       var counter;
        // Loop from zero to the one minus the number of radio button selections
        for (counter = 0; counter < document.frm_addbook.c_gender.length; counter++)
        {
          // If a radio button has been selected it will return true
        // (If not it will return false)
        if (document.frm_addbook.c_gender[counter].checked)
        radio_choice = true; 
        }

        if (!radio_choice)
        {
        // If there were no selections made display an alert box 
        alert("Please choose a gender type.")
        return false;
        }
              

    if(RTrim(document.frm_addbook.c_fname.value)=="")
        {
            alert("Please enter first name");
            document.frm_addbook.c_fname.focus();
            return false;
        }
      if(RTrim(document.frm_addbook.c_lname.value)=="")
        {
            alert("Please enter last name");
            document.frm_addbook.c_lname.focus();
            return false;
        }
        if(RTrim(document.frm_addbook.c_address1.value)=="")
        {
            alert("Please enter Address 1");
            document.frm_addbook.c_address1.focus();
            return false;
        }
       if(RTrim(document.frm_addbook.c_country.value)=="")
        {
            alert("Please select country name");
            document.frm_addbook.c_country.focus();
            return false;
        }
      if(RTrim(document.frm_addbook.c_phone.value)!="")
        {
            if(!isNum(document.frm_addbook.c_zipcode.value))
			  {
				alert("Please enter correct Post Code");
				document.frm_addbook.c_zipcode.focus();
				return false;
			 }
        }
      if(RTrim(document.frm_addbook.c_phone.value)=="")
        {
            alert("Please enter phone number");
            document.frm_addbook.c_phone.focus();
            return false;
        }
      if(RTrim(document.frm_addbook.c_phone.value)!="")
        {
            if(!isNum(document.frm_addbook.c_phone.value))
			  {
				alert("Please enter correct phone number");
				document.frm_addbook.c_phone.focus();
				return false;
			 }
        }
        
        if(RTrim(document.frm_addbook.c_fax.value)!="")
        {
            if(!isNum(document.frm_addbook.c_fax.value))
			  {
				alert("Please enter correct fax number");
				document.frm_addbook.c_fax.focus();
				return false;
			 }
        }
      
      
    return true;
}

function validate_password()
{
    var invalid = " ";
		if(RTrim(document.frm_pass.current_password.value)=="")
        {
            alert("Please enter the current password.");
            document.frm_pass.current_password.focus();
            return false;
        }
        if(RTrim(document.frm_pass.current_password.value)!=RTrim(document.frm_pass.oldpassword.value))
		{
		alert("Please enter the correct current password.");
		document.frm_pass.current_password.focus();
		return false;
		}	
        
        
       if(RTrim(document.frm_pass.new_password.value)=="")
        {
            alert("Please enter the new password ");
            document.frm_pass.new_password.focus();
            return false;
        }
        if (document.frm_pass.new_password.value.indexOf(invalid) > -1) {
			 alert( "Please enter valid password. Password should not contain white spaces at any place." );
			 document.frm_pass.new_password.focus();
            return false;
		 }
		 
		if(document.frm_pass.new_password.value!="")
        {
            if(!validatePwd(document.frm_pass.new_password.value))
            {
                 return false;
             }
        }
      if(RTrim(document.frm_pass.new_confpassword.value)=="")
        {
            alert("Please enter the confirm password");
            document.frm_pass.new_confpassword.focus();
            return false;
        }
       if(RTrim(document.frm_pass.new_password.value)!=RTrim(document.frm_pass.new_confpassword.value))
		{
		alert("Password and confirm password do not match. \n Please re-enter the passwords.!");
		document.frm_pass.new_confpassword.value="";
		document.frm_pass.new_confpassword.focus();
		return false;
		}	
	  return true;
}


	function create_account_validation()
{

        invalid =" ";
		/*
        var radio_choice = false;
        for (counter = 0; counter < document.frm_create_account.gender.length; counter++)
        {
       if (document.frm_create_account.gender[counter].checked)
        radio_choice = true; 
        }

        if (!radio_choice)
        {
        alert("Please choose a gender.")
        return (false);
        }
     */       

    if(RTrim(document.frm_create_account.firstname.value)=="")
        {
            alert("Please enter first name");
            document.frm_create_account.firstname.focus();
            return false;
        }
      if(RTrim(document.frm_create_account.lastname.value)=="")
        {
            alert("Please enter last name");
            document.frm_create_account.lastname.focus();
            return false;
        }
		/*
       if(RTrim(document.frm_create_account.dob.value)=="")
        {
            alert("Please Select Date of Birth");
            document.frm_create_account.dob.focus();
            return false;
        }
		*/
        if(RTrim(document.frm_create_account.email_address.value)=="")
        {
            alert("Please enter Email Id");
            document.frm_create_account.email_address.focus();
            return false;
        }
        if (document.frm_create_account.email_address.value != "")
		{
		        re=/\w{1,}/;
		        emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/ ; 
		        if(!(emailExp.test(document.frm_create_account.email_address.value)))
		        {
		        alert("Please Enter Correct Email Id");
		        document.frm_create_account.email_address.focus();
		        return false;
		        }
		}
        
        
        if(RTrim(document.frm_create_account.address1.value)=="")
        {
            alert("Please enter address1");
            document.frm_create_account.address1.focus();
            return false;
        } 
        
         if(RTrim(document.frm_create_account.postcode.value)=="")
        {
            alert("Please enter post code");
            document.frm_create_account.postcode.focus();
            return false;
        }
      if(RTrim(document.frm_create_account.postcode.value)!="")
        {
            if(!isNum(document.frm_create_account.postcode.value))
			  {
				alert("Please enter correct post code");
				document.frm_create_account.postcode.focus();
				return false;
			 }
        }
        if(RTrim(document.frm_create_account.country_create_account.value)=="")
        {
            alert("Please select country");
            document.frm_create_account.country_create_account.focus();
            return false;
        } 
       
        
        
      if(RTrim(document.frm_create_account.telephone.value)=="")
        {
            alert("Please enter phone number");
            document.frm_create_account.telephone.focus();
            return false;
        }
      if(RTrim(document.frm_create_account.telephone.value)!="")
        {
            if(!isNum(document.frm_create_account.telephone.value))
			  {
				alert("Please enter correct phone number");
				document.frm_create_account.telephone.focus();
				return false;
			 }
        }
        
        
        if(RTrim(document.frm_create_account.fax.value)!="")
        {
            if(!isNum(document.frm_create_account.fax.value))
			  {
				alert("Please enter correct fax number");
				document.frm_create_account.fax.focus();
				return false;
			 }
        }
                        
        if(RTrim(document.frm_create_account.password.value)=="")
        {
            alert("Please enter password ");
            document.frm_create_account.password.focus();
            return false;
        }
        if (document.frm_create_account.password.value.indexOf(invalid) > -1) {
			 alert( "Please enter valid password. Password should not contain white spaces at any place." );
			 document.frm_create_account.password.focus();
            return false;
		 }
		 
		if(RTrim(document.frm_create_account.password.value) !="")
        {
             if(!validatePwd(document.frm_create_account.password.value))
            {
                 return false;
            }
        }
      if(RTrim(document.frm_create_account.conf_password.value)=="")
        {
            alert("Please enter the password confirmation");
            document.frm_create_account.conf_password.focus();
            return false;
        }
       if(RTrim(document.frm_create_account.password.value)!=RTrim(document.frm_create_account.conf_password.value))
		{
		alert("Password and password confirmation do not match. \n Please re-enter the password confirmation.!");
		document.frm_create_account.conf_password.value="";
		document.frm_create_account.conf_password.focus();
		return false;
		}	
        
        /*
         if(document.getElementById("customer_count").value == '1')
                {           
                
                alert("Only one product can be featured.To make this product featured please make the previous product unfeatured");
                return false;
                }
        */
         
    return true;
}

function productqtyspecial_validate(speid)
	{
	        var field_name_spe="products_qty_"+speid;
	        if(RTrim(document.getElementById(field_name_spe).value)=="")
                {
                    alert("Please enter product qty");
                    document.getElementById(field_name_spe).focus();
                    document.getElementById(field_name_spe).value="";
                    return false;
                }
                
                if(((document.getElementById(field_name).value)=="0") || ((document.getElementById(field_name).value)=="00"))
                {
                    alert("Please enter correct product qty");
                    document.getElementById(field_name).focus();
                    document.getElementById(field_name).value="";
                    return false;
                }
                
                
              if(!isqty(document.getElementById(field_name_spe).value))
			  {
				alert("Please enter correct product qty");
				document.getElementById(field_name_spe).focus();
				return false;
			 }
                
                
	return true;
	}
	
function validate_shipping() {
        var radio_choice = false;
        for (var counter = 0; counter < document.frm_shipping.shipping.length; counter++)
        {
           if (document.frm_shipping.shipping[counter].checked)
            radio_choice = true; 
            }

        if (!radio_choice)
        {
        alert("Please choose shipping method.")
        return (false);
        }
                      
	return true;  
        
}
	
function contactus_validation()
{

        

    if(RTrim(document.contact.fullname.value)=="")
        {
            alert("Please enter full name");
            document.contact.fullname.focus();
            return false;
        }
     
        if(RTrim(document.contact.emailadd.value)=="")
        {
            alert("Please enter Email Id");
            document.contact.emailadd.focus();
            return false;
        }
        if (document.contact.emailadd.value != "")
		{
		        re=/\w{1,}/;
		        emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/ ; 
		        if(!(emailExp.test(document.contact.emailadd.value)))
		        {
		        alert("Please Enter Correct Email Id");
		        document.contact.emailadd.focus();
		        return false;
		        }
		}
        
             
      if(RTrim(document.contact.contactno.value)!="")
        {
            if(!isNum(document.contact.contactno.value))
			  {
				alert("Please enter correct contact number");
				document.contact.contactno.focus();
				return false;
			 }
        }
        
         if(enterTrim(document.contact.enquiry.value)=="")
        {
            alert("Please enter enquiry detail.");
            document.contact.enquiry.focus();
            return false;
        }
      	
    return true;
}


function search_validation()
{
   if(RTrim(document.frm_serchlist.prodkey.value)=="")
        {
            alert("Please Product Name");
            document.frm_serchlist.prodkey.focus();
            return false;
        }
       return true;
}
		
		function emailfriend_validation()
{

        

    if(RTrim(document.emailtofriend.y_name.value)=="")
        {
            alert("Please enter your name");
            document.emailtofriend.y_name.focus();
            return false;
        }
     
        if(RTrim(document.emailtofriend.y_email_id.value)=="")
        {
            alert("Please enter your Email Id");
            document.emailtofriend.y_email_id.focus();
            return false;
        }
        if (document.emailtofriend.y_email_id.value != "")
		{
		        re=/\w{1,}/;
		        emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/ ; 
		        if(!(emailExp.test(document.emailtofriend.y_email_id.value)))
		        {
		        alert("Please Enter Correct Email Id");
		        document.emailtofriend.y_email_id.focus();
		        return false;
		        }
		}
        
             
       if(RTrim(document.emailtofriend.f_name.value)=="")
        {
            alert("Please enter your friend name");
            document.emailtofriend.f_name.focus();
            return false;
        }
     
        if(RTrim(document.emailtofriend.f_email_id.value)=="")
        {
            alert("Please enter your friend Email Id");
            document.emailtofriend.f_email_id.focus();
            return false;
        }
        if (document.emailtofriend.f_email_id.value != "")
		{
		        re=/\w{1,}/;
		        emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/ ; 
		        if(!(emailExp.test(document.emailtofriend.f_email_id.value)))
		        {
		        alert("Please Enter Correct Email Id");
		        document.emailtofriend.f_email_id.focus();
		        return false;
		        }
		}
		if (document.emailtofriend.securityCode.value == '') {
		    alert('Please enter the security code');
		    return false;
	    } else if (document.emailtofriend.scode.value == 0) {
		    alert('Please enter the correct security code');
		    return false;
	    } 
      	
    return true;
}



function newsletter_subscribe()
{
//alert("----------");
if(RTrim(document.subscribe_newsletter.subscribe_email.value)=="")
        {
            alert("Please enter Email Id");
            document.subscribe_newsletter.subscribe_email.focus();
            return false;
        }
        if (document.subscribe_newsletter.subscribe_email.value != "")
		{
		        re=/\w{1,}/;
		        emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/ ; 
		        if(!(emailExp.test(document.subscribe_newsletter.subscribe_email.value)))
		        {
		        alert("Please Enter Correct Email Id");
		        document.subscribe_newsletter.subscribe_email.focus();
		        return false;
		        }
		}
		 return true;
}



 function contactValidate()
			{	
				

				 if(RTrim(document.contact_frm.customer_name.value)=="")
			    {
				alert("Please enter your name");
				document.contact_frm.customer_name.focus();
				return false;
			    }
		    
			if(RTrim(document.contact_frm.email.value)=="")
			    {
				alert("Please enter Email Id");
				document.contact_frm.email.focus();
				return false;
			    }
			if (document.contact_frm.email.value != "")
			    {
					re=/\w{1,}/;
					emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/ ; 
					if(!(emailExp.test(document.contact_frm.email.value)))
					{
					alert("Please Enter Correct Email Id");
					document.contact_frm.email.focus();
					return false;
					}
			    }
	       
	       
	       	if(RTrim(document.contact_frm.phone.value)=="")
			{
				alert("Please enter phone number");
				document.contact_frm.phone.focus();
				return false;
			}
			
		  if(RTrim(document.contact_frm.phone.value)!="")
			{
				if(!isNum(document.contact_frm.phone.value))
				  {
					alert("Please enter correct phone number");
					document.contact_frm.phone.focus();
					return false;
				 }
			}
			if (document.contact_frm.securityCode.value == '') {
				alert('Please enter the security code');
				return false;
			}
			else if (document.contact_frm.scode.value == 0) {
				alert('Please enter the correct security code');
				return false;
			} 

         }

	function enquiry_validation()
			{	
				

				 if(RTrim(document.frm_enquiry.cust_name.value)=="")
			    {
				alert("Please enter your name");
				document.frm_enquiry.cust_name.focus();
				return false;
			    }
		    
			if(RTrim(document.frm_enquiry.cust_mail.value)=="")
			    {
				alert("Please enter Email Id");
				document.frm_enquiry.cust_mail.focus();
				return false;
			    }
			if (document.frm_enquiry.cust_mail.value != "")
			    {
					re=/\w{1,}/;
					emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/ ; 
					if(!(emailExp.test(document.frm_enquiry.cust_mail.value)))
					{
					alert("Please Enter Correct Email Id");
					document.frm_enquiry.cust_mail.focus();
					return false;
					}
			    }
	       
	       
	       	if(RTrim(document.frm_enquiry.cust_contactno.value)=="")
			{
				alert("Please enter Contact number");
				document.frm_enquiry.cust_contactno.focus();
				return false;
			}
			
		  if(RTrim(document.frm_enquiry.cust_contactno.value)!="")
			{
				if(!isNum(document.frm_enquiry.cust_contactno.value))
				  {
					alert("Please enter correct Contact number");
					document.frm_enquiry.cust_contactno.focus();
					return false;
				 }
			}
			if (document.frm_enquiry.securityCode.value == '') {
		        alert('Please enter the security code');
		        return false;
	        } else if (document.frm_enquiry.scode.value == 0) {
		        alert('Please enter the correct security code');
		        return false;
	        } 
	        return true;
         }
         
         

