

/*-- 
	Systeme de Shortcuts venant de : ghtml.com
	Adaptation pour Mairie de Dreux :  (c)Stockho .2005
	rev. du 27 Décembre 2004 // adaptation
--*/
var key; // Pressed key
var myKeyCode;
var oShiftKey;
var id_Browser;

	function showMe_shortcuts(){
	var txtshiftKey="|-------------------------|\n";
	var a="__ About ShortCuts :\n";
	var z="__ (c) Stockho - 2004\n\ ";
	
	var concatString=txtshiftKey+a+z+txtshiftKey;
	alert(concatString);
	}

function takeShortCut(){
var url = document.URL;

	if (url.indexOf("glossaire") >=0 ){
		/**/
		switch(oShiftKey&&key){
		case key:
		location.href = "./glossaire.php?L=" + key;
		break;
		}
		
		switch(key){
		case "?":
		showMe_shortcuts();
		break;
		
		case "$":
		location.href = "./AdminListe.php?";
		break;
		}

		
	}
}
	
// Reads value of pressed key
function findKey(e){
	var theEvent;
	if(document.all){
	theEvent = event.keyCode;
	oShiftKey=event.shiftKey;
	id_Browser="IE";
	//alert(theEvent);
	}else{
	theEvent=e.keyCode;
	theEvent = e.which;
	oShiftKey=e.shiftKey;
	id_Browser="Else";
	//alert(theEvent);
	}
	key = String.fromCharCode(theEvent).toLowerCase();
	myKeyCode=theEvent;
	takeShortCut();
}

// Initializing
document.onkeypress = findKey;	

