/**
 * SCRIPT.JS
 *
 * Fichier regroupant l'ensemble des fonctins javascript du site public.
 *
 * @Auteur : Cybersushi Prod
 * @Version : 1
 **/

//
// Fonctions gérant les menu déroulant sous IE
//
sfHover = function() 
{
	if (document.all)
	{
		var y=0;
		var loop=true;
		while (loop==true)
		{
			y++;
			id="nav_"+y;
			if (!document.getElementById(id)) 
			{ 
				loop=false; 
				return false;
			}
			else
			{
				var sfEls = document.getElementById(id).getElementsByTagName("li");
				for (var i=0; i<sfEls.length; i++) 
				{
					sfEls[i].onmouseover=function() 
					{
						this.className+=" sfhover";
					}
					sfEls[i].onmouseout=function() 
					{
						this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
					}
				}
			}
		}
	}
}

function ddmOver(it)
{
	if (document.all) it.className+=" sfhover";
}

function ddmOut(it)
{
	if (document.all) it.className=it.className.replace(new RegExp(" sfhover\\b"), "");
}

//
// Fonctions d'affiche des sous parties du menu gauche
//
function affiche(it)
{
	var parentH2 = it.parentNode;
	var maskDiv = parentH2.nextSibling;
	if (maskDiv.nodeName!='DIV') maskDiv = maskDiv.nextSibling; // Compatibilité Firefox

	if (parentH2.className == "ouvert") 
	{
		parentH2.className = "ferme";
		maskDiv.className = "masque";
	}
	else 
	{
		parentH2.className = "ouvert";
		maskDiv.className = "affiche";
	}
	return false;
}

//
// Statistiques XITI
//
function stats(adresse)
{
	Xt_param = 's=153255&p='+adresse;
	try {Xt_r = top.document.referrer;}
	catch(e) {Xt_r = document.referrer; }
	Xt_h = new Date();
	Xt_i = '<img style="display:none;" alt="XITI" ';
	Xt_i += 'src="http://logv25.xiti.com/vcg.xiti?'+Xt_param;
	Xt_i += '&hl='+Xt_h.getHours()+'x'+Xt_h.getMinutes()+'x'+Xt_h.getSeconds();
	if(parseFloat(navigator.appVersion)>=4)
	{Xt_s=screen;Xt_i+='&r='+Xt_s.width+'x'+Xt_s.height+'x'+Xt_s.pixelDepth+'x'+Xt_s.colorDepth;}
	document.write(Xt_i+'&ref='+Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$')+'" title="Internet Audience">');
}