function statut(text) {
window.defaultStatus ='DOMAINE DES FINES CAILLOTTES - Jean pabiot et Fils'
 //if(self.name==top.name) { location.href="index.html" }
}

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 (navigator.appName.indexOf('Microsoft')!=-1) {
 if (screen.availHeight>=600) if (screen.availWidth>=800) window.resizeTo(800,730)  }
}

function setOn(no){
	setOff(no)
	var item=getElement('m'+no)
	if (item){
    if (no<9){item.className='menuON'}
    else{item.className='smenuON'}
    }
}


function setTitre(titre) { var item=getElement('titre');if (item) item.innerHTML = titre; }

function setOff(no){
 hideMenu();
 for ( var i=1; i<9; i++)
 if (no!=i){
	var item=getElement('m'+i)
	if (item){ item.className='menuOFF' }
}
for ( var i=9; i<19; i++)
 if (no!=i){
	var item=getElement('m'+i)
	if (item){ item.className='smenuOFF' }
 }
}


function setpOn(no){
	setpOff(no)
	var item=getElement('para'+no)
	if (item) item.className='paraON'
}
function setpOff(no){
 for ( var i=1; i<12; i++) 
 if (no!=i){
	var item=getElement('para'+i)
	if (item){ item.className='paraOFF' }
 }
}

function preloadImages(){
// onload="preloadImages('images/m1.gif', ... , 'images/m42.gif')" 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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;

function setMenu(no){
    //tempo=false;
    //hideMenu2()
    hideMenu(no)
    //setOn(no)
	var element=document.getElementById('smenu'+no)
	if (element) element.style.display = 'block';
}
function hideMenu(no){
  //if(tempo==false)
  for(i=1;i<20;i++){
   //setOff(no)
   var element=document.getElementById('smenu'+i)
   if (element) if (no!=i) element.style.display = 'none';
  }
}

/*function hideMenu(){
  tempo=true;
  window.setTimeout('hideMenu2()',1000);
}*/

/*  retailler la PAGE en hauteur  */
function setHeight(){
  var item = getElement('main')
  if (item) {
    h = parseInt(  item.offsetHeight   )-86
    if (h>1) getElement('page').style.height=h+'px';
    //alert( h )
  }
}


function quit(){ window.open('merci.html','MERCI','fullscreen=0,top=0,left=0,width=300,height=300,status=no,toolbar=no,'); }

