<!--

function isDigit (c)
{   return ((c >= "0") && (c <= "9"))
}

function CheckEmail(field)
{
 i=field.value.indexOf("@");	//see if there's an @ sign
 x=field.value.indexOf("@",i+1); //make sure there's not more @ signs
 p=field.value.indexOf(".",i);  //there must be a period 

 if ( (i==-1) || (p<(i+2)) || (x>i) || (p >=(field.value.length - 2)))
   {
   alert("Please enter a valid Email Address");
   field.focus();
   return(false);
   }
   return (true);
}

function formvalidation(formname, message) {
var msg = "Please enter your ";
if (formname.value == "") {
 alert(msg + message);
 formname.focus();
 return (false);
 }
 return (true);
}

function contactval()	{
//validation for the QCorp Contact Form

//|| (document.contactform.CashManagement.checked)

if (!((document.contactform.ConsMarketing.checked) || (document.contactform.TargetMarketing.checked) || (document.contactform.QSB.checked) || (document.contactform.ConsSurveys.checked) || (document.contactform.WebDesignHost.checked) || (document.contactform.SecureForms.checked) || (document.contactform.CustCare.checked) || (document.contactform.PremiumCustCare.checked) || (document.contactform.SeamlessCall.checked) || (document.contactform.Training.checked) || (document.contactform.CheckOrder.checked) || (document.contactform.QuickenOFX.checked) || (document.contactform.ChkImg.checked) || (document.contactform.QuotienTraining.checked) )  && (document.contactform.OtherInfo.value == ""))	{
alert("Please select which item you would like more information on");
return false;
}



if (!formvalidation(document.contactform.Contact_LName, "Last Name")) {
return false;
}

if (!formvalidation(document.contactform.Contact_FName, "First Name")) {
return false;
}

if (!formvalidation(document.contactform.Contact_Email, "Email")) {
return false;
}

if (document.contactform.Contact_Email.value.length > 0)  {
 if(!CheckEmail(document.contactform.Contact_Email))
 return (false);
}

if (!formvalidation(document.contactform.Contact_Phone, "Phone Number")) {
return false;
}

if (!formvalidation(document.contactform.FIName, "FI Name")) {
return false;
}

if (!formvalidation(document.contactform.FIAddress, "Address Information")) {
return false;
}

if (!formvalidation(document.contactform.FICity, "City Information")) {
return false;
}

if (document.contactform.State[0].selected) {
alert('Please select a state');
return false;
}

if (!formvalidation(document.contactform.FIZip, "Zip Code")) {
return false;
}

}

function form1val()	{
//validation for the QStore Order Form
if (document.orderform.FIName.value == "") {
alert("Please enter your FI Name");
document.orderform.FIName.focus();
return false;
}

if (document.orderform.Name.value == "") {
alert("Please complete your Name");
document.orderform.Name.focus();
return false;
}

if (document.orderform.Street.value == "") {
alert("Please complete your Street Address");
document.orderform.Street.focus();
return false;
}

if (document.orderform.City.value == "") {
alert("Please complete your City Information");
document.orderform.City.focus();
return false;
}

if (document.orderform.State[0].selected) {
alert('Please select a state');
return false;
}

if (document.orderform.Zip.value == "") {
alert("Please complete your Zip Information");
document.orderform.Zip.focus();
return false;
}

if (document.orderform.Phone.value == "") {
alert("Please complete your Phone Information");
document.orderform.Phone.focus();
return false;
}

if (document.orderform.Fax.value == "") {
alert("Please complete your Fax Information");
document.orderform.Fax.focus();
return false;
}

if (document.orderform.Email.value == "")	{
alert("Please enter your email address");
document.orderform.Email.focus();
return false;
}

if (document.orderform.Email.value.length > 0)  {
 if(!CheckEmail(document.orderform.Email))
 return (false);
 }
 
if (document.orderform.DDA.value == "") {
alert("Please enter your DDA Information");
document.orderform.DDA.focus();
return false;
} 
 
if (document.orderform.DDA.value != "")	{
 for(i=0; i<document.orderform.DDA.value.length; i++) {
  if (!isDigit(document.orderform.DDA.value.charAt(i))) {
   alert("Please enter numbers only")
   document.orderform.DDA.focus();
   return false;
   }
 }
} 

if (document.orderform.HomeBank.value == "" && document.orderform.BillPay.value == "") {
alert("You must provide a Service Name");
// document.orderform.BillPay.focus();
return false;
}

}

//-->