var ns = (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=4)?true:false
var namelayer="";

var layer2="";
var layer3="";
var menutimer=0;
var imgname="";
var imgpreload="";
var imgtimer=0;

if (location.search.search("print")!=-1)
	var print= location.search.substr((location.search.search("print")+6),1);

// Verifie le chemin et ajoutera les bons ../ pour les images et les liens
var NbRep=new String("");
var NbSlash=0;
var Ref=new String("");
Ref=window.location.pathname;
Ref=Ref.toString();
if (window.location.protocol == "file:"){
	test=/\134/gi;
	Ref=Ref.substr(4);
	Ref=Ref.replace(test,'/')
}
else{
	Ref=Ref.substr(1);
}

if (window.location.host=="proto.ixmedia.com" || window.location.protocol == "file:") chiffre=1;
else chiffre=0;

for (var cpt=0;cpt<Ref.length;cpt++)
	if (Ref.charAt(cpt)=='/') NbSlash++;
if (navigator.appVersion.indexOf("Macintosh") != -1 && window.location.protocol == "file:") NbSlash=NbSlash-1;
NbSlash=NbSlash-chiffre;      
for (cpt=0;cpt<NbSlash;cpt++) 
	NbRep=NbRep+"../";

// Style Sheet
if (print==1) document.write("<LINK REL=stylesheet HREF='"+NbRep+"mystylesPrint.css' TYPE='text/css'>");
else{
	if (navigator.appVersion.indexOf("Macintosh") != -1) document.write("<LINK REL=stylesheet HREF='"+NbRep+"mystyles.css' TYPE='text/css'>");
	else document.write("<LINK REL=stylesheet HREF='"+NbRep+"mystylesWin.css' TYPE='text/css'>");
}

if (document.images) {
	panier_u = new Image(146,22);panier_u.src = NbRep + "img/boutons/votrepanier.gif";
	panier_h = new Image(146,22);panier_h.src = NbRep + "img/boutons/votrepanier_h.gif";

	catalogue_u = new Image(75,24);catalogue_u.src = NbRep + "img/menus/catalogue.gif";
	catalogue_h = new Image(75,24);catalogue_h.src = NbRep + "img/menus/catalogue_h.gif";
	commandes_u = new Image(86,24);commandes_u.src = NbRep + "img/menus/commandes.gif";
	commandes_h = new Image(86,24);commandes_h.src = NbRep + "img/menus/commandes_h.gif";
	manuscrits_u = new Image(77,24);manuscrits_u.src = NbRep + "img/menus/manuscrits.gif";
	manuscrits_h = new Image(77,24);manuscrits_h.src = NbRep + "img/menus/manuscrits_h.gif";
	joindre_u = new Image(89,24);joindre_u.src = NbRep + "img/menus/nousjoindre.gif";
	joindre_h = new Image(89,24);joindre_h.src = NbRep + "img/menus/nousjoindre_h.gif";
	qui_u = new Image(118,24);qui_u.src = NbRep + "img/menus/quisommes_nous.gif";
	qui_h = new Image(118,24);qui_h.src = NbRep + "img/menus/quisommes_nous_h.gif";
	
	//sous menu commandes
	internet_u = new Image(135,19);internet_u.src = NbRep + "img/menus/commandes/internet.gif";
	internet_h = new Image(135,19);internet_h.src = NbRep + "img/menus/commandes/internet_h.gif";
	librairies_u = new Image(135,35);librairies_u.src = NbRep + "img/menus/commandes/librairies.gif";
	librairies_h = new Image(135,35);librairies_h.src = NbRep + "img/menus/commandes/librairies_h.gif";
	
	//sous menu nous joindre
	commentaires_u = new Image(135,19);commentaires_u.src = NbRep + "img/menus/joindre/commentaires.gif";
	commentaires_h = new Image(135,19);commentaires_h.src = NbRep + "img/menus/joindre/commentaires_h.gif";
	diffusion_u = new Image(135,19);diffusion_u.src = NbRep + "img/menus/joindre/diffusion.gif";
	diffusion_h = new Image(135,19);diffusion_h.src = NbRep + "img/menus/joindre/diffusion_h.gif";
	noscoordonnees_u = new Image(135,19);noscoordonnees_u.src = NbRep + "img/menus/joindre/noscoordonnees.gif";
	noscoordonnees_h = new Image(135,19);noscoordonnees_h.src = NbRep + "img/menus/joindre/noscoordonnees_h.gif";
}

var btn_commandes = "commandes_u";
var btn_joindre = "joindre_u";


switch (section){
	case 4 :
		btn_commandes="commandes_h";
		break;
	case 5 :
		btn_joindre = "joindre_h";
		break;
}