//--------------------------------------
// toggle de span
//--------------------------------------
	function toggle(arg_span_id){
	// rend visible ou invisible la balise span concernée
	  span_style = document.getElementById(arg_span_id).style.display;
	  if (span_style && span_style == "none"){
	    document.getElementById(arg_span_id).style.display = "block";
	  }else{
	    document.getElementById(arg_span_id).style.display = "none";
	  }
	}

//--------------------------------------
// scripts pour Flash
//--------------------------------------
	function openwindow(chemin) {
	// fonction pour les ouvertures des différentes fenêtres
			nom="screen";
			largeur=640;
			hauteur=480;
			carac="width=" + largeur + ", height=" + hauteur + ", top=1, left=1, toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no, directories=no";
			opfen = window.open(chemin,nom,carac);
			window.opfen.focus();
		}



//--------------------------------------
// roll over d'images
//--------------------------------------
	function over(img_name)
			 { document.images[img_name].src = 'images/' + img_name + '.gif';}

	function out(img_name)
			{ document.images[img_name].src = 'images/' + img_name + '-on.gif'; }

	function load(img_name) { 
			var tmpImg = new Image(0, 0);
			tmpImg.src = 'images/' + img_name + '.gif'; }

//--------------------------------------
// ouverture fenetres
//--------------------------------------
	function openwin(fen, nom, largeur, hauteur) {
	// fonction pour les ouvertures des différentes fenêtres
			carac="width=" + largeur + ", height=" + hauteur + ", top=1, left=1, toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no, directories=no";
			opfen = window.open(fen,nom,carac);
			window.opfen.focus();
	}

	function openfull(fen) {
	// ouverture de la fenetre plein écran
			largeur=screen.availWidth-10;
			hauteur=screen.availHeight-15;
			opfen = openwin(fen, 'popup', largeur, hauteur);
	}



	var timeoutObj;

	function redirect(temps) {
	// redirection plein écran en fonction d'un chrono.
	 		if (temps > 0) {
 				//timeoutObj=setTimeout("openfull()",temps);
				larg=screen.availWidth-10;
				haut=screen.availHeight-15;
				timeoutObj=setTimeout("openwin( 'accueil.htm', 'barbarian', larg, haut )",temps);}
			 else {
				clearTimeout(timeoutObj);
				//openfull();
				larg=screen.availWidth-10;
				haut=screen.availHeight-15;
				timeoutObj=setTimeout("openwin( 'accueil.htm', 'barbarian', larg, haut )",temps);}
	}

//--------------------------------------
// Rechargement de page sur Nav4
//--------------------------------------
	function MM_reloadPage(init) {  
	//reloads the window if Nav4 resized
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
 	 	document.MM_pgW=innerWidth; 
		document.MM_pgH=innerHeight;
		onresize=MM_reloadPage; }}
  	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	
	MM_reloadPage(true);
