/*********************************************************
Fonctions de bases pour illicopage
**********************************************************/

/* Fonction d'ouverture d'un popup : evite le target */
function winOpen(url, largeur, hauteur){
      gauche = (screen.width/2)-(largeur/2);
      haut = (screen.height/2)-(hauteur/2);
      window.open(url,"popup","height="+hauteur+",width="+largeur+",status = no,toolbar = no,menubar = no,location = no,resizable = no,titlebar = no,scrollbars = yes,fullscreen = no,top ="+haut+",left ="+gauche);
   }


/* Fonction de remplissage d'un div avec le contenu passé par programme */
function ChangeMessage(message,champ)
{
	var msg2 = message.replace(/\&gt\;/gi, ">");
	msg2 = msg2.replace(/\&lt\;/gi, "<");

  if(document.getElementById)
    document.getElementById(champ).innerHTML = msg2;
}

/* Fonction d'ouverture de la version imprimable*/
function printer_friendly()
{
	
	ret = window.open('/cgi-local/printer_friendly.pl?url='+url_printer, 'printer_friendly','width=800,height=600,scrollbars=1');
	
}

/* Fonction de passage à la version malvoyant */
function version_malvoyant()
{
	if( url_lien_malvoyant != "" )
		document.location=url_lien_malvoyant;
	
}

/* Fonction d'ajout du site aux favoris : Attention à l'adresse du site*/
function favoris() 
{
	if ( navigator.appName != 'Microsoft Internet Explorer' ){ 
		window.sidebar.addPanel("Mobigo","http://www.mobigo.com",""); 
	}
	else { 
		window.external.AddFavorite("http://www.mobigo.com","Mobigo"); 
	} 
}
/* Fonction de transformation de la page html en un fichier pdf */
function version_pdf()
{
    ret = window.open('/cgi-local/imprime-pdf.pl?url='+url_printer, 'printer_friendly','width=800,height=600,scrollbars=1');
    
}

/* Initialisation des parametres */

var prse_menu_lateral = 0;
var url_printer = "";
var url_lien_malvoyant = "";


