var initialiser = false ;
var timeID1 = null ;
var timeID2 = null ;
var nbMenus = 8 ;

//onresize=rechargerPage

is = new BrowserCheck() ;
pf = new PlateformeCheck() ;

function init() {
	initialiser=true ;
	changerImage2Defaut() ;
	if (smenuDefaut>0) changerImageDefaut() ;
}

function BrowserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v>=5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.min = (this.ns || this.ie)
	this.plateforme = "plateforme" + navigator.platform
	this.pc = (this.plateforme.indexOf('Win')>0)
	this.mac = (this.plateforme.indexOf('Mac')>0)
	return this
}

function PlateformeCheck() {
	this.plateforme = "plateforme" + navigator.platform
	this.pc = (this.plateforme.indexOf('Win')>0)
	this.mac = (this.plateforme.indexOf('Mac')>0)
	return this
}

function prechargement(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()') ;
		eval(imgObj+'.src = "'+imgSrc+'"') ;
	}
}
function ouvrirFenetre2(url, options) {
	window.open(url,"_blank",options) ;
}
function ouvrirFenetre(url,w,h) {
	ouvrirFenetre2(url, "width="+w+",height="+h+",scrollbars=yes") ;
}
function retaillerFenetre() {
	history.go(0) ;
}
function imprimer(){
	window.print() ;
	window.close() ;
}
function rechargerPage() {
	if (initialiser==true) {
		history.go(0);
	}
}

function changerImage2(num) {
	if (initialiser) {
		clearTimeout(timeID2) ;
		for (i=1 ; i<=9 ; i++) {
			onoff = (num!=i) ? "" : "-over" ;
			image = "menu"+i ;
			k = (i<10) ? "0"+i : i ;
			document[image].src = "../images/menu/menu_"+k+onoff+".gif" ;
		}
	}
}

function changerImage2Defaut() {
	timeID2 = setTimeout("changerImage2(menuDefaut)",20) ;
}



