function CountChars(){
	document.pageform.lentxt.value = document.pageform.messageBody.value.length;
}
if (navigator.appName == 'Microsoft Internet Explorer'){document.onkeyup=CountChars;};
if (navigator.appName == 'Netscape'){document.captureEvents(Event.KEYUP); document.onkeyup=CountChars;};

function validateForm(f,warnlevel){
	if (f.messageBody.value.length == 0){
		alert('You must enter a message in order to send an email or page.');
		document.pageform.messageBody.focus();
		return false;
		}
	if ( (warnlevel == 1) && (f.messageBody.value.length > 240) ){
		alert('Your message is longer than 240 characters and will be sent, but will be truncated at the 240 character mark.');
		document.pageform.messageBody.focus();
		return true;
		}
}
	
function setAll(which,state){
	for (var i=0; i<document.pageform.length; i++){
		var e=document.pageform.elements[i];
		n=new String(e.name);
		if ( (n.search(which) != -1) && (e.type == 'checkbox') ){
		e.checked=state;
		}
	}
}

