function isNav() {
	// Note: Opera and WebTV spoof Navigator...strict client detection. 
	// If you want to allow spoofing, take out the tests for opera and webtv. 
	var agt = navigator.userAgent.toLowerCase();
	return ((agt.indexOf('mozilla') != -1) && (agt.indexOf('spoofer') == -1)
            && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera') == -1)
            && (agt.indexOf('webtv') == -1));
}

function restrictLength(e, length) {

	if (e.value.length > length) {
		e.value = e.value.substring(0, length);
		alert("This field cannot be longer than {0} characters".replace('{0}', length));

	}
}
