//Fonction javascript 
// 1 - de gestion des rollover sur le menu gauche
// 2 - d'appel des contenus
var cont_id_prec;
var iHTML;
var imgType;
var bgColorType;
function leftMenuOnclick(cont_id,pageType){

	if(pageType == undefined || pageType == 'undefined' || pageType == ''){
		pageType = 'content_txt';
	}
	if(pageType.indexOf('espaceperso')!=-1){
		imgType = '4';
		bgColorType = 'CC3366';
	}else{
		imgType = '2';
		bgColorType = '3C78B5';
	}

//Gestion du Rollover
	var left_title_content_txt = document.getElementById('left_title_content_zone_'+cont_id).innerHTML;
	
	iHTML="<div id=\"left_title_content_zone_"+ cont_id +"\" class=\"contentTitle2\"";
	iHTML+=" style=\"color: #FFFFFF; background-image: url(../img/content"+imgType+"_title_bganim.gif); background-repeat: no-repeat; background-color: #"+bgColorType+"; cursor: default;\"";
	iHTML+=">\n";
	iHTML+= left_title_content_txt;
	iHTML+="</div>\n";
	document.getElementById('left_title_zone_'+cont_id).innerHTML = iHTML;

	if(cont_id_prec!=-1){
	var left_title_content_txt_prec = document.getElementById('left_title_content_zone_'+cont_id_prec).innerHTML;

	iHTML="<div id=\"left_title_content_zone_"+ cont_id_prec +"\" class=\"contentTitle2\"";
	iHTML+=" style=\"color: #95917B; background-image: none; background-color: transparent; cursor: pointer;\"";
	iHTML+=" onmouseover=\"this.style.color=\'#FFFFFF\'; this.style.backgroundImage = \'url(../img/content"+imgType+"_title_bganim.gif)\'; this.style.backgroundRepeat= \'no-repeat\'; this.style.backgroundColor= \'#"+bgColorType+"\'; this.style.cursor= \'pointer\';\" onmouseout=\"this.style.color= \'#95917B\'; this.style.backgroundImage = \'none\'; this.style.backgroundColor= \'transparent\';\"";
	iHTML+=" onclick=\"leftMenuOnclick("+ cont_id_prec +",'"+pageType+"')\"\n";
	iHTML+=">\n";
	iHTML+= left_title_content_txt_prec;
	iHTML+="</div>\n";
	document.getElementById('left_title_zone_'+cont_id_prec).innerHTML = iHTML;
	}
	cont_id_prec = cont_id;

//appel de la page qui renvoie le texte demandé dans la zone texte
//document.getElementById('ifetch_content').src = '../queries/content_txt.php?cont_id=' + cont_id;

fetchContent(pageType,cont_id,'','content_display_zone')
}
