//FUNCTION TO VERIFY FORM INPUT
function verifyFields()
{
//VERIFY FIRST NAME FIELD
if (document.employ.FNAME.value == "") 
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your First Name.\nPlease re-enter your First Name.");
document.employ.FNAME.focus();
return false;
}
//VERIFY LAST NAME FIELD
if (document.employ.LNAME.value == "") 
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your Last Name.\nPlease re-enter your Last Name.");
document.employ.LNAME.focus();
return false;
}
//VERIFY ADDRESS 1 FILLED IN
if (document.employ.ADDRESS1.value == "")
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your Address.\nPlease enter your Address.");
document.employ.ADDRESS1.focus();
return false;
}
//VERIFY CITY FILLED IN
if (document.employ.CITY.value == "")
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your City.\nPlease enter your City.");
document.employ.CITY.focus();
return false;
}
//VERIFY STATE FILLED IN
if (document.employ.STATE.value == "")
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your State.\nPlease enter your State.");
document.employ.STATE.focus();
return false;
}
//VERIFY ZIP CODE FILLED IN
if (document.employ.ZIP.value == "")
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your Zip code properly.\nPlease re-enter your Zip code.");
document.employ.ZIP.focus();
return false;
}
//VERIFY ZIP CODE FILLED IN WITH AT LEAST 5 NUMBERS
if (document.employ.ZIP.value.length <5)
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your Zip code properly.\nPlease re-enter your Zip code.");
document.employ.ZIP.focus();
return false;
}
//VERIFY PHONE FILLED IN
if (document.employ.HP1.value.length <3)
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your home phone in properly.\nPlease re-enter your home phone number.");
document.employ.HP2.focus();
return false;
}
if (document.employ.HP2.value.length <3)
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your home phone in properly.\nPlease re-enter your home phone number.");
document.employ.HP2.focus();
return false;
}
if (document.employ.HP3.value.length <4)
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter your home phone in properly.\nPlease re-enter your home phone number.");
document.employ.HP3.focus();
return false;
}
//VERIFY EMAIL ADDRESS FIELD, LOOK FOR @ SYMBOL AND A PERIOD
if ((document.employ.EMAIL.value == "") || 
(document.employ.EMAIL.value.indexOf('@') == -1) || 
(document.employ.EMAIL.value.indexOf('.') == -1)) 
{
//ALERT USER AS TO ERROR
//FOCUS ON INCORRECT FIELD
window.alert("You did not enter a valid email address.\n Please re-enter a valid email address\n in the following format:\n someone@domain.com");
document.employ.EMAIL.focus();
return false;
}

else 
	{
	return true;
	}
}

// KPL Functions 10/10/2007

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

function rollOverClass(tag,hoverClassName)
{
	if (document.getElementById)
	{
		var links = document.getElementsByTagName(tag);
		
		for (var i=0; i<links.length; i++)
		{
			links[i].onmouseover = function()
			{
				this.className = hoverClassName;
			}
			links[i].onmouseout = function()
			{
				this.className = null;
			}
		}
	}
	else
	{
		return false;
	}
}

//| onload events
window.onload = onloadEvents;

function onloadEvents()
{
	rollOverClass("input","hover");
}
//-->
