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;



// Si le site web est au premier niveau, vous ne changez rien.
// Par contre, si vous mettez le site web dans un autre rŽpertoire, vous devez mettre un "-2" ˆ la place du "-1"
NbSlash=(NbSlash-chiffre)-3;      
for (cpt=0;cpt<NbSlash;cpt++) 
	NbRep=NbRep+"../";



// Style Sheet
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) {
		//menu
		presentation_u = new Image(166,35);presentation_u.src = NbRep + "img/menu/presentation.gif";
		presentation_h = new Image(166,35);presentation_h.src = NbRep + "img/menu/presentation_roll.gif";
		teleroman_u = new Image(166,34);teleroman_u.src = NbRep + "img/menu/teleroman.gif";
		teleroman_h = new Image(166,34);teleroman_h.src = NbRep + "img/menu/teleroman_roll.gif";
		plan_cours_u = new Image(166,34);plan_cours_u.src = NbRep + "img/menu/plan_cours.gif";
		plan_cours_h = new Image(166,34);plan_cours_h.src = NbRep + "img/menu/plan_cours_roll.gif";
		acces_cours_u = new Image(166,34);acces_cours_u.src = NbRep + "img/menu/acces_cours.gif";
		acces_cours_h = new Image(166,34);acces_cours_h.src = NbRep + "img/menu/acces_cours_roll.gif";
		equipe_u = new Image(166,15);equipe_u.src = NbRep + "img/menu/equipe.gif";
		equipe_h = new Image(166,15);equipe_h.src = NbRep + "img/menu/equipe_roll.gif";
		partenaires_u = new Image(166,15);partenaires_u.src = NbRep + "img/menu/partenaires.gif";
		partenaires_h = new Image(166,15);partenaires_h.src = NbRep + "img/menu/partenaires_roll.gif";
		rejoindre_u = new Image(166,15);rejoindre_u.src = NbRep + "img/menu/rejoindre.gif";
		rejoindre_h = new Image(166,15);rejoindre_h.src = NbRep + "img/menu/rejoindre_roll.gif";
		accueil_u = new Image(51,11);accueil_u.src = NbRep + "img/contenu/accueil.gif";
		accueil_h = new Image(51,11);accueil_h.src = NbRep + "img/contenu/accueil_h.gif";
}
