function help(message,champ)
{
if(document.getElementById)
document.getElementById(champ).innerHTML = message;
} 

function replaceGui(chaine) {
chaine=chaine.replace(/["]/g,"'");
return chaine;
}

function ViewContent()
{
var Win = open("","","menubar=yes,scrollbars=yes");
  Win.moveTo(200,200);
  Win.document.write("<html><link href=\"styles.css\" rel=\"stylesheet\" type=\"text/css\"><body bgcolor=\"#000000\">");
  Win.document.write(document.getElementById("memoHtml1").innerHTML);
  Win.document.write("</body></html>");
  Win.document.close();
}

function Popup(url,nom,details) { window.open(url,nom,details)}

function PopupImage(img) { 
html = '<HTML><HEAD><TITLE>Image</TITLE><meta http-equiv="Pragma" content="no-cache"></HEAD><BODY leftmargin=0 marginwidth=0 topmargin=0 marginheigth=0 oncontextmenu="return false"  bgcolor="#000000"><CENTER>'+
'<a href="#" onClick="window.close()"><IMG SRC="'+img+'" BORDER=0 NAME=monImage alt="" border="0" onLoad="window.resizeTo(document.monImage.width+20,document.monImage.height+80); window.moveTo((screen.width-document.monImage.width)/2,5)"> </a></CENTER></BODY></HTML>';
ouvrirImage = window.open('','_blank','toolbar=0,location=0,menuBar=0,scrollbars=0,resizable=0');
ouvrirImage.document.write(html);
} 

function getXhr(){
var xhr = null; 
if(window.XMLHttpRequest) 
xhr = new XMLHttpRequest(); 
else if(window.ActiveXObject){ 
try {
xhr = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
}
else { 
alert("Votre navigateur ne supporte pas le javascripts"); 
xhr = false; 
} 
return xhr
}

function fun_menu(nom_menu,id_langue,id_menu){
var xhr = getXhr()
xhr.onreadystatechange = function(){
if(xhr.readyState == 4 && xhr.status == 200){
leselect = xhr.responseText;
document.getElementById('aff_menu').innerHTML = leselect;
}
}
xhr.open("POST","ajax-menu.php",true);
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	
var id_menu;
var nom_menu;
var id_langue;

xhr.send("id_menu="+id_menu+"&nom_menu="+nom_menu+"&id_langue="+id_langue);				
}
