// ***************** création du .js *****************



// la premiere image demare le timer
xxx=0;

st = "";
st1 = "||";

function ccc()
{
xxx++;
st = st+' '+st1 ;
timeoutID=window.setTimeout("ccc()",1000);
//txtch.innerText=xxx-delais-1; // montre le decompte
self.status = 'Photo tous droits réservés. - Chargement: '+st ; 
}
//ccc();


// la dexieme image en prechargement appele la page suivante, si le delais est expirer affiche tout de suite
function suite()
{
if(xxx > delais){location.href=pp;} else {timeoutID=window.setTimeout("suite()",500);}
}

//window.resizeTo(screen.width.value=document.width,screen.height.value=haut);
function stoper(){window.clearTimeout(timeoutID);   self.status =  'Stop';}

var lrg="";
var haut="";
var x="";
var y="";
function recadre(){

if(document.photo.width =="" || document.photo.width =="0"){timeoutID=window.setTimeout("recadre()",100);}


if(lrg ==""){
lrg = document.photo.width;
haut = document.photo.height;}


if(haut < lrg){
//paysage
marge = 25;
TaileFenetre = document.body.clientWidth;
multip = TaileFenetre / lrg;
x = (lrg * multip) - marge ;
y = (haut * multip) - marge ;  if( haut > y || lrg > x){  photo.width=x;  photo.height=y;  }   }
else {

	marge = 70;
	TaileFenetre = document.body.clientWidth;
	multip2 = TaileFenetre / haut;
x = (lrg * multip2) - marge ;
y = (haut * multip2) - marge ;
	
	if( haut > y || lrg > x){ 
	photo.width=x;
	photo.height=y;
	} 
}

}


function dp(){recadre(); popglis(); }
window.onresize = dp; 


//recadre(); // pour l'ouverture onload image



//var diapoSmall="";


document.write('<DIV ID="glis" align="center"  style="position:absolute;visibility:visible;"></DIV>');
document.write('<DIV ID="glis2" align="center"  style="width:280px; position:absolute; visibility:hidden;"></DIV>');
document.write('<DIV ID="glis3" align="center"  style="font-family:Arial; font-size:10px;  position:absolute; visibility:hidden;"></DIV>');
document.write('<DIV ID="glis4" align="center"  style="font-family:Arial; font-size:10px;  position:absolute; visibility:hidden;"></DIV>');

if(diapoSmall=="non"){var content='<table border="0" cellpadding="1" cellspacing="0" width="100%"><tr><td><p align="center"><a href="javascript:parent.window.location.href=\'../\';"  class="b4">Sortir</a>  <a href="javascript:void(0)"  onClick="window.clearTimeout(timeoutID); this.style.background=\'red\';" class="b4">Stop</a></p></td></tr></table>';}
if(diapoSmall=="oui"){var content='<table border="0" cellpadding="1" cellspacing="0" width="100%"><tr><td><p align="center"><a href="javascript:parent.window.location.href=\'../\';"  class="b4">Sortir</a>  <a href="javascript:void(0)"  onClick="window.clearTimeout(timeoutID); this.style.background=\'red\';" class="b4">Stop</a></p></td></tr></table>';}

function ferm(){document.getElementById("glis2").style.visibility='hidden';}


function popglis(){
document.getElementById("glis").innerHTML=content;
document.getElementById("glis").style.left=0;
document.getElementById("glis").style.top=(document.body.clientHeight)-50 ;
var content2='<table border="0" cellpadding="5"  cellspacing="0" bgcolor="#fffff0" class="trans1" style="filter:alpha(opacity=100)"><tr><td align="center"><font size=2 face=tahoma onclick=javascript:ferm(); title=Masquer style=cursor:help;>'+legend+'</td></tr></table>';
	document.getElementById("glis2").innerHTML=content2;
	document.getElementById("glis2").style.left=(document.body.clientWidth / 2) - 140;
	document.getElementById("glis2").style.top=(document.body.clientHeight)-130 ; var content3='<a href="./sm_diapo101.htm">Version Bas débit</a> | <a href="./diapo101.htm">Haut débit</a>';
	document.getElementById("glis3").innerHTML=content3;
	document.getElementById("glis3").style.left=document.body.clientWidth-165;
	document.getElementById("glis3").style.top=document.body.clientHeight-25 ;
	document.getElementById("glis3").style.visibility='visible'; }

popglis();

	function tf(){ if(legend != ""){document.getElementById("glis2").style.visibility='visible';} }
	window.setTimeout('tf();',2000);



