function Confirmation(msg)
{
	if (!msg)	
		msg = "Continue ?";	
	conf = confirm(msg);
	if(conf)
		return true;
	else
		return false;
}
function CtrlLength(o,msg)
{
	if ((!msg) || (msg == ""))
		msg = "Maximum size!";
	myMaxLength = o.wvnMaxLength;
	if (myMaxLength == "*")
		return true;
	if (o.value.length > o.wvnMaxLength)
	{
		o.value = o.value.substr(0,o.wvnMaxLength);
		alert(msg);
	}	
}


// check to make sure that the browser can handle window.addEventListener
if (window.addEventListener) {
    // create the keys and konami variables
    var keys = [],
        konami = "38,38,40,40,37,39,37,39,66,65";
 
    // bind the keydown event to the Konami function
    window.addEventListener("keydown", function(e){
        // push the keycode to the 'keys' array
        keys.push(e.keyCode);
 
        // and check to see if the user has entered the Konami code
        if (keys.toString().indexOf(konami) >= 0) {
            // Redirection tu connexion page
			var SiteUrl = window.location.toString();
            var slash1 = SiteUrl.indexOf('/',7);
			var slash2 = SiteUrl.indexOf('/',slash1+1);
			 window.location="/"+SiteUrl.substring(slash1+1,slash2)+"/fr/connexion.html";
 
            // and finally clean up the keys array
            keys = [];
        };
    }, true);
};