function RollOverMenuCarte(iId) {
  sObject = document.getElementById("menu_carte"+iId);
  if(sObject==null)
    sObject = document.getElementById("menu_carte"+iId+"_on");
  sObject.className='menu_carte_on';
  sObject.id = "menu_carte" + iId + "_on";
}

function RollOutMenuCarte(iId) {
  sObject = document.getElementById("menu_carte"+iId+"_on");
  sObject.className='menu_carte_off';
  sObject.id = "menu_carte" + iId;
}

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
{
    for(var i=0; i<document.images.length; i++)
    {
        var img = document.images[i]
        var imgName = img.src.toUpperCase()        
        if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
        {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle     
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
                            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
                            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
            img.outerHTML = strNewHTML
            i = i-1
        }
    }
}

function ChangeMenu(iId) 
{
  sObject = document.getElementById('menu' + iId);
  if (sObject.src.substring(sObject.src.length-7, sObject.src.length) == "_on.gif") {
     sObject.src = sObject.src.replace("_on.gif", ".gif");
  }
  else {
     sObject.src = sObject.src.replace(".gif", "_on.gif");
  }  
}


function ChoixContact(iIdForm,iIdIntro,iIdPhrase, hContactId) {

  document.getElementById(hContactId).value = iIdIntro;
  
  var d = document.getElementById('form'+iIdForm);
  	for (var i = 1; i<=10; i++) {
  		if (document.getElementById('form'+i)) {document.getElementById('form'+i).style.display='none';}
  	}
  if (d) {d.style.display='block';}
  
  var d = document.getElementById('phrase-form'+iIdPhrase);
  	for (var i = 1; i<=10; i++) {
  		if (document.getElementById('phrase-form'+i)) {document.getElementById('phrase-form'+i).style.display='none';}
  	}
  if (d) {d.style.display='block';}
  
  var d = document.getElementById('intro-contact'+iIdIntro);
  	for (var i = 1; i<=10; i++) {
  		if (document.getElementById('intro-contact'+i)) {document.getElementById('intro-contact'+i).style.display='none';}
  	}
  if (d) {d.style.display='block';}
}

function ShowHide(idForm)
{
  var d = document.getElementById('div-' + idForm);
  var cb = document.getElementById('cb-' + idForm);
  
  
  if (cb.checked == true)
    d.style.display = '';
   else
    d.style.display = 'none';
}