function d4checkCaps( e, infoElem ) {
	if( !e ) {
		e = window.event;
	}
	if( !e ) {
		return;
	}
	//Tutkitaan painetun näppäimen case 3 eri tavalla
	var theKey = 0;
  	if( e.which ) {
		theKey = e.which;
	} //Netscape 4
 	else if( e.keyCode ) { 
		theKey = e.keyCode;
	} // IE
 	else if( e.charCode ) { 
		theKey = e.charCode
	}
	// Varmistetaan oliko Shift pohjassa
	var theShift = false;
	if( e.shiftKey ) { 
		theShift = e.shiftKey;
	} // IE
 	else if( e.modifiers ) { //Netscape
		if( e.modifiers & 4 ) { //Tutkitaan kolmatta bittiä
		  theShift = true;
		}
  	}
	//UpperCase ja Shiftiä ei painettu
	if( (theKey > 64 && theKey < 91 && !theShift) ||
  	    (theKey > 96 && theKey < 123 && theShift) ) {
		notifyCaps(true, infoElem);
	} else {
		notifyCaps(false, infoElem);	
	}
}

function notifyCaps(notify, infoElem){
	if(notify){
		infoElem.style.display = 'block';
		setTimeout("hideCaps(document.getElementById('" + infoElem.id +"'));", 9000);
	} else {
	   hideCaps(infoElem);	
	}
}
function hideCaps(infoElem){
    infoElem.style.display = 'none';
}

