
function check_credit_card (number) {
	if (number.substr(0,1) == 4) {
		document.getElementById('visa').style.opacity = 1;
		
		document.getElementById('mastercard').style.opacity = 0.4;
		document.getElementById('mastercard').style.opacity = "alpha(opacity=40)";
	} else if (number.substr(0,1) == 5) {
		document.getElementById('visa').style.opacity = 0.4;
		document.getElementById('visa').style.opacity = "alpha(opacity=40)";
		
		document.getElementById('mastercard').style.opacity = 1;
	} else {
		document.getElementById('mastercard').style.opacity = 1;
		document.getElementById('visa').style.opacity = 1;
	}
}

function fillshipadd()
	{
	    
	    if(document.getElementById("same_address").checked)
            document.getElementById("copyadd").value="1";
	    else
            document.getElementById("copyadd").value="2";

	    
	    document.Form1.submit();
	}
function showsavebill()
{
    document.getElementById("savebillin").value = "true";
    document.getElementById("save_address_billin").display = 'block';
}
function showsaveship()
{
    document.getElementById("saveShip").value = "true"
    document.getElementById("save_address_ship").display = 'block';
    
}

function validationBillship()
{
   var valid = "0123456789-";
   var hyphencount = 0;
    
    if (document.getElementById("org_CS_type").value=="SCH")
    {
        if (document.getElementById("BCS_residential").type=="radio")
       {
       
        if((!document.getElementById("BCS_residential").checked)&&(!document.getElementById("BCS_residential1").checked))
        {
            alert('Please choose the option for billing residential address.');
            document.getElementById("BCS_residential").focus();
            return false;
        }
       }
    
    
         if ((ltrim(document.getElementById("org_name").value)).length ==0)
        {
            alert("Please enter your Billing School Name!");
            document.getElementById("org_name").focus();
            return false;
        } 
        if ((ltrim(document.getElementById("org_contact").value)).length ==0)
        {
            alert("Please enter your Billing Contact Name!");
            document.getElementById("org_contact").focus();
            return false;
        }        
    }
    else
        if ((ltrim(document.getElementById("org_name").value)).length ==0)
        {
            alert("Please enter your Billing Contact Name!");
            document.getElementById("org_name").focus();
            return false;
        } 
   
    if ((ltrim(document.getElementById("org_address1").value)).length ==0)
    {
        alert("Please enter your Billing Address!");
        document.getElementById("org_address1").focus();
        return false;
    }
    if ((ltrim(document.getElementById("org_city").value)).length ==0)
    {
        alert("Please enter your Billing City!");
        document.getElementById("org_city").focus();
        return false;
    }    
    if ((ltrim(document.Form1.org_state.value)).length ==0)
    {
        alert("Please select your Billing State!");
        document.Form1.org_state.focus();
        return false;
    }     
    /*
    if ((ltrim(document.getElementById("org_zip").value)).length ==0)
    {
        alert("Please enter your Billing Zip!");
        document.getElementById("org_zip").focus();
        return false;
    } */
    if ((ltrim(document.Form1.org_country.value)).length ==0)
    {
        alert("Please select your Billing Country!");
        document.Form1.org_country.focus();
        return false;
    }
    
    if (document.Form1.org_country.value =="USA" || document.Form1.org_country.value =="US")	//for USA, certain states and zip in xxxxx/xxxxx-xxxx format
    {
        if ((document.Form1.org_state.value=="N/A")||(document.Form1.org_state.value=="AB")||(document.Form1.org_state.value=="BC")||(document.Form1.org_state.value=="MB")||(document.Form1.org_state.value=="NB")||
            (document.Form1.org_state.value=="NL")||(document.Form1.org_state.value=="NS")||(document.Form1.org_state.value=="NT")||(document.Form1.org_state.value=="NU")||(document.Form1.org_state.value=="ON")||(document.Form1.org_state.value=="PE")||
            (document.Form1.org_state.value=="QC")||(document.Form1.org_state.value=="SK")||(document.Form1.org_state.value=="YT"))
        {
            alert("Please select a correct billing state for USA");
            document.Form1.org_state.focus();
            return false;
        }		

        if ((ltrim(document.getElementById("org_zip").value)).length != 0)
        {
            if ((ltrim(document.getElementById("org_zip").value)).length!=5 && (ltrim(document.getElementById("org_zip").value)).length!=10)
            {  
                alert("Please enter your 5 digit or 5 digit+4 billing zip code.");
                document.getElementById("org_zip").focus();
                return false;
            }
            for (var i=0; i < ltrim(document.getElementById("org_zip").value).length; i++) 
            {
                var temp = ltrim(document.getElementById("org_zip").value).substring(i, i+1);
                if (temp == "-") 
                    hyphencount++;
                if (valid.indexOf(temp) == "-1") 
                {
                    alert("Invalid characters in your billing zip code.  Please try again.");
                    document.getElementById("org_zip").focus();
                    return false;
                }
            }
        }
        else
        {
            alert("Please enter your Billing Zip!");
            document.getElementById("org_zip").focus();
            return false;
        }
    }
     
   if (document.Form1.org_country.value == "CAN" || document.Form1.org_country.value == "CA")	//for Canada, certain states and zip in xxxxxx format
   {

        if ((document.Form1.org_state.value!="N/A")&&(document.Form1.org_state.value!="YT")&&(document.Form1.org_state.value!="AB")&&(document.Form1.org_state.value!="BC")&&(document.Form1.org_state.value!="MB")&&(document.Form1.org_state.value!="NB")&&
            (document.Form1.org_state.value!="NL")&&(document.Form1.org_state.value!="NS")&&(document.Form1.org_state.value!="NT")&&(document.Form1.org_state.value!="NU")&&(document.Form1.org_state.value!="ON")&&(document.Form1.org_state.value!="PE")&&
            (document.Form1.org_state.value!="QC")&&(document.Form1.org_state.value!="SK"))
        {
            alert("Please select a correct billing province for Canada");
            document.Form1.org_state.focus();
            return false;
        }

        if ((ltrim(document.getElementById("org_zip").value)).length != 0)
        {
             if ((ltrim(document.getElementById("org_zip").value)).length !=7)
            {
                alert("The billing \"Postal Code\" must be \"XXX XXX\" format.");
                document.getElementById("org_zip").focus();
                return false;
            }
        }
        else
        {
            alert("Please enter your Billing Zip!");
            document.getElementById("org_zip").focus();
            return false;
        }
    }
    
    if (document.Form1.org_country.value != "CAN" && document.Form1.org_country.value != "USA" && document.Form1.org_country.value != "CA" && document.Form1.org_country.value != "US" && document.Form1.org_state.value != "N/A" )
    {
        alert("Please select \"N/A\" as your billing STATE");
        document.Form1.org_state.focus();
        return false;
    }
 
   if ((ltrim(document.getElementById("org_email").value)).length == 0) 
   {
      alert("Please enter your billing email address!");
       document.getElementById("org_email").focus();
      return false;
   }
   else 
   {
        if (echeck(document.getElementById("org_email").value)==false){
	        document.getElementById("org_email").focus();
	        return false ;

        }
   }
   if ((ltrim(document.getElementById("org_phone").value)).length == 0) 
   {
      alert("Please enter your billing phone number!");
      document.getElementById("org_phone").focus();
      return false;
   }
  /* else
   {
    	if (checkInternationalPhone(document.getElementById("org_phone").value)==false)    // checkInternationalPhone is in sub\js\main.js 
    	{
	        alert("Please Enter a Valid Billing Phone Number")
	        document.getElementById("org_phone").focus()
	        return false
	    }
   }   */
   /*Shipping info in below*/
       if (document.getElementById("residential").type=="radio")
      {
       
        if((!document.getElementById("residential").checked)&&(!document.getElementById("residential1").checked))
        {
            alert('Please choose the option for shipping residential address.');
            document.getElementById("residential").focus();
            return false;
        }
       }
   
     if (document.getElementById("shp_CS_type").value=="SCH")
    {
         if ((ltrim(document.getElementById("shpName").value)).length ==0)
        {
            alert("Please enter your Shipping School Name!");
            document.getElementById("shpName").focus();
            return false;
        } 
        if ((ltrim(document.getElementById("shpContact").value)).length ==0)
        {
            alert("Please enter your Shipping Contact Name!");
            document.getElementById("shpContact").focus();
            return false;
        }        
    }
    else
        if ((ltrim(document.getElementById("shpName").value)).length ==0)
        {
            alert("Please enter your Shipping Contact Name!");
            document.getElementById("shpName").focus();
            return false;
        } 
   
    if ((ltrim(document.getElementById("shpAdd1").value)).length ==0)
    {
        alert("Please enter your Shipping Address!");
        document.getElementById("shpAdd1").focus();
        return false;
    }
    if ((ltrim(document.getElementById("shpCity").value)).length ==0)
    {
        alert("Please enter your Shipping City!");
        document.getElementById("shpCity").focus();
        return false;
    }    
    if ((ltrim(document.Form1.shpstate.value)).length ==0)
    {
        alert("Please select your Shipping State!");
        document.Form1.shpstate.focus();
        return false;
    }     
    /*
    if ((ltrim(document.getElementById("shpZip").value)).length ==0)
    {
        alert("Please enter your Shipping Zip!");
        document.getElementById("shpZip").focus();
        return false;
    } */
    if ((ltrim(document.Form1.shpcountry.value)).length ==0)
    {
        alert("Please select your Shipping Country!");
        document.Form1.shpcountry.focus();
        return false;
    }
    
    if (document.Form1.shpcountry.value =="USA" || document.Form1.shpcountry.value =="US")	//for USA, certain states and zip in xxxxx/xxxxx-xxxx format
    {

        if ((document.Form1.shpstate.value=="N/A")||(document.Form1.shpstate.value=="AB")||(document.Form1.shpstate.value=="BC")||(document.Form1.shpstate.value=="MB")||(document.Form1.shpstate.value=="NB")||
            (document.Form1.shpstate.value=="NL")||(document.Form1.shpstate.value=="NS")||(document.Form1.shpstate.value=="NT")||(document.Form1.shpstate.value=="NU")||(document.Form1.shpstate.value=="ON")||(document.Form1.shpstate.value=="PE")||
            (document.Form1.shpstate.value=="QC")||(document.Form1.shpstate.value=="SK")||(document.Form1.shpstate.value=="YT"))
        {
            alert("Please select a correct shipping state for USA");
            document.Form1.shpstate.focus();
            return false;
        }		
        if ((ltrim(document.getElementById("shpZip").value)).length != 0)
        {
             if ((ltrim(document.getElementById("shpZip").value)).length!=5 && (ltrim(document.getElementById("org_zip").value)).length!=10)
            {  
                alert("Please enter your 5 digit or 5 digit+4 shipping zip code.");
                document.getElementById("shpZip").focus();
                return false;
            }
            for (var i=0; i < ltrim(document.getElementById("shpZip").value).length; i++) 
            {
                var temp = ltrim(document.getElementById("shpZip").value).substring(i, i+1);
                if (temp == "-") 
                    hyphencount++;
                if (valid.indexOf(temp) == "-1") 
                {
                    alert("Invalid characters in your shipping zip code.  Please try again.");
                    document.getElementById("shpZip").focus();
                    return false;
                }
            }
        }
        else
        {
            alert("Please enter your Shipping Zip!");
            document.getElementById("shpZip").focus();
            return false;
        }
   }
     
   if (document.Form1.shpcountry.value == "CAN" || document.Form1.shpcountry.value == "CA")	//for Canada, certain states and zip in xxxxxx format
   {

        if ((document.Form1.shpstate.value!="N/A")&&(document.Form1.shpstate.value!="YT")&&(document.Form1.shpstate.value!="AB")&&(document.Form1.shpstate.value!="BC")&&(document.Form1.shpstate.value!="MB")&&(document.Form1.shpstate.value!="NB")&&
            (document.Form1.shpstate.value!="NL")&&(document.Form1.shpstate.value!="NS")&&(document.Form1.shpstate.value!="NT")&&(document.Form1.shpstate.value!="NU")&&(document.Form1.shpstate.value!="ON")&&(document.Form1.shpstate.value!="PE")&&
            (document.Form1.shpstate.value!="QC")&&(document.Form1.shpstate.value!="SK"))
        {
            alert("Please select a correct shipping province for Canada");
            document.Form1.org_state.focus();
            return false;
        }

        if ((ltrim(document.getElementById("shpZip").value)).length != 0)
        {
             if ((ltrim(document.getElementById("shpZip").value)).length !=7)
            {
                alert("The shipping \"Postal Code\" must be \"XXX XXX\" format.");
                document.getElementById("shpZip").focus();
                return false;
            }
        }
        else
        {
            alert("Please enter your Shipping Zip!");
            document.getElementById("shpZip").focus();
            return false;
        }
    }
    
    if (document.Form1.shpcountry.value != "CAN" && document.Form1.shpcountry.value != "USA" && document.Form1.shpcountry.value != "CA" && document.Form1.shpcountry.value != "US" && document.Form1.shpstate.value != "N/A" )
    {
            alert("Please select \"N/A\" as your shipping STATE");
            document.Form1.shpstate.focus();
            return false;
    }
 
   if ((ltrim(document.getElementById("shpEmail").value)).length == 0) 
   {
      alert("Please enter your shipping email address!");
      document.getElementById("shpEmail").focus();
      return false;
   }
   else 
   {
        if (echeck(document.getElementById("shpEmail").value)==false){
	        document.getElementById("shpEmail").focus();
	        return false ;

        }
   }
   if ((ltrim(document.getElementById("shpphone").value)).length == 0) 
   {
      alert("Please enter your shipping phone number!");
      document.getElementById("shpphone").focus();
      return false;
   }
  /* else
   {
    	if (checkInternationalPhone(document.getElementById("shpphone").value)==false)    // checkInternationalPhone is in sub\js\main.js 
    	{
	        alert("Please Enter a Valid Shipping Phone Number")
	        document.getElementById("shpphone").focus()
	        return false
	    }
   }*/
    if (document.Form1.org_country.value != "CAN" && document.Form1.org_country.value != "USA" && document.Form1.org_country.value != "CA" && document.Form1.org_country.value != "US")
    {
        document.Form1.org_state.value = "";
        document.getElementById("org_zip").value = "";    
    }
    /*
    if ( document.Form1.org_country.value == "USA")
        document.Form1.org_country.value = "US";
    else
        if ( document.Form1.org_country.value == "CAN")
             document.Form1.org_country.value = "CA";
       */      
    if (document.Form1.shpcountry.value != "CAN" && document.Form1.shpcountry.value != "USA" && document.Form1.shpcountry.value != "CA" && document.Form1.shpcountry.value != "US")
    {
        document.Form1.shpstate.value = "";
        document.getElementById("shpZip").value = "";    
    }
    /*
    if ( document.Form1.shpcountry.value == "USA")
        document.Form1.shpcountry.value = "US";
    else
        if ( document.Form1.shpcountry.value == "CAN")
             document.Form1.shpcountry.value = "CA";
    */
    return true;        

}


function validate2(form)
{
    var po = form.purchase_order1;
    var cardname = form.cc_name;
    var cardnum = form.cc_number;
    var csv = form.cc_csv;
	var mm = form.cc_date.value;
	var yy = form.thisyear.value;
	/*if((!document.getElementById("cc_visa").checked)&&(!document.getElementById("cc_master").checked))
	{
	    alert("Please choose credit type.");
	    form.cc_type.focus();
	    return false;
	}*/
	if (document.getElementById("CS_Type").value == "SCH")
	{
	    if ((ltrim(document.getElementById("cc_number").value)).length == 0 && (ltrim(document.getElementById("purchase_order1").value)).length == 0) 
	    {
		    alert("Please enter the purchase order or Credit Card information.");
		    cardnum.focus();	
		    return false;	
	    }
	}
	if (document.getElementById("CS_Type").value != "SCH")
	{
	    if ((ltrim(cardname.value)).length ==0) 
	    {						
		    alert("Please enter the cardholder name.");
		    cardname.focus();	
		    return false;	
	    }	    
	}
	if((document.getElementById("CS_Type").value == "SCH" && (ltrim(document.getElementById("cc_number").value)).length != 0)||document.getElementById("CS_Type").value != "SCH")
	{
	    if((ltrim(cardnum.value)).length != 16) 
	    {
		    alert("Please enter a 16-digit Visa or MasterCard number.");
		    cardnum.focus();
		    return false;
	    }
	    var prefix1 = parseInt((ltrim(cardnum.value)).substring(0,1))
	    var prefix2 = parseInt((ltrim(cardnum.value)).substring(0,2))
		if( prefix1 != 4 && prefix1 !=5) 
		{
			alert("Please enter a valid Visa or MasterCard number.");
			cardnum.focus();
			return false;
		}
	    if( !mod10(ltrim(cardnum.value))) 
	    {                             		// run the check digit algorithm
		    alert("Please enter a valid Visa or MasterCard number.");
		    cardnum.focus();
		    return false;
	    }

	    if( expired( mm, yy )) 
	    {							// check if entered date is already expired.
		    alert("Sorry!  The expiration date you have entered would make this card invalid.");
		    form.cc_date.focus();
		    return false;
	    }
        if ((ltrim(csv.value)).length ==0) 
	    {						
		    alert("Please enter csv.");
		    csv.focus();	
		    return false;	
	    }
	    else
	        if (isNaN(csv.value))
	        {
	    	    alert("Please enter a numerical csv.");
		        csv.focus();	
		        return false;	
	        }
	 }
	return true;

}
function expired(month, year) 
{
	var now = new Date();	
	var expiresIn = new Date(year,month,0,0,0);		// create an expired on date object with valid thru expiration date
	expiresIn.setMonth(expiresIn.getMonth());		// adjust the month, to first day, hour, minute & second of expired month
	if( now.getTime() < expiresIn.getTime() ) 
	    return false;
	else
	{
	//alert(expiresIn.getTime() + " " + now.getTime());
	return true;	
	}								// then we get the miliseconds, and do a long integer comparison
}  
function mod10(cardnum) 
{ // LUHN Formula for validation of credit card numbers.
	//var cardnum = form.cardnum.value
	var cardlength = cardnum.length
	var ar = new Array(cardlength);
	var i = 0,sum = 0;
	for( i = 0; i < cardlength; ++i ) 
	{
		ar[i] = parseInt(cardnum.charAt(i));
	}
	for( i = ar.length -2; i >= 0; i-=2 ) 
	{  // you have to start from the right, and work back.
		ar[i] *= 2;							 // every second digit starting with the right most (check digit)
		if( ar[i] > 9 ) ar[i]-=9;			 // will be doubled, and summed with the skipped digits.
	}										 // if the double digit is > 9, add those individual digits together 
	for( i = 0; i < ar.length; ++i ) 
	{
		sum += ar[i]					 // if the sum is divisible by 10 mod10 succeeds
	}
	return (((sum%10)==0)?true:false)  	
}

function ValidationStepOne()
{
   var valid = "0123456789-";
   var hyphencount = 0;
    if (document.myform.shipping_country.value =="USA" || document.myform.shipping_country.value =="US")	//for USA, certain states and zip in xxxxx/xxxxx-xxxx format
    {
        if ((ltrim(document.getElementById("ZipIn").value)).length == 0 || document.getElementById("ZipIn").value == "Zip" )
        {
            alert("Please enter your shipping zip code.");
            //document.getElementById("ZipIn").focus();
            return false;
        }
        if ((ltrim(document.getElementById("ZipIn").value)).length != 0 && document.getElementById("ZipIn").value!="Zip")
        {
            if ((ltrim(document.getElementById("ZipIn").value)).length!=5 && (ltrim(document.getElementById("ZipIn").value)).length!=10)
            {  
                alert("Please enter your 5 digit or 5 digit+4 shipping zip code.");
                document.getElementById("ZipIn").focus();
                return false;
            }
            for (var i=0; i < ltrim(document.getElementById("ZipIn").value).length; i++) 
            {
                var temp = ltrim(document.getElementById("ZipIn").value).substring(i, i+1);
                if (temp == "-") 
                    hyphencount++;
                if (valid.indexOf(temp) == "-1") 
                {
                    alert("Invalid characters in your shipping zip code.  Please try again.");
                    document.getElementById("ZipIn").focus();
                    return false;
                }

              }
         }
     }
     
   if (document.myform.shipping_country.value == "CAN" || document.myform.shipping_country.value == "CA")	//for Canada, certain states and zip in xxxxxx format
   {
        if ((ltrim(document.getElementById("ZipIn").value)).length == 0 || document.getElementById("ZipIn").value == "Zip" )
        {
            alert("Please enter your shipping zip code.");
            //document.getElementById("ZipIn").focus();
            return false;
        }
        if ((ltrim(document.getElementById("ZipIn").value)).length != 0 && document.getElementById("ZipIn").value!="Zip")
        {
             if ((ltrim(document.getElementById("ZipIn").value)).length !=7)
            {
                alert("The shipping \"Postal Code\" must be \"XXX XXX\" format.");
                document.getElementById("ZipIn").focus();
                return false;
            }
        }
    }
    /*
    if (document.getElementById("ZipIn").value=="Zip" || (document.myform.shipping_country.value != "CAN" && document.myform.shipping_country.value != "USA" && document.myform.shipping_country.value != "CA" && document.myform.shipping_country.value != "US"))
        document.getElementById("ZipIn").value = "";
        */
    if (document.getElementById("checkout").value =="yes")
    {
        document.checkoutform.checktax.value = document.getElementById("checktax").value;
    }
    return true;
}

function ValidationStepTwo(form)
{
  var username = form.ca_user_id;
  var Pword = form.ca_pass;
  var Pword2 = form.ca_pass_two;
  var passhint = form.ca_pass_hint;
  
  if ((ltrim(username.value)).length == 0)
  {
    alert("Please enter your CA User-ID!");
    username.focus();
    return false;
  }

  if ((ltrim(Pword.value)).length == 0)
  {
    alert("Please enter your password!");
    Pword.focus();
    return false;

  }
  if ((ltrim(Pword2.value)).length == 0)
  {
    alert("Please enter your password again!");
    Pword2.focus();
    return false;
  }
   if (ltrim(Pword2.value) != ltrim(Pword.value))
  {
    alert("Please type the same password!");
    Pword2.focus();
    return false;
  }

   if ((ltrim(passhint.value)).length == 0)
  {
    alert("Please enter your password hint!");
    passhint.focus();
    return false;
  }
  return true;
}

function ValidationQuote(theform)
{
   var valid = "0123456789-";
   var hyphencount = 0;
   var thisform = document.getElementById(theform);
   //alert(thisform.name);
    if (document.myform.shipping_country.value =="US" || document.myform.shipping_country.value =="US")	//for USA, certain states and zip in xxxxx/xxxxx-xxxx format
    {
        if ((ltrim(document.getElementById("ZipIn").value)).length == 0  || document.getElementById("ZipIn").value == "Zip")
        {
            alert("Please enter your shipping zip code.");
             document.getElementById("ZipIn").focus();
                return false;
        }
        if ((ltrim(document.getElementById("ZipIn").value)).length != 0 && document.getElementById("ZipIn").value!="Zip")
        {
             if ((ltrim(document.getElementById("ZipIn").value)).length!=5 && (ltrim(document.getElementById("ZipIn").value)).length!=10)
            {  
                alert("Please enter your 5 digit or 5 digit+4 shipping zip code.");
                document.getElementById("ZipIn").focus();
                return false;
            }
            for (var i=0; i < ltrim(document.getElementById("ZipIn").value).length; i++) 
            {
                var temp = ltrim(document.getElementById("ZipIn").value).substring(i, i+1);
                if (temp == "-") 
                    hyphencount++;
                if (valid.indexOf(temp) == "-1") 
                {
                    alert("Invalid characters in your shipping zip code.  Please try again.");
                    document.getElementById("ZipIn").focus();
                    return false;
                }

              }
         }
     }
     
   if (document.myform.shipping_country.value == "CAN" || document.myform.shipping_country.value == "CA")	//for Canada, certain states and zip in xxxxxx format
   {
        if ((ltrim(document.getElementById("ZipIn").value)).length == 0 || document.getElementById("ZipIn").value == "Zip")
        {
            alert("Please enter your shipping zip code.");
             document.getElementById("ZipIn").focus();
                return false;
        }
        if ((ltrim(document.getElementById("ZipIn").value)).length != 0 && document.getElementById("ZipIn").value!="Zip")
        {
             if ((ltrim(document.getElementById("ZipIn").value)).length !=7)
            {
                alert("The shipping \"Postal Code\" must be \"XXX XXX\" format.");
                document.getElementById("ZipIn").focus();
                return false;
            }
        }
    }
    /*
    if (document.getElementById("ZipIn").value=="Zip" || (document.myform.shipping_country.value != "CAN" && document.myform.shipping_country.value != "USA" && document.myform.shipping_country.value != "CA" && document.myform.shipping_country.value != "US"))
        document.getElementById("ZipIn").value = "";
   */
   
   thisform.ZipIn.value = document.getElementById("ZipIn").value;
   thisform.shiprate.value = document.getElementById("shiprate").value;
   thisform.shipping_country.value = document.getElementById("shipping_country").value;
   return true;
   /*
   if (action =="print")
    theform.action = "quotecart.asp?printquote=yes";
   if (action == "save")
    theform.action = "quotecart.asp?savequote=yes";
   if (action == "email")
    theform.action = "quotecart.asp?emailquote=yes";
    */
}

function ValidationPrintCart()
{
    if (ValidationStepOne())
    {
        var str = "&zipin=" + document.getElementById("ZipIn").value + "&shipping_country=" + document.myform.shipping_country.value + "&shiprate=" + document.myform.shiprate.value;
        document.getElementById("linkPrint").href += str;
        return true;
    }
    else
        return false;
}
function testforzip()
{
    
    if (document.getElementById("shipping_country").value == "US" || document.getElementById("shipping_country").value == "CA")
    {
    
        document.getElementById("ZipIn").style.display = 'inline';
        
    }
    else
    {
        document.getElementById("ZipIn").style.display = 'none';
       
    }
}