
function nostatus(){
	window.status = document.title;
	return true
}

document.onmouseover = nostatus
document.onmouseout = nostatus


function textCounter(area,maxlength){
	if(area.value.length >= maxlength){
		alert("You've reached the " + maxlength + " character limit.");
		area.value = area.value.substring(0, maxlength);
		event.returnValue = false;
	}
}


//Contact & Newsletter Pages
function validate_contact_form(TheForm){
	clear_contact_form(TheForm);
	var required = "";
	if (TheForm.Name.value.length == 0) { required += "\n     - Name"; TheForm.Name.className="textBoxRequired"; }
	if (TheForm.Email.value.length == 0) { required += "\n     - Email"; TheForm.Email.className="textBoxRequired"; }
	else if (TheForm.Email.value.search(/(\w+[\w|\.|-]*\w+)(@\w+[\w|\.|-]*\w+\.\w{2,4})/) == -1) { required += "\n     - Please specify a valid email address"; TheForm.Email.className="textBoxRequired"; }
	
	if (required != "") {
		alert("Please fill in the required field(s):" + required);
		return false;
	}
}

function reset_contact_form(TheForm){
	var x = confirm("Are you sure you want to clear all of your data and start over?");
	if(x){
		clear_contact_form(TheForm);
		TheForm.Name.focus();
		TheForm.reset();
	}
}

function clear_contact_form(TheForm){
	TheForm.Name.className = "textBox";
	TheForm.Email.className = "textBox";
}