function cls_actualite(){
	this.init = function(){
		this.innerHtml = '<table border="0" cellspacing="0" cellpadding="0" align="left" width="200">';
		this.innerHtml += '<tr>';
		this.innerHtml += '	<td valign="top" align="left"><img src="images/actualites_cadre_hautGauche.gif" width="9" height="7" alt="0" border="0"></td>';
		this.innerHtml += '	<td valign="top" align="left">';
		this.innerHtml += '		<table border="0" cellspacing="0" cellpadding="0">';
		this.innerHtml += '		<tr>';
		this.innerHtml += '			<td valign="top" align="left"><img src="images/pixel_actualite.gif" width="200" height="5" alt="0" border="0"></TD>';
		this.innerHtml += '		</tr>';
		this.innerHtml += '		<tr>';
		this.innerHtml += '			<td valign="top" align="left"><img src="images/pixel_blanc.gif" width="200" height="1" alt="0" border="0"></TD>';
		this.innerHtml += '		</tr>';
		this.innerHtml += '		<tr>';
		this.innerHtml += '			<td valign="top" align="left"><img src="images/pixel_blanc.gif" width="200" height="1" alt="0" border="0"></TD>';
		this.innerHtml += '		</tr>';
		this.innerHtml += '		</table>';
		this.innerHtml += '	</td>';
		this.innerHtml += '	<td nowrap valign="top" align="right"><img src="images/actualites_cadre_hautDroite.gif" width="9" height="7" alt="0" border="0"></td>';
		this.innerHtml += '</TR>';
		this.innerHtml += '<tr>';
		this.innerHtml += '	<td valign="top" align="left" background="images/actualites_cadre_Gauche.gif"></td>';
		this.innerHtml += '	<td valign="top" align="left">';
		this.innerHtml += '		<table border="0" cellspacing="0" cellpadding="0">';
		this.innerHtml += '		<tr>';
		this.innerHtml += '			<td valign="top" align="left" colspan="2">';
		this.innerHtml += '		<img src="images/actualites.gif" width="190" height="86" alt="0" border="0"></TD>';
		this.innerHtml += '		</tr>';
		this.innerHtml += '		<tr>';
		this.innerHtml += '			<td valign="top" align="left">';
		this.innerHtml += '				<img src="images/pixel_transparent.gif" width="20" height="1" alt="0" border="0"></TD>';
		this.innerHtml += '			<td valign="top" align="left">';
		this.innerHtml += '				<table border="0" cellspacing="0" cellpadding="0">';
	}
	
	this.ajout_item = function(texte, hyperlien){
		this.innerHtml += '<tr>';
		this.innerHtml += '		<td valign="top" align="left">';
		if (hyperlien.length > 0){
			this.innerHtml += "<FONT STYLE='font-size: 10px;font-family: Arial;color: #5f5f5f;font-weight:bold;'>";
			this.innerHtml += texte;
			this.innerHtml += "</FONT>";
			this.innerHtml += '		<a href="' + hyperlien + '" ';
			this.innerHtml += '			style="{font-size: 12px;';
			this.innerHtml += '					font-family: Arial;';
			this.innerHtml += '					font-weight:bold;';
			this.innerHtml += '					color: #0000FF;}';
			this.innerHtml += '					:visited {color: #0000FF}';
			this.innerHtml += '					:hover {background: #0000FF}';
			this.innerHtml += '					:visited:hover {color: #0000FF}">+</a>';
			
			
		}
		else{
			this.innerHtml += '<font style="{font-size: 12px;';
			this.innerHtml += '				font-family: Arial;';
			this.innerHtml += '				color: #5f5f5f;}">';
			this.innerHtml += texte;
			this.innerHtml += '</font>';
		}
		this.innerHtml += '</td>';
		this.innerHtml += '</tr>';
		this.innerHtml += '<tr>';
		this.innerHtml += '		<td valign="top" align="left"><BR></td>';
		this.innerHtml += '</tr>';
	}
	
	this.finalize = function(){
		this.innerHtml += '</table>';
		this.innerHtml += '			</td>';
		this.innerHtml += '		</tr>';
		this.innerHtml += '		</table>';
		this.innerHtml += '	</td>';
		this.innerHtml += '	<td valign="top" align="left" background="images/actualites_cadre_droite.gif"></td>';
		this.innerHtml += '</tr>';
		this.innerHtml += '<tr>';
		this.innerHtml += '	<td valign="top" align="left"><img src="images/actualites_cadre_basGauche.gif" width="9" height="7" alt="0" border="0"></td>';
		this.innerHtml += '	<td valign="top" align="left">';
		this.innerHtml += '		<table border="0" cellspacing="0" cellpadding="0">';
		this.innerHtml += '		<tr>';
		this.innerHtml += '			<td valign="top" align="left"><img src="images/pixel_blanc.gif" width="200" height="1" alt="0" border="0"></TD>';
		this.innerHtml += '		</tr>';
		this.innerHtml += '		<tr>';
		this.innerHtml += '			<td valign="top" align="left"><img src="images/pixel_blanc.gif" width="200" height="1" alt="0" border="0"></TD>';
		this.innerHtml += '		</tr>';
		this.innerHtml += '		<tr>';
		this.innerHtml += '			<td valign="top" align="left"><img src="images/pixel_actualite.gif" width="200" height="5" alt="0" border="0"></TD>';
		this.innerHtml += '		</tr>';
		this.innerHtml += '		</table>';
		this.innerHtml += '	</td>';
		this.innerHtml += '	<td valign="top" align="right"><img src="images/actualites_cadre_basDroite.gif" width="9" height="7" alt="0" border="0"></td>';
		this.innerHtml += '</tr>';
		this.innerHtml += '<tr>';
		this.innerHtml += '	<td valign="top" align="center" colspan="3">';
		this.innerHtml += '		<br><a href="http://www.uqo.ca" target="_blank">';
		this.innerHtml += '			<img src="images/uqo.gif" width="131" height="53" alt="0" border="0"></A></td>';
		this.innerHtml += '</tr>';
		this.innerHtml += '</table>';
		
		
		var divID = document.getElementById("div_actualites");
		//check si IE
		if(document.all){
			divID.innerHTML = this.innerHtml;
		}
		//check si Mozilla
		else if (document.getElementById){
			divID.innerHTML = this.innerHtml;
		}
	}
}

var timeoutID = 0;
function cls_menu_secondaire(menuCour){

	this.menuCourrant = menuCour;
	this.index = 0;
	this.aID = new Array();
	this.innerHtml = new Array();
	this.delais = 3;
	this.timeout_menuID = "";
	this.menuBasDePage = new Array();
	
	this.init = function(menuID){
		this.aID[this.index] = menuID;
		this.innerHtml[this.index] = '<table border="0" cellspacing="0" cellpadding="0" align="center">' +
						'<tr>';
	}
	
	this.menuID = function(menuID, on_off){
		document.images[menuID].src = "images/menu/" + menuID + "_" + on_off + ".gif";
	}

	this.ajout_item = function(texte, hyperlien, flag_separation){
		var checkPage = String(document.location);
		var onmouseoverStr = 'onmouseover="menuSec.cancelTimeout()"';
		var onmouseoutStr = 'onmouseout="menuSec.activerTimeout()"';
		
		if ((checkPage.indexOf(hyperlien) != -1) && (hyperlien.length > 0)){
			this.innerHtml[this.index] += '<td valign="MIDDLE" align="left">' +
				'<a href="' + hyperlien + '" ' + 
				onmouseoverStr + " " + 
				onmouseoutStr + " " + 
				'style="color:#AD0000;font-size:11px;font-family: Arial;font-weight:bold;">' + 
				texte + '</a></td>';
		}
		else{
			if (texte.length == 0){
				this.innerHtml[this.index] += '<td valign="MIDDLE" align="left" style="color:#AD0000;font-size:11px;font-family: Arial;font-weight:bold;">&nbsp;</td>';			
			}
			else{
				this.innerHtml[this.index] += '<td valign="MIDDLE" align="left">' +
					'<p class="menuSec">' + 
					'<a href="' + hyperlien + '" ' + 
					onmouseoverStr + " " + 
					onmouseoutStr + " " + 
					'>' + 
					texte + '</a></p></td>';
			}
			
		}
		
		//pour le sous menu
		if (hyperlien.length > 0 && texte.length > 0){
			this.menuBasDePage[this.menuBasDePage.length] = '<td valign="MIDDLE" align="left">' +
				'<a href="' + hyperlien + '" ' + 
				'style="color:#999999;font-size:10px;font-family: Arial;font-weight:bold;">' + 
				texte + '</a></td>' +
				'<td valign="top" align="left">&nbsp;|&nbsp;</td>';
		}
		
		

		if (flag_separation == true){
			this.innerHtml[this.index] += '<td valign="MIDDLE" align="left"><img src="images/pixel_transparent.gif" width="10" height="1" alt="" border="0"><img src="images/menu/menu_separation_2.gif" width="7" height="7" alt="" border="0"><img src="images/pixel_transparent.gif" width="10" height="1" alt="" border="0"></TD>';
		}
			
	}
	
	this.finalize = function(){
		this.innerHtml[this.index] += "</tr>";
		this.innerHtml[this.index] += "</table>";
		
		if (this.aID[this.index] == this.menuCourrant){
			this.activer(this.aID[this.index]);
		}
		this.index ++;
	}
	
	
	this.activer = function(menuID){
		this.cancelTimeout();
		resetMenu(this.menuCourrant,this.timeout_menuID);
		this.gestionMenu(menuID);
	}
	
	this.gestionMenu = function(menuID){
		var flag = false;

		for (i=0; i < this.aID.length; i++){
			if (this.aID[i] == menuID){
				flag = true;
				
				//affichage de l'image en rouge
				document.images[menuID].src = "images/menu/" + menuID + "_on.gif";
				
				var divID = document.getElementById("div_menu_secondaire");
				//check si IE
				if(document.all){
					divID.innerHTML = this.innerHtml[i];
				}
				//check si Mozilla
				else if (document.getElementById){
					divID.innerHTML = this.innerHtml[i];
				}
				
				break;
			}
		}
		if (flag == false){
			
		}
		
	}
	
	this.desactiver = function(menuID){
		this.timeout_menuID = menuID;
		this.activerTimeout();
	}
	
	this.cancelTimeout = function(){
		clearTimeout(timeoutID);
	}
	this.activerTimeout = function(){
		timeoutID = setTimeout("resetMenu('" + this.menuCourrant + "', '" + this.timeout_menuID + "')",parseInt(this.delais) * 1000);	
	}
	
	this.gestionMenuBasDePage = function(){
		var menuBasDePageStr = "";
		var compteColonne = 0;
		
		menuBasDePageStr += '<table border="0" cellspacing="0" cellpadding="0" align="center">' +
							'<tr>' + 
							'	<td valign="BOTTOM" align="CENTER">' +
							'		<table border="0" cellspacing="0" cellpadding="0" align="center">' +
							'		<tr>';
		for (i = 0; i < this.menuBasDePage.length; i++){
			menuBasDePageStr += this.menuBasDePage[i] + "\n";
			compteColonne ++;
			
			if (compteColonne % 5 == 0 && i != this.menuBasDePage.length){
				menuBasDePageStr += '		</tr>';
				menuBasDePageStr += '		</table>';
				menuBasDePageStr += '	</td>';
				menuBasDePageStr += '</tr>';
				menuBasDePageStr += '<tr>';
				menuBasDePageStr += '	<td valign="BOTTOM" align="CENTER">';
				menuBasDePageStr += '		<table border="0" cellspacing="0" cellpadding="0" align="center">';
				menuBasDePageStr += '		<tr>';
			}
		}
		menuBasDePageStr += '</tr></table>';
		
		var divID = document.getElementById("div_menuBasDePage");
		//check si IE
		if(document.all){
			divID.innerHTML = menuBasDePageStr;
		}
		//check si Mozilla
		else if (document.getElementById){
			divID.innerHTML = menuBasDePageStr;
		}
	}

	
}

function resetMenu(menuID_present, menuID_onmouseevent){
	if (menuID_present != ""){
		document.images[menuID_present].src = "images/menu/" + menuID_present + "_on.gif";
	}
	if (menuID_onmouseevent != "" && menuID_onmouseevent != menuID_present){
		document.images[menuID_onmouseevent].src = "images/menu/" + menuID_onmouseevent + "_off.gif";
	}
	menuSec.gestionMenu(menuID_present);
}
function ouvrirImg(imgName, title, width, height){
            var newWindow, content, height2, width2;
            if (height > 750){
                height2 = 750
            }
            else{
                height2 = height;
            }

            if (width > 750){
                width2 = 750;
            }
            else{
                width2 = width;
            }

            newWindow = window.open(imgName,'image','width='+width2+',height='+height2+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,left=0,top=0');

            content = "<HTML><HEAD><Title>"+title+"</Title></HEAD><BODY bgcolor='#FFFFFF' TOPMARGIN='0' LEFTMARGIN='0' MARGINHEIGHT='0' MARGINWIDTH='0'>";
            content = content + "<TABLE CELLSPACING='0' CELLPADDING='0'BORDER='0'><TD VALIGN='TOP' ALIGN='CENTER'><img src='" + imgName + "'border=0 alt='image' width='" + width +"' height='" + height +"'></TD></TABLE></BODY></HTML>";
            newWindow.document.write(content);
            newWindow.focus();
}
function ouvrirMHT(docMHT, title, width, height){

            var newWindow, content, height2, width2;

            if (height > 750){

                height2 = 750

            }

            else{

                height2 = height;

            }

 

            if (width > 750){

                width2 = 750;

            }

            else{

                width2 = width;

            }

 

            newWindow = window.open(docMHT,'MHT','width='+width2+',height='+height2+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,left=0,top=0');

            newWindow.focus();

}

