// Print function

function printit(){
    if (window.print) {
        window.print() ;
    } else {
        alert('Please use the print feature of your browser.');
    }
} 


//Empty form fields

function clearText(objField){
    if (objField.defaultValue==objField.value)
    objField.value = ""
}
function resetText(objField){
    if (objField.value=="")
    objField.value = objField.defaultValue
}


//JS for Suckerfish dropdown nav

sfHover = function() {
var sfEls = document.getElementById("navigationmain").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
	sfEls[i].onmouseover=function() {
		this.className+=" sfhover";
	}
	sfEls[i].onmouseout=function() {
		this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
	}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);



// Validate form inputs
function ValInputs ()
{
	erroris = "";
if (document.getElementById('firstname').value == "") {
	erroris += "\n     - First Name";
}

if (document.getElementById('lastname').value == "") {
	erroris += "\n     - Last Name";
}

var email1 = document.getElementById('email').value;

if ((email1 == "") ||
	(email1.indexOf('@') == -1) ||
	(email1.indexOf('.') == -1)) {
	erroris += "\n     - Email";
}

if (erroris != "") {
	erroris ="_____________________________\n" +
	"You failed to correctly fill in your:\n" +
	erroris + "\n_____________________________" +
	"\nPlease re-enter and submit again.";
	alert(erroris);
	return false;
}

	else return true;
}
