function statmsg(txt) {
        if (txt != "") {alert(txt) }
}

function check_required(thisForm) {


if (thisForm.ContactLastName.value == "")
   { alert ("Please enter your Last Name.");
     thisForm.ContactLastName.focus();
     return false;
   }

if (thisForm.PhoneNumber.value == "")
   { alert ("Please enter your Phone Number.");
     thisForm.PhoneNumber.focus();
     return false;
   }

if (thisForm.FaxNumber.value == "")
   { alert ("Please enter your Fax Number.");
     thisForm.FaxNumber.focus();
     return false;
   }

if (thisForm.MainAddress1.value == "")
   { alert ("Please enter your address.");
     thisForm.MainAddress1.focus();
     return false;
   }

if (thisForm.City.value == "")
   { alert ("Please enter your city name.");
     thisForm.City.focus();
     return false;
   }

if (thisForm.State.value == "")
   { alert ("Please enter your state name.");
     thisForm.State.focus();
     return false;
   }

if (thisForm.ZipCode.value == "")
   { alert ("Please enter your zip code.");
     thisForm.ZipCode.focus();
     return false;
   }


return true;

}


function VerifyData(theform)
{
if (theform.NPassword.value != theform.RPassword.value)
    { 
         alert ("Your password do not match - please reenter");
         theform.NPassword.focus();
         return (false);
    }

if (theform.NPassword.value == "" || theform.RPassword.value == "")
    { 
         alert ("Do not leave the password blank - please reenter");
         theform.NPassword.focus();
         return (false);
    }

return (true);
}



function validate_po(theForm)
{
        if (theForm.PaymentMethod.options.selectedIndex == 2)
        {
                if (theForm.PurchaseOrder.value == "")
                {
                        alert("Please enter your \"Purchase Order Number\" .");
                        theForm.PurchaseOrder.focus();
                        return (false);
                }
        }

        if (theForm.PaymentMethod.options.selectedIndex == 1)
        {
                if((theForm.ccn1.value.length + theForm.ccn2.value.length + theForm.ccn3.value.length + theForm.ccn4.value.length) < 16)
                {
                        alert("Please enter your \"Credit Card Number\" .");
                        theForm.ccn1.focus();
                        return (false);
                }
        }

        if (theForm.PaymentMethod.options.selectedIndex == 1)
        {
                if((theForm.ExpirationMonth.options.selectedIndex == 0) || (theForm.ExpirationYear.options.selectedIndex == 0))
                {
                        alert("Please enter \"Expiration date\" .");
                        theForm.ExpirationMonth.focus();
                        return (false);
                }
        }

        if (theForm.zipfile.value == "" )
        { alert("Please provide file name with your order.");
          theForm.zipfile.focus();
          return false;
        }
return (true);
}