function checkform ( form )
{
  if (form.customer_fname.value == "") {
    alert( "The first name field is required to complete and submit this form." );
    form.customer_fname.focus();
    return false ;
  }
  if (form.customer_lname.value == "") {
    alert( "The last name field is required to complete and submit this form." );
    form.customer_lname.focus();
    return false ;
  }
   if (form.customer_address1.value == "") {
    alert( "The address field is required to complete and submit this form." );
    form.customer_address1.focus();
    return false ;
  } 
    if (form.customer_city.value == "") {
    alert( "The city field is required to complete and submit this form." );
    form.customer_city.focus();
    return false ;
  }
    if (form.customer_state.value == "") {
    alert( "The state field is required to complete and submit this form." );
    form.customer_state.focus();
    return false ;
  }
    if (form.customer_country.value == "") {
    alert( "The country field is required to complete and submit this form." );
    form.customer_country.focus();
    return false ;
  }
    if (form.customer_zip.value == "") {
    alert( "The zip / postal code field is required to complete and submit this form." );
    form.customer_zip.focus();
    return false ;
  }
  if (form.customer_email.value == "") {
    alert( "The email address field is required to complete and submit this form." );
    form.customer_email.focus();
    return false ;
  }  
  if (form.customer_email_confirm.value != form.customer_email.value) {
    alert( "Please make sure you have typed the correct email address in both fields." );
    form.customer_email.focus();
    return false ;
  }
  if (form.customer_password.value == "") {
    alert( "You must select a password to complete and submit this form." );
    form.customer_password.focus();
    return false ;
  }  
  if (form.customer_password_confirm.value != form.customer_password.value) {
    alert( "Please make sure you have typed the same password in both fields." );
    form.customer_password.focus();
    return false ;
  }

  return true ;
}

function checkformcheckout1 ( form )
{
  if (form.customer_fname.value == "") {
    alert( "The first name field is required to complete and submit this form." );
    form.customer_fname.focus();
    return false ;
  }
  if (form.customer_lname.value == "") {
    alert( "The last name field is required to complete and submit this form." );
    form.customer_lname.focus();
    return false ;
  }
   if (form.customer_address1.value == "") {
    alert( "The address field is required to complete and submit this form." );
    form.customer_address1.focus();
    return false ;
  } 
    if (form.customer_city.value == "") {
    alert( "The city field is required to complete and submit this form." );
    form.customer_city.focus();
    return false ;
  }
    if (form.customer_state.value == "") {
    alert( "The state field is required to complete and submit this form." );
    form.customer_state.focus();
    return false ;
  }
    if (form.customer_country.value == "") {
    alert( "The country field is required to complete and submit this form." );
    form.customer_country.focus();
    return false ;
  }
    if (form.customer_zip.value == "") {
    alert( "The zip / postal code field is required to complete and submit this form." );
    form.customer_zip.focus();
    return false ;
  }

  return true ;
}

function checkformcheckout2 ( form )
{
  if (form.card_name.value == "") {
    alert( "The name as it appears on the card field is required to complete and submit this form." );
    form.card_name.focus();
    return false ;
  }
  if (form.card_type.value == "") {
    alert( "The card type field is required to complete and submit this form." );
    form.card_type.focus();
    return false ;
  }
   if (form.card_date_mo.value == "") {
    alert( "The card expiration date is required to complete and submit this form." );
    form.card_date_mo.focus();
    return false ;
  } 
    if (form.card_date_yr.value == "") {
    alert( "The card expiration date is required to complete and submit this form." );
    form.card_date_yr.focus();
    return false ;
  }

  return true ;
}

function checkformdealer ( form )
{
  if (form.dist_organization.value == "") {
    alert( "The organization field is required to complete and submit this form." );
    form.dist_organization.focus();
    return false ;
  }
   if (form.dist_address.value == "") {
    alert( "The address field is required to complete and submit this form." );
    form.dist_address.focus();
    return false ;
  } 
    if (form.dist_city.value == "") {
    alert( "The city field is required to complete and submit this form." );
    form.dist_city.focus();
    return false ;
  }
    if (form.dist_state.value == "") {
    alert( "The state field is required to complete and submit this form." );
    form.dist_state.focus();
    return false ;
  }
    if (form.dist_country.value == "") {
    alert( "The country field is required to complete and submit this form." );
    form.dist_country.focus();
    return false ;
  }
    if (form.dist_zip.value == "") {
    alert( "The zip / postal code field is required to complete and submit this form." );
    form.dist_zip.focus();
    return false ;
  }
    if (form.dist_name.value == "") {
    alert( "The contact name field is required to complete and submit this form." );
    form.dist_name.focus();
    return false ;
  }
    if (form.dist_phone.value == "") {
    alert( "The phone number field is required to complete and submit this form." );
    form.dist_phone.focus();
    return false ;
  }
  return true ;
}


function checkformcatalog ( form )
{
  if (form.cat_name.value == "") {
    alert( "The name field is required to complete and submit this form." );
    form.cat_name.focus();
    return false ;
  }
   if (form.cat_address.value == "") {
    alert( "The address field is required to complete and submit this form." );
    form.cat_address.focus();
    return false ;
  } 
    if (form.cat_city.value == "") {
    alert( "The city field is required to complete and submit this form." );
    form.cat_city.focus();
    return false ;
  }
    if (form.cat_state.value == "") {
    alert( "The state field is required to complete and submit this form." );
    form.cat_state.focus();
    return false ;
  }
    if (form.cat_country.value == "") {
    alert( "The country field is required to complete and submit this form." );
    form.cat_country.focus();
    return false ;
  }
    if (form.cat_zip.value == "") {
    alert( "The zip / postal code field is required to complete and submit this form." );
    form.cat_zip.focus();
    return false ;
  }
  return true ;
}

function checkformreg ( form )
{
  if (form.reg_fname.value == "") {
    alert( "The first name field is required to complete and submit this form." );
    form.reg_fname.focus();
    return false ;
  }
  if (form.reg_lname.value == "") {
    alert( "The last name field is required to complete and submit this form." );
    form.reg_lname.focus();
    return false ;
  }
   if (form.reg_address.value == "") {
    alert( "The address field is required to complete and submit this form." );
    form.reg_address1.focus();
    return false ;
  } 
    if (form.reg_city.value == "") {
    alert( "The city field is required to complete and submit this form." );
    form.reg_city.focus();
    return false ;
  }
    if (form.reg_state.value == "") {
    alert( "The state field is required to complete and submit this form." );
    form.reg_state.focus();
    return false ;
  }
    if (form.reg_zip.value == "") {
    alert( "The zip / postal code field is required to complete and submit this form." );
    form.reg_zip.focus();
    return false ;
  }
    if (form.reg_creditcard.value == "") {
    alert( "The credit card field is required to complete and submit this form." );
    form.reg_creditcard.focus();
    return false ;
  }
    if (form.reg_cardnumber.value == "") {
    alert( "The credit card number field is required to complete and submit this form." );
    form.reg_cardnumber.focus();
    return false ;
  }
    if (form.reg_expdate.value == "") {
    alert( "The credit card expiration field is required to complete and submit this form." );
    form.reg_expdate.focus();
    return false ;
  }
    if (form.reg_cardholdername.value == "") {
    alert( "The cardholder name field is required to complete and submit this form." );
    form.reg_cardholdername.focus();
    return false ;
  }
    if (form.reg_billingaddress.value == "") {
    alert( "The billing address field is required to complete and submit this form." );
    form.reg_billingaddress.focus();
    return false ;
  }
    if (form.reg_billingcity.value == "") {
    alert( "The billing city field is required to complete and submit this form." );
    form.reg_billingcity.focus();
    return false ;
  }
    if (form.reg_billingstate.value == "") {
    alert( "The billing state field is required to complete and submit this form." );
    form.reg_billingstate.focus();
    return false ;
  }
    if (form.reg_billingzip.value == "") {
    alert( "The billing zip / postal code field is required to complete and submit this form." );
    form.reg_billingzip.focus();
    return false ;
  }
  return true ;
}


// Fuction will Capitalize First Letter of Form Fields

function capitalizeMe(obj) {
        val = obj.value;
        newVal = '';
        val = val.split(' ');
        for(var c=0; c < val.length; c++) {
                newVal += val[c].substring(0,1).toUpperCase() +
val[c].substring(1,val[c].length) + ' ';
        }
        obj.value = newVal;
}