function capsDetect(evt, id){ 
	if(!evt){
		evt=window.event
	}
	if(!evt){
		showCapsWarning(false, id);
		return
	}
	var code=evt.which ? evt.which : (evt.keyCode ? evt.keyCode : (evt.charCode ? evt.charCode : 0));
	var mod=evt.shiftKey || (evt.modifiers && (evt.modifiers & 4));
	
	showCapsWarning((code>64 && code<91 && !mod) || (code>96 && code<123 && mod), id)
}

function showCapsWarning(code, id) {
	var obj=document.getElementById(id);
	if(obj!=null) {
		if(code) {
			obj.style.display="block"
		}
		else {
			obj.style.display="none"
		}
	}
	else if(code) {
		alert("Having Caps Lock on may cause you to enter your password\nincorrectly.\n\nYou should press Caps Lock to turn it off before entering your\npassword.")
	}
}

