var browser = navigator.appName;
var str = navigator.appVersion;
var IS_IE=false;
menuImage = new Image();
menuImage.src="images/menuSelect.gif";

if (browser == "Microsoft Internet Explorer"){
IS_IE=true;
IS_IE6 = /msie|MSIE 6/.test(navigator.userAgent);

}

function alert800x600(){
	    if (screen.width <=800){	
			alert("S'il vous plaît changer votre résolution d'écran supérieure à 800x600.");
	    }
}

function linkCSS(page){
	    if (page == "home"){
	        document.write('<link type="text/css" rel="stylesheet" href="style.css"/>');
	    }else{
		document.write('<link type="text/css" rel="stylesheet" href="styleMain.css"/>');
	    }
document.write('<!--[if lte IE 7]><link rel ="stylesheet" type="text/css" href="styleIE6.css" /><![endif]-->');
if ((screen.width <= 1024) && (screen.width > 800)){
            document.write('<link rel="stylesheet" type="text/css" href="style800-1024.css" />');
    }else if (screen.width <=800){
            document.write('<link rel ="stylesheet" type ="text/css" href ="style800.css" />');
    }
}

function printMenu() {
	document.write('<ul>');
		document.write('<li><a href="index.html" title="Accueil">Accueil</a></li>');
		document.write('<li><a href="enseignement.html" title="Enseignement" >Enseignement</a></li>');
		document.write('<li><a href="supervision.php" title="Supervision d\'&eacute;tudiants aux cycles.">Supervision</a></a></li>');
                document.write('<li><a href="publications.php" title="Publications">Publications</a></li>');
		document.write('<li><a href="questionnaires.html" title="Quelques questionnaires diponibles.">Questionnaires</a> </li>');
		document.write('<li><a href="recherche.php" title="Recherche">Recherche</a></li>');
		document.write('<li><a href="contacter.html" title="Pour mes coordonn&eacute;es">Coordonn&eacute;es</a></li>');
	   document.write('</ul>');
	    
}
function getIE6gifs(page){
	    if (IS_IE6){
			if (page=="home"){
				    document.getElementById('titleImage').src = 'images/title.gif' ;
			 }else{
				    document.getElementById('pageHeader').src='images/pageHeader.gif';
			}
	    }
	    
}

function getYear (){
	var today = new Date();
	if (IS_IE){
	    return(today.getYear());
	}else{
	    return (today.getYear()+1900);
	}

}


function copyRight (){
	    document.write('<div id="copyright">Copyright &copy; '+getYear()+' Julien Morizot, tous droits r&eacute;serv&eacute;s.');
	    document.write('<br /><a href="http://www.jordinbrown.com" id="linktojb">Conception de site par Jordin Brown.</a></div>');
}



 function growShrink(course, view){
	    if (view=="grow"){

			document.getElementById("exp-"+course).style.display="none";
			document.getElementById(course).style.display="block";
			
	    }else if (view =="shrink"){
			document.getElementById("exp-"+course).style.display="block";
			document.getElementById(course).style.display="none";
			
	    }
 }

function formatExpander(state, name)
{
	    if (state=='hover'){
	    	document.getElementById('txt-'+name).style.textDecoration='underline';
	    	document.getElementById('txt-'+name).style.color='#7E794B';
	    }else{
		document.getElementById('txt-'+name).style.textDecoration='underline';	
		document.getElementById('txt-'+name).style.color='#153152';
		
	    }
}

/*
 .expander a:visited{
        color:#153152;
	text-decoration:none;

}
.expander a:link{
           color:#153152;
  	   text-decoration:none;


}
.expander a:hover{
           color:#153152;
	   text-decoration:underline;

}
 
*/
