//you must either define capsError as a function or a message to be alerted

	//this will make the script alert a message if Caps Lock is engaged
	var capsError = 'WARNING:\n\nCaps Lock is enabled\n\nThis field is case sensitive';

	//this will make the script run a function and pass it a parameter saying if Caps Lock is engaged
	//function format NOT compatible with v1 - it will now be run even if Caps Lock is not enabled
	function capsError( capsEngaged ) {
		if( capsEngaged ) {
			//do something to warn the user that caps lock is engaged
		} else {
			//remove any warnings that caps lock is engaged
			alert( capsError );
		}
	}
function capsDetect( e ) {
	if( !e ) { e = window.event; } if( !e ) { MWJ_say_Caps( false ); return; }
	//what (case sensitive in good browsers) key was pressed
	var theKey = e.which ? e.which : ( e.keyCode ? e.keyCode : ( e.charCode ? e.charCode : 0 ) );
	//was the shift key was pressed
	var theShift = e.shiftKey || ( e.modifiers && ( e.modifiers & 4 ) ); //bitWise AND
	//if upper case, check if shift is not pressed. if lower case, check if shift is pressed
	MWJ_say_Caps( ( theKey > 64 && theKey < 91 && !theShift ) || ( theKey > 96 && theKey < 123 && theShift ) );
}
function MWJ_say_Caps( oC ) {
	
		if( oC ) { document.getElementById('caps').style.display=""; }
		else { document.getElementById('caps').style.display="none";	}
		
}