function textCounter(fieldName, counterName, max) {
	if(fieldName.value.length>max) {
		fieldName.value=fieldName.value.substring(0, max);
	}
	else {
		document.getElementById(counterName).innerHTML=max-fieldName.value.length;
	}
}

function right(e) {
	var msg = "The context menu is disabled.";
	if (navigator.appName == 'Netscape' && e.which == 3) {
		alert(msg);
		return false;
	}
	if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
		alert(msg);
		return false;
	}
	else {
		return true;
	}
}

function imageDetect() {
	if(document.images) {
		for(i=0;i<document.images.length;i++) {
			document.images[i].onmousedown = right;
			document.images[i].onmouseup = right;
		}
	}
}
