// Mabas Jump
function jumpMabas(varUrl){
	window.location = '/firepolice/departments.asp?id=' + varUrl
}
///
// Check Registration Form
function checkAlternate(theForm)
{
if (!checkText(theForm.sAltRelation,"Please fill in the \"Relation\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sAltFirstName,"Please fill in the \"First Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sAltLastName,"Please fill in the \"Last Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sAltPhone,"Please fill in the \"Phone\" field!", "yes"))	{
	return false;
}
return true;
}
// Check Registration Form

// Check Primary Form
function checkPrimary(theForm)
{
if (!checkEmail(theForm.sUsername,"Please use a properly formatted email!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPassword1,"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.sPassword1.value != theForm.sPassword2.value)
  {
    alert("Your passwords do not match.  Please re-confirm your password.");
    theForm.sPassword2.focus();
    return (false);
  }

if (!checkText(theForm.sPriFirstName,"Please fill in the \"First Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriLastName,"Please fill in the \"Last Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriAddress1,"Please fill in the \"Address - 1\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriCity,"Please fill in the \"City\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriState,"Please fill in the \"County/State\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriZip,"Please fill in the \"Post Code\" field!", "yes"))	{
	return false;
}

if (!checkText(theForm.sPriPhone,"Please fill in the \"Phone\" field!", "yes"))	{
	return false;
}
return true;
}
// Check Primary Form



// Check Join Form
function checkCC(theForm)
{
if (!checkPullDown(theForm.sCardType,"Please select a \"Card Type\"!", "yes"))	{
	return false;
}
if (!checkNumbers(theForm.sCard,"Please fill in the \"Card Number\" field!", "yes"))	{
	return false;
}

if (theForm.sCardType.value == "Visa"){
if (theForm.sCard.value.charAt(0) != "4"){
	alert('Please make sure your \"Card Number\" is typed in correctly')
	theForm.sCard.focus();
	return false;
}
if (theForm.sCard.value.length  != 16){
	alert('Please make sure your \"Card Number\" is typed in correctly')
	theForm.sCard.focus();
	return false;
}
}
if (theForm.sCardType.value == "Master Card"){
if (theForm.sCard.value.charAt(0) != "5"){
	alert('Please make sure your \"Card Number\" is typed in correctly')
	theForm.sCard.focus();
	return false;
}
if (theForm.sCard.value.length  != 16){
	alert('Please make sure your \"Card Number\" is typed in correctly')
	theForm.sCard.focus();
	return false;
}
}

if (!checkPullDown(theForm.sMonth,"Please select a \"Month\"!", "yes"))	{
	return false;
}
if (!checkPullDown(theForm.sYear,"Please select a \"Year\"!", "yes"))	{
	return false;
}
return true;
}
// Check Join Form


// Check Registration Form
function checkRegister(theForm)
{
if (!checkEmail(theForm.sUsername,"Please use a properly formatted email!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPassword1,"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.sPassword1.value != theForm.sPassword2.value)
  {
    alert("Your passwords do not match.  Please re-confirm your password.");
    theForm.sPassword2.focus();
    return (false);
  }

if (!checkText(theForm.sPriFirstName,"Please fill in the \"First Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriLastName,"Please fill in the \"Last Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriAddress1,"Please fill in the \"Address - 1\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriCity,"Please fill in the \"City\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriState,"Please fill in the \"County/State\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sPriZip,"Please fill in the \"Post Code\" field!", "yes"))	{
	return false;
}

if (!checkText(theForm.sPriPhone,"Please fill in the \"Phone\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sAltRelation,"Please fill in the \"Relation\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sAltFirstName,"Please fill in the \"First Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sAltLastName,"Please fill in the \"Last Name\" field!", "yes"))	{
	return false;
}
if (!checkText(theForm.sAltPhone,"Please fill in the \"Phone\" field!", "yes"))	{
	return false;
}
return true;
}
// Check Registration Form


// Check Join Form
function checkJoin(theForm)
{
if (!checkEmail(theForm.sEmail,"Please use a properly formatted email!", "yes"))	{
	return false;
}
return true;
}
// Check Join Form

// Check Contact Form
function checkContact(theForm)
{
if (!checkText(theForm.sName,"Please fill in the \"Name\" field!", "yes"))	{
	return false;
}
if (!checkEmail(theForm.sEmail,"Please use a properly formatted email!", "yes"))	{
	return false;
}
return true;
}
// Check Contact Form


