function hoverswitch(name, hover) 
{ 
 if (document.images && document.getElementById) 
 {
  if (hover == 1) { document.getElementById('menu-'+name).src = "images-v2/menu-"+name+"-h.jpg"; }
  else { document.getElementById('menu-'+name).src = "images-v2/menu-"+name+".jpg"; }
 } 
} 

function showitem(item)
{
 var f = document.getElementById(item);
 if (f.style.visibility == "visible") { f.style.visibility = "hidden"; mkcook("show-"+item, "0"); } else { f.style.visibility = "visible"; mkcook("show-"+item, "1"); }
 if (f.style.display == "block") { f.style.display = "none"; mkcook("show-"+item, "0"); } else { f.style.display = "block"; mkcook("show-"+item, "1"); }
 return false
}

function autoshowitems()
{
 var tempp;
 //
 tempp = getcook("show-outils-3xdl");
 if (tempp == "1") { tempp = showitem("outils-3xdl"); }
 tempp = getcook("show-outils-mbs");
 if (tempp == "1") { tempp = showitem("outils-mbs"); }
 tempp = getcook("show-outils-paysites");
 if (tempp == "1") { tempp = showitem("outils-paysites"); }
 tempp = getcook("show-outils-evolucash");
 if (tempp == "1") { tempp = showitem("outils-evolucash"); }
 tempp = getcook("show-outils-3xphone");
 if (tempp == "1") { tempp = showitem("outils-3xphone"); }
}

function mkcook(nom, contenu)
{
 var expireDate = new Date();
 expireDate.setTime(expireDate.getTime() + 500*24*3600*1000);
 document.cookie = nom + "=" + escape(contenu) + ";expires=" + expireDate.toGMTString();
}
   
function getcook(nom)
{
 var deb,fin;
 deb = document.cookie.indexOf(nom + "=");
 if (deb >= 0)
 {
  deb += nom.length + 1;
  fin = document.cookie.indexOf(";",deb);
  if (fin < 0) fin = document.cookie.length;
  return unescape(document.cookie.substring(deb,fin));
 }
 return "";
}
