<!-- 

// JavaScript Document

function NoError()
	{
	return true;
	}

window.onerror=NoError;

function affform() {
    $("form#commentform").show("slow");
    $("#cacher").show();
    $("#afficher").hide();

}

function cacheform() {
    $("form#commentform").hide("slow");
    $("#cacher").hide();
    $("#afficher").show();
}

if (parent.frames.length > 0)
	{
	window.top.location.href = location.href;
	}

function clic(id) 
{ 
	if(document.images) 
	(new Image()).src="/out.php?id=" + id; 
	return true; 
}

function popup(id) 
{ 
	if(document.images) 
	(new Image()).src="/out.php?popup=" + id; 
	return true; 
}

function vote(id)
{
	obj = document.getElementById('resultat-' +id);

	// ON EFFACE LE CONTENU DU DIV
		obj.innerHTML = "";
			if(window.XMLHttpRequest) // FIREFOX
				xhr_object = new XMLHttpRequest();
			else if(window.ActiveXObject) // IE
				xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
			else
				return(false);

	// CONTROLE DE L'ETAT DE LA REQUETE
	// CHAQUE CHANGEMENT D'ETAT AFFICHE UNE LIGNE DANS NOTRE DIV

	xhr_object.onreadystatechange = function()
	{
		if(xhr_object.readyState == 4)
		{
			// ON CONTROLE LE STATUS (ERREUR 404, ETC)
				if(xhr_object.status == 200)
					obj.innerHTML += xhr_object.responseText;
				else
					obj.innerHTML += xhr_object.status;
		}
	};

	// ON APPELLE LA PAGE
		xhr_object.open("GET", "galerie_vote.php?galerie=" +id, true);
		xhr_object.send(null);
}



	function DivStatus( nom, numero )
		{
			var divID = nom + numero;
			if ( document.getElementById && document.getElementById( divID ) ) // Pour les navigateurs récents
				{
					Pdiv = document.getElementById( divID );
					PcH = true;
		 		}
			else if ( document.all && document.all[ divID ] ) // Pour les veilles versions
				{
					Pdiv = document.all[ divID ];
					PcH = true;
				}
			else if ( document.layers && document.layers[ divID ] ) // Pour les très veilles versions
				{
					Pdiv = document.layers[ divID ];
					PcH = true;
				}
			else
				{
					
					PcH = false;
				}
			if ( PcH )
				{
					Pdiv.className = ( Pdiv.className == 'cachediv' ) ? '' : 'cachediv';
				}
		}

   ns4  = document.layers
   ie4  = document.all
   nn6 = document.getElementById && !document.all

function popOn(id){
if (ns4) {
      document.lapop.visibility = "show";
   }
   else if (ie4) {
      document.all['lapop'].style.visibility = "visible";
   }
   else if (nn6) {
      document.getElementById('lapop').style.visibility = "visible";
   }
} // fin de popOn()

function popOff(){
if (ns4) {
    document.lapop.visibility="hide";
} else if (ie4) {
    document.all['lapop'].style.visibility="hidden";
}
else if (nn6) {
      document.getElementById('lapop').style.visibility = "hidden";
   }
} // fin de popOff()
//-->
