function adressemail($user)
{
 var $domain = "ektacom";
 var $status = "mailto:";
 
 $domain = $domain + ".com";
 $status = $status + $user + "@" + $domain;

 window.location=$status;
}

function PopupOpen(page,nom, pnHeight, pnWidth)
{
 sTop = (screen.height-pnHeight)/2;
 left = (screen.width-pnWidth)/2;

 option = 'resizable=no, location=no, menubar=no, status=no, scrollbars=yes,top='+sTop+', left='+left+', height='+pnHeight+',  width='+pnWidth+"'";
 mafen = window.open(page,nom,option);
 mafen.focus();
}

function SendForm(formname)
{
 formname.submit();
}
    
function ConfirmLocation(message, url)
{
 if (confirm(message))
  document.location = url;
}
    
function trim(inputString)
{   
 if (typeof inputString != "string") { return inputString; }

 var retValue = inputString;
 var ch = retValue.substring(0, 1);

 while (ch == " ")
 {
  retValue = retValue.substring(1, retValue.length);
  ch = retValue.substring(0, 1);
 }

 ch = retValue.substring(retValue.length-1, retValue.length);
 while (ch == " ")
 {
  retValue = retValue.substring(0, retValue.length-1);
  ch = retValue.substring(retValue.length-1, retValue.length);
 }

 while (retValue.indexOf("  ") != -1)
 {
  retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length);
 }
 return retValue;
}

function affiche(action, calque){
  var voir;
  var display;
  if (action == "cache"){
  voir = "hidden";
  display = "none";
  }
  else {
   voir = "visible";
   display = "block";
  }	
  // document.getElementById("bulle").innerHTML = contenu;
  function init() {
   document.onmousemove=mousemove;
  }
  function mousemove(e) {
   if (navigator.appName.indexOf("Explorer") > -1) {
   var mouseX=event.x+document.body.scrollLeft; var mouseY=event.y+document.body.scrollTop;;
  }
  else {var mouseX=e.pageX; var mouseY=e.pageY;}

  document.getElementById(calque).style.top = mouseY-100+"px";
  document.getElementById(calque).style.left = mouseX+20+"px";
  document.getElementById(calque).style.visibility = voir;
  document.getElementById(calque).style.display = display; 
 }
 init();
 function cache(){
 document.getElementById(calque).style.visibility = "hidden";
 }
}
