function statut(text) {
window.defaultStatus ='Chambres d\'hôtes sur pays-fort.net'
 //if(self.name==top.name) { location.href="index.php" }
}

var isMinIE5 = (navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0
var isMinIE6 = (navigator.appVersion.indexOf("6.") >= 0) ? 1 : 0


function getdElement(d,nm) {
  if(nm == '') return null;
  return d.getElementById?d.getElementById(nm):(d.all?d.all(nm):null)
}
function getElement(nm) { return getdElement(document,nm) }

function set800() {
 if (screen.availWidth) { if (screen.availWidth>800) window.resizeTo(800,600)  }
}

function setOn(no){
	setOff(no)
	var item=getElement('mnu'+no)
	if (item) item.className='mnuON'
}
function setOff(no){
 for ( var i=1; i<12; i++){
	var item=getElement('mnu'+i)
	if (item){ if (no!=i) item.className='mnuOFF' }
 }
}

var photo_left=1; var photo_right=5;
var clic=0; var clic2 =0;


function incPhoto(photo_left){
 var element = getElement('m1')
 if (element){
	 photo_left++; if (photo_left>3) photo_left=1
	 if (element.filters) if (element.filters.length>0) element.filters(0).Apply();
	 element.style.backgroundImage ='url("images/accueil/accueil'+photo_left+'.jpg")'
	 if (element.filters) if (element.filters.length>0) element.filters(0).Play();
	 clic=window.setTimeout("incPhoto("+photo_left+")", 3000);
 }
}
function incPhoto2(photo_right){
 var item = getElement('m3')
 if (item){
	 photo_right++; if (photo_right>7) photo_right=5
	 if (item.filters) if (item.filters.length>0) item.filters(0).Apply();
	 item.style.backgroundImage ='url("images/accueil/accueil'+photo_right+'.jpg")'
	 if (item.filters) if (item.filters.length>0) item.filters(0).Play();
	 clic2=window.setTimeout("incPhoto2("+photo_right+")", 3000);
 }
}
function initPhotos(){
         clic =window.setTimeout("incPhoto(photo_left)", 3000);
         clic2=window.setTimeout("incPhoto2(photo_right)", 1500);
}


var nouveau;
function photo(nom, width, height){
 if (nouveau) {	if ( !nouveau.closed ) nouveau.close(); }
 nouveau =window.open('','photo','height='+height+',width='+width+',status=no,toolbar=no,menubar=no,location=no');
 nouveau.document.write('<html><body onLoad="window.focus();" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff" onclick="window.close()" scroll="no"><center><img src="'+nom+'" style="cursor:hand;" border="0" alt=""></center></body></html>');
}
function pop(nom, width, height){
 if (nouveau) {	if ( !nouveau.closed ) nouveau.close(); }
 nouveau =window.open(nom,'photo','height='+height+',width='+width+', scrollbars=yes, status=no,toolbar=no,menubar=no,location=no');
}

function stopError() { return true; }
 
window.onerror = stopError;
window.onload=statut;






