// compatibilités
var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all

if(!document.getElementById) {
document.getElementById = function() {return null;};
}

// version générique
function setStyle(element, property, value) {
 element = document.getElementById(element);
 if(element.style) {element.style[property] = value;}
}

// déterminer la hauteur maximale du cadre interne
function resize(){
 var height, width, minus;

 if (document.body)
		height = document.body.offsetHeight, width = document.body.offsetWidth;
 else if (document.layers)
		height = window.innerHeight, width = window.innerWidth;

 // par défaut : 100%
 setStyle('glob_haut', 'height', '100%');
 setStyle('glob_haut', 'width', '100%');

 // imposer une taille mini à la div globale
 if (600 > height)
  setStyle('glob_haut', 'height', '600');
 if (1000 > width)
  setStyle('glob_haut', 'width', '1000');
}

// images du menu
var on = new Array();
var off = new Array();
off[1] = '1-accueil.gif';
off[2] = '2-prestations.gif';
off[3] = '3-references.gif';
off[4] = '4-installations.gif';
off[5] = '5-situation.gif';
off[6] = '6-contacts.gif';
off[7] = '7-poulinieres.gif';
off[8] = '8-chevaux-a-vendre.gif';
off[9] = '9-album-photos.gif';
off[10] = '10-liens.gif';
on[1] = '1-accueil-on.gif';
on[2] = '2-prestations-on.gif';
on[3] = '3-references-on.gif';
on[4] = '4-installations-on.gif';
on[5] = '5-situation-on.gif';
on[6] = '6-contacts-on.gif';
on[7] = '7-poulinieres-on.gif';
on[8] = '8-chevaux-a-vendre-on.gif';
on[9] = '9-album-photos-on.gif';
on[10] = '10-liens-on.gif';

//var path = '/kreisker/www/images/menu/';
var path = '/images/menu/';

function loadImg(){
 for (var i=1; i<10; i++){
  imgs[i]= new Image();
  imgs[i].src = off[i];
 }
}

// menu
function zwip (n, bool){
 if ( document.getElementById('menu' + n) ){
  var img = document.getElementById('menu' + n);
  img.src = path + ((1==bool) ? on[n] : off[n]);
 }
}

function pop(url) {
 window.open (url, '', '_blank', 'location=no,menubar=no,resizable=yes,scrollbars=no,status=no,titlebar=no,toolbar=no');
}

window.onload = resize
window.onresize = resize