var divName = 'dek';
var offX = 16;
var offY = 16;
var imgserv = 'http://simg.jaludo.com/';
function mouseX(evt) {if (!evt) evt = window.event; if (evt.pageX) return evt.pageX; else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft); else return 0;} function mouseY(evt) {if (!evt) evt = window.event; if (evt.pageY) return evt.pageY; else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return 0;} function follow(evt) {if (document.getElementById) {var obj = document.getElementById(divName).style; obj.visibility = 'visible'; obj.left = (parseInt(mouseX(evt))+offX) + 'px';  obj.top = (parseInt(mouseY(evt))+offY) + 'px';}} document.onmousemove = follow;

function popup(msg)
{
   var content="<TABLE style='width: 100px; height: 100px' BORDER=1 bordercolor=#C0C0C0 CELLPADDING=0 CELLSPACING=0><TD ALIGN=center><img src='"+imgserv+msg+".jpg' width='100' height='100'></TD></TABLE>";
   document.getElementById('dek').innerHTML = content;
}

function kill()
{
   var content= "";
   document.getElementById('dek').innerHTML = content;
}

//fix for tooltip+image
document.onmousemove = follow_positiontip
function follow_positiontip(e)
{
	follow(e);
	positiontip(e);
}

<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

function hide (attrbt)
{
document.getElementById("moregames").style.display = "none";

}

function show (attrbt)
{
document.getElementById("moregames").style.display = "block";
}


function hideCR (attrbt)
{
document.getElementById("chatrules").style.display = "none";

}

function showCR (attrbt)
{
document.getElementById("chatrules").style.display = "block";
}

function highscore_tab_3 (attrbt)
{
document.getElementById("hinfo1").style.background = "#b8d4ef";
document.getElementById("hinfo2").style.background = "";
document.getElementById("hinfo3").style.background = "";
document.getElementById("hinfo4").style.background = "";
document.getElementById("hinfo5").style.background = "";
document.getElementById("hinfo6").style.background = "";

document.getElementById("hhh3").style.display = "block";
document.getElementById("hhh6").style.display = "none";
document.getElementById("hhh12").style.display = "none";
document.getElementById("hhh24").style.display = "none";
document.getElementById("hhhy").style.display = "none";
document.getElementById("hhhwp").style.display = "none";
}

function highscore_tab_6 (attrbt)
{

document.getElementById("hinfo1").style.background = "#b0c9eb";
document.getElementById("hinfo2").style.background = "#b8d4ef";
document.getElementById("hinfo3").style.background = "";
document.getElementById("hinfo4").style.background = "";
document.getElementById("hinfo5").style.background = "";
document.getElementById("hinfo6").style.background = "";

document.getElementById("hhh3").style.display = "none";
document.getElementById("hhh6").style.display = "block";
document.getElementById("hhh12").style.display = "none";
document.getElementById("hhh24").style.display = "none";
document.getElementById("hhhy").style.display = "none";
document.getElementById("hhhwp").style.display = "none";
}

function highscore_tab_12 (attrbt)
{

document.getElementById("hinfo1").style.background = "#b0c9eb";
document.getElementById("hinfo2").style.background = "";
document.getElementById("hinfo3").style.background = "#b8d4ef";
document.getElementById("hinfo4").style.background = "";
document.getElementById("hinfo5").style.background = "";
document.getElementById("hinfo6").style.background = "";

document.getElementById("hhh3").style.display = "none";
document.getElementById("hhh6").style.display = "none";
document.getElementById("hhh12").style.display = "block";
document.getElementById("hhh24").style.display = "none";
document.getElementById("hhhy").style.display = "none";
document.getElementById("hhhwp").style.display = "none";
}

function highscore_tab_24 (attrbt)
{

document.getElementById("hinfo1").style.background = "#b0c9eb";
document.getElementById("hinfo2").style.background = "";
document.getElementById("hinfo3").style.background = "";
document.getElementById("hinfo4").style.background = "#b8d4ef";
document.getElementById("hinfo5").style.background = "";
document.getElementById("hinfo6").style.background = "";

document.getElementById("hhh3").style.display = "none";
document.getElementById("hhh6").style.display = "none";
document.getElementById("hhh12").style.display = "none";
document.getElementById("hhh24").style.display = "block";
document.getElementById("hhhy").style.display = "none";
document.getElementById("hhhwp").style.display = "none";
}

function highscore_tab_y (attrbt)
{

document.getElementById("hinfo1").style.background = "#b0c9eb";
document.getElementById("hinfo2").style.background = "";
document.getElementById("hinfo3").style.background = "";
document.getElementById("hinfo4").style.background = "";
document.getElementById("hinfo5").style.background = "#b8d4ef";
document.getElementById("hinfo6").style.background = "";

document.getElementById("hhh3").style.display = "none";
document.getElementById("hhh6").style.display = "none";
document.getElementById("hhh12").style.display = "none";
document.getElementById("hhh24").style.display = "none";
document.getElementById("hhhy").style.display = "block";
document.getElementById("hhhwp").style.display = "none";
}

function highscore_tab_wp (attrbt)
{

document.getElementById("hinfo1").style.background = "#b0c9eb";
document.getElementById("hinfo2").style.background = "";
document.getElementById("hinfo3").style.background = "";
document.getElementById("hinfo4").style.background = "";
document.getElementById("hinfo5").style.background = "";
document.getElementById("hinfo6").style.background = "#b8d4ef";

document.getElementById("hhh3").style.display = "none";
document.getElementById("hhh6").style.display = "none";
document.getElementById("hhh12").style.display = "none";
document.getElementById("hhh24").style.display = "none";
document.getElementById("hhhy").style.display = "none";
document.getElementById("hhhwp").style.display = "block";
}

function searchgame(){
if(document.gamesearch.keyword.value != ''){
window.location = '/recherche/'+document.gamesearch.keyword.value;
}}

function EnterPressed(e) {

  var characterCode
  if(e && e.which){           // NN4 specific code
    e = e
    characterCode = e.which
  }
  else {
    e = event
    characterCode = e.keyCode // IE specific code
  }
  if (characterCode == 13) return true   // Enter key is 13
  else return false
}