
// Check Event Registration Private
function checkRegistrationPublic(theForm)
{
if (!checkEmail(theForm.sEmail,"Please use a properly formatted email!", "yes"))	{
	return false;
}
if (!checkText(theForm.sFirstName,"Please fill in the \"First Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sLastName,"Please fill in the \"Last Name\" field!", "yes"))	{
	return false;
}
if (!checkPhone(theForm.sPhone,"phone","no"))	{
	return false;
}
return true;
}
// Check Event Registration Private


// Check Event Registration Private
function checkRegPrivate(theForm)
{
if (!checkEmail(theForm.sUsername,"Please use a properly formatted email!", "yes"))	{
	return false;
}
if (!checkText(theForm.sFirstName,"Please fill in the \"First Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sLastName,"Please fill in the \"Last Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sCompany,"Please fill in the \"Company\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sTitle,"Please fill in the \"Title\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.iIndustry,"Please fill in the \"Industry\" field!", "yes"))	{
	return false;
}
if (!checkPhone(theForm.sPhone,"phone","yes"))	{
	return false;
}
if (!checkEmail(theForm.sEmail,"Please fill in the \"Email\" field!", "yes"))	{
	return false;
}
return true;
}
// Check Event Registration Private


// Check Registration
function checkRegister(theForm)
{
if (!checkEmail(theForm.sUsername,"Please use a properly formatted email!", "yes"))	{
	return false;
}
if (!checkText(theForm.strCAPTCHA,"Please fill in the \"Verify Code\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPassword,"Please fill in the \"Password\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPassword2,"Please fill in the \"Confirm Password\" field!", "yes"))	{
	return false;
}
if (theForm.sPassword.value != theForm.sPassword2.value)
  {
    alert("Your passwords do not match.  Please re-confirm your password.");
    theForm.sPassword2.focus();
    return (false);
  }
if (!checkText(theForm.bFirstName,"Please fill in the \"First Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.bLastName,"Please fill in the \"Last Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.iIndustry,"Please fill in the \"Industry\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.bAddr1,"Please fill in the \"Address\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.bCity,"Please fill in the \"City\" field!", "yes"))	{
	return false;
}
if (!checkPullDown(theForm.bState,"Please select a  \"State\"!", "yes"))	{
	return false;
}
if (!checkNumbers(theForm.bZip,"Please fill in the \"Zip\" field!", "yes"))	{
	return false;
}
if (!checkPhone(theForm.bPhone,"phone","yes"))	{
	return false;
}
if (!checkPhone(theForm.bFax,"fax","no"))	{
	return false;
}
return true;
}
// Check Registration

// Check Edit Shipping
function editShipping(theForm)
{
if (!checkText(theForm.sFirstName,"Please fill in the \"First Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sLastName,"Please fill in the \"Last Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sAddr1,"Please fill in the \"Address\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sCity,"Please fill in the \"City\" field!", "yes"))	{
	return false;
}
if (!checkPullDown(theForm.sState,"Please select a  \"State\"!", "yes"))	{
	return false;
}
if (!checkNumbers(theForm.sZip,"Please fill in the \"Zip\" field!", "yes"))	{
	return false;
}
if (!checkPhone(theForm.sPhone,"phone","yes"))	{
	return false;
}
if (!checkPhone(theForm.sFax,"fax","no"))	{
	return false;
  }
return true;
}

// Check Edit Billing
function editBilling(theForm)
{
if (!checkText(theForm.bFirstName,"Please fill in the \"First Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.bLastName,"Please fill in the \"Last Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.iIndustry,"Please fill in the \"Industry\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.bAddr1,"Please fill in the \"Address\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.bCity,"Please fill in the \"City\" field!", "yes"))	{
	return false;
}
if (!checkPullDown(theForm.bState,"Please select a  \"State\"!", "yes"))	{
	return false;
}
if (!checkNumbers(theForm.bZip,"Please fill in the \"Zip\" field!", "yes"))	{
	return false;
}
if (!checkPhone(theForm.bPhone,"phone","yes"))	{
	return false;
}
if (!checkPhone(theForm.bFax,"fax","no"))	{
	return false;
  }
return true;
}

// Check Edit Account
function editAccount(theForm)
{
if (!checkEmail(theForm.sUsername,"Please use a properly formatted email!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPassword,"Please fill in the \"Password\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPassword2,"Please fill in the \"Confirm Password\" field!", "yes"))	{
	return false;
}
if (theForm.sPassword.value != theForm.sPassword2.value)
  {
    alert("Your passwords do not match.  Please re-confirm your password.");
    theForm.sPassword2.focus();
    return (false);
  }
return true;
}
// Check Registration


// CheckContact Form
function checkContact(theForm)
{
if (!checkText(theForm.sName,"Please fill in the \"Name\" field!", "yes"))	{
	return false;
}
if (!checkPhone(theForm.sPhone,"Phone", "yes"))	{
	return false;
}
if (!checkEmail(theForm.sEmail,"Please use a properly formatted email!", "yes"))	{
	return false;
}
return true;
}
// Check Contact Form


// duplicate address for user
function sameAddress(theForm)
{
	var strErrorVal = "The following fields are required for this Feature: ";
	var focus = 0;
	if (theForm.bFirstName.value == "")
	{
		strErrorVal += "First Name, ";
		focus = 1;
	}
	if (theForm.bLastName.value == "")
	{
		strErrorVal += "Last Name, ";
		focus = 2;
	}
	if (theForm.bAddr1.value == "")
	{
		strErrorVal += "Address, ";
		focus = 3;
	}
	 if ( (theForm.bCity.value == "") )
	{
		strErrorVal += "City, ";
		focus = 4;
	}
	 if ( (theForm.bState.value == "") )
	{
		strErrorVal += "State, ";
		focus = 5;
	}
 if ( (theForm.bZip.value == "") )
	{
		strErrorVal += "Zip, ";
		focus = 7;
	}
 if ( (theForm.bPhone.value == "") )
	{
		strErrorVal += "Phone ";
		focus = 8;
	}
	
if (focus != 0){
	theForm.sameAsBilling.checked=false;

	alert(strErrorVal); }
else {
theForm.sFirstName.value = theForm.bFirstName.value
theForm.sLastName.value = theForm.bLastName.value
theForm.sCompany.value = theForm.bCompany.value
theForm.sAddr1.value = theForm.bAddr1.value
theForm.sAddr2.value = theForm.bAddr2.value
theForm.sCity.value = theForm.bCity.value
theForm.sState.value = theForm.bState.value
theForm.sZip.value = theForm.bZip.value
theForm.sPhone.value = theForm.bPhone.value
theForm.sFax.value = theForm.bFax.value
	}
}