var iRoot = "http://87.0.9.237/pirate/";

// FONCTIONS
function newImg(arg)
{	rslt = new Image();	rslt.src = arg;	return rslt;	}

function chgImg()
{
	if (preloadFlag) {	
		for (i=0; i<(chgImg.arguments.length/2); i++)	{
			document.getElementById(chgImg.arguments[i*2]).src = chgImg.arguments[(i*2)+1];
		}
	}
}

function verifVer()	{
/*	if (typeof(parent.iVer)!="undefined") {
		if (typeof(parent.iVer[iPage])=="undefined")	{
			refVer = parent.iVer['global'];
		} else {
			refVer = parent.iVer[iPage];
		}
		if (refVer != iVer)	{
			if (typeof(parent.iReload)!="undefined")	{
				if (typeof(parent.iReload[iPage]) == "undefined")	{
					document.location.reload();
					parent.iReload[iPage] = true;
				}
			}
		}
	}
*/
	parent.affTitre(iPage);
}

function preImg() {
	if ((document.images)&&(typeof(nbrImg)!="undefined")) {
		x=new Object();
		for (i=1; i<=tabImgNbr; i++)	{
			x[i] = newImg(tabImg[i]);
		}
		preloadFlag = true;
	}
}

function agrandis(x,y,z)	{
	imgOpen[1] = x;
	imgOpen[2] = y;
	imgOpen[3] = z;
//	urgl = "../global/popuper.html";
	urgl = x;
    posX = 20;
	posY = 20;
	winPopup = window.open(urgl, "Fiches", "resizable=yes,left=" + posX + ",top=" + posY + ",width=" + Math.min(y,(screen.availWidth-60)) + ",height=" + Math.min(z,(screen.availHeight-60)) + ",scroll=auto");
}

// INITIALISATION
iMaj = 36;
if (typeof(top.iMajForce) == "boolean")	{
	if ((top.iMaj != iMaj) || (top.iMajForce))	{
		top.iMajForce = true;
		if (typeof(top.recMaj[document.location]) != "boolean")	{
			top.recMaj[document.location] = true;
			if (document.location.indexOf("home.html") > 0) setTimeout('top.iFlash = false;', 100);
			setTimeout('document.location.reload(true);', 100);
		}
	}
}

var preloadFlag = true;
var indDest = "";
imgOpen = new Array();

/*
if ((top.document.URL == "http://www.humano.com/bilal/index.php") || (top.document.URL == "http://www.humano.com/bilal/"))  {
	iRepBase = "http://www.humano.com/bilal/";
	iRepDyn = "http://www.humano.com/bilal/dyn/";	
} else if ((top.document.URL == "http://www.humano.com/bilal/index.php") || (top.document.URL == "http://www.humano.com/bilal/")) {
	setTimeout('top.document.URL = "http://www.humano.com/bilal/index.php";', 200);
} else if ((top.document.URL == "http://www.enkibilal.org/index.php") || (top.document.URL == "http://www.enkibilal.org/"))	{
	iRepBase = "http://www.enkibilal.org/";
	iRepDyn = "http://www.enkibilal.org/dyn/";
} else if ((top.document.URL.indexOf("http://humanix") == 0) || (top.document.URL.indexOf("file:") == 0))	{ 
	iRepBase = "http://humanix/bilal/";
	iRepDyn = "http://humanix/bilal/dyn/";
} else { 
	setTimeout('top.document.location.href="http://www.humano.com/bilal/index.php"', 100);
}
*/