////////////////////////////  LOGO BI EN BAS A GAUCHE  ////////////////////////////////

// PARAMETRAGE DU SCRIPT
var tjs_delai=0;
var tjs_max=2000;
var tjs_mode=1; // 0 - calque toujours en haut de page / 1 - calque en bas

// LE RESTE NE CHANGE PAS
var tjs_hauteur=0;
function PrintCalque(left,top,width,height,contenu) {
	left=18;
	tjs_hauteur=height;
	if ((document.all)||(document.getElementById)) {
		var Z="<DIV id='logoBI' style='position:absolute;left:"+left+";top:"+top+";width:"+width+";height:"+height+"'>"+contenu+"</DIV>";
	} else {
		var Z="<LAYER name='logoBI' left="+left+" top="+top+" width="+width+" height="+height+">"+contenu+"</LAYER>";
	}
	document.write(Z);
	setTimeout("Start()",tjs_delai);
}
function Start() {
	MoveLayer("logoBI",GetTop("logoBI"));
	setTimeout("Start()",tjs_delai);
}
function Debug() {
	var obj=document.body
	var Z="";
	for (var i in obj) {
		Z+=i+"="+obj[i]+"\n";
	}
	alert(Z);
}
function MoveLayer(nom,top) {
	if (document.getElementById) { //IE5 et NS6
		document.getElementById(nom).style.top=top;
	}
	if ((document.all)&&(!document.getElementById)) { //IE4 seul
		document.all[nom].style.top=top;
	}
	if (document.layers) { //NS4.X seul
		document.layers[nom].top=top;
	}
}
function GetTop(nom) {
	// Partie 1 : Récupération de la position du calque et de la page
	if (document.getElementById) { //IE5
		var pos=parseInt(document.getElementById(nom).style.top);
		var wintop=parseInt(document.body.scrollTop);
		var avail=document.body.clientHeight;
	}
	if ((document.getElementById)&&(!document.all)) { //NS6
		var pos=parseInt(document.getElementById(nom).style.top);
		var wintop=parseInt(window.pageYOffset);
		var avail=window.innerHeight;
	}
	if ((document.all)&&(!document.getElementById)) { //IE4 seul
		var pos=parseInt(document.all[nom].style.top);
		var wintop=parseInt(document.body.scrollTop);
		var avail=document.body.clientHeight;
	}
	if (document.layers) { //NS4.X seul
		var pos=parseInt(document.layers[nom].top);
		var wintop=parseInt(window.pageYOffset);
		var avail=window.innerHeight;
	}

	// Partie 2 : Traitement de la position
	if (tjs_mode==0) { // toujours en haut
		var delta=Math.ceil((pos-wintop)/3);
		if (delta>tjs_max) {delta=tjs_max;}
		if (delta<-1*tjs_max) {delta=-1*tjs_max;}
		var top=pos-delta;
	}
	if (tjs_mode==1) {// toujours en bas
		var delta=Math.ceil((pos-(wintop+avail-tjs_hauteur)));
		if (delta>tjs_max) {delta=tjs_max;}
		if (delta<-1*tjs_max) {delta=-1*tjs_max;}
		var top=pos-delta;
	}
	return top;
}


/* FONCTION D'OUVERTURE DE L'A380 NAVIGATOR */
function openNavigator() {
	owa380W = screen.availWidth - 5;
	owa380H = screen.availHeight;
	owa380 = window.open('http://www.airbus.com/A380/Default1.aspx','a380navigator','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, left=0, top=0, width='+owa380W+', height='+owa380H);
	if (window.focus) owa380.focus();
}


/* OPEN WINDOW DE L'EXPO PHOTOS */
function owexpo(numexp)
{
	var videog=((screen.availWidth-688)/2);
	var videoh=((screen.availHeight-390)/2);
	owexpo1 = eval('window.open("expo.html","exhibition","width=688,height=390,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,resizable=no,top=' + videoh +' ,left=' + videog+ '")');
}


/* OPEN WINDOW DU PLAN */
function owmap()
{
	var videog=((screen.availWidth-553)/2);
	var videoh=((screen.availHeight-360)/2);
	owplan = eval('window.open("ow_guided_tour.html","map","width=553,height=360,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,resizable=no,top=' + videoh +' ,left=' + videog+ '")');
}





/* FONCTION DE GESTION ROLL OVER NAV EN HAUT A DROITE */

function assignRoll(rubrik)
{
	if (rubrik!="")
	{
		window.parent.document.getElementById('articlesLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById('galleryLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById('guestbookLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById('goodiesLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById(rubrik).style.backgroundPosition="0px 14px";
		window.parent.frames['blue-nav'].document.location.href = window.parent.frames['blue-nav'].document.location.href;
	}
	else
	{
		window.parent.document.getElementById('articlesLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById('galleryLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById('guestbookLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById('goodiesLink').style.backgroundPosition="0px 0px";
		
	}
}

function LinkMouseOver(rubrik)
{
	//alert(rubrik);
	if (selectedLink != rubrik)
	{
		window.parent.document.getElementById('articlesLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById('galleryLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById('guestbookLink').style.backgroundPosition="0px 0px";
		window.parent.document.getElementById('goodiesLink').style.backgroundPosition="0px 0px";
		if (selectedLink != "")
			window.parent.document.getElementById(selectedLink).style.backgroundPosition="0px 14px";
		if (rubrik != "")
			window.parent.document.getElementById(rubrik).style.backgroundPosition="0px 14px";
	}
	else
	{
		if (selectedLink == "")
		{
			window.parent.document.getElementById('articlesLink').style.backgroundPosition="0px 0px";
			window.parent.document.getElementById('galleryLink').style.backgroundPosition="0px 0px";
			window.parent.document.getElementById('guestbookLink').style.backgroundPosition="0px 0px";
			window.parent.document.getElementById('goodiesLink').style.backgroundPosition="0px 0px";
		}
	}
}


/* FONCTION DE LA MULTIMEDIA BOX */
function openPict(pUrl)
{
	window.open("ow_openpict.aspx?url="+pUrl,"zoompict","width=640,height=480,scrollbars=no,status=no,resizable=yes")
}

/* FONCTION D'OUVERTURE DE LA POPUP ECARDS */
function owEcards(numEcards)
{
	var videog=((screen.availWidth-650)/2);
	var videoh=((screen.availHeight-368)/2);
	popupEcards = eval('window.open("ecards/ecards_form.aspx?photoId=' + numEcards + '","owecards","width=650,height=368,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,resizable=no,top=' + videoh +' ,left=' + videog+ '")');
}

/* FONCTION D'OUVERTURE DE LA POPUP TERMS */
function terms()
{
	var videog=((screen.availWidth-300)/2);
	var videoh=((screen.availHeight-490)/2);
	popupTerms = eval('window.open("terms_en.html","terms","width=300,height=490,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,resizable=no,top=' + videoh + ',left=' + videog + '")');
}

/* FONCTION D'OUVERTURE DES POPUP LIVE */
function owLive(playeur)
{
	var videog=((screen.availWidth-240)/2);
	var videoh=((screen.availHeight-180)/2);
	popupLive = eval('window.open("live/live_' + playeur + '.asp","owlive","width=240,height=180,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,resizable=no,top=' + videoh +' ,left=' + videog+ '")');
}

/* FONCTION D'OUVERTURE DES POPUP A380FF */
function owA380FF(videoFile)
{
	var videog=((screen.availWidth-240)/2);
	var videoh=((screen.availHeight-180)/2);
	popupLive = eval('window.open("videoA380FF.asp?vidfile=' + videoFile + '","owlive","width=240,height=180,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,resizable=no,top=' + videoh +' ,left=' + videog+ '")');
}