	
//////////////////////////////////////////////////////////	
	function ZoomText(mode,str_obj){	
				
		var obj = document.getElementById(str_obj);
		//alert(mode+", "+str_obj+", "+obj);
		//alert(obj.style.lineHeight);
		
		var oldSize = obj.style.fontSize;
		var newSize = 0;
		var oldLineHeight = obj.style.lineHeight;
		var newLineHeight = 0;
		
		if(mode=="1"){
			newSize = Number(oldSize.substring(0, oldSize.length -2)) + 4;
			newLineHeight = Number(oldLineHeight.substring(0, oldLineHeight.length -2)) + 4;
		}else{
			newSize = Number(oldSize.substring(0, oldSize.length -2)) - 4;
			newLineHeight = Number(oldLineHeight.substring(0, oldLineHeight.length -2)) - 4;
		}
		obj.style.fontSize = newSize+"px";
		obj.style.lineHeight = newLineHeight+"px";
	}
	
	
//////////////////////////////////////////////////////////	
	function RechercheRessources(mode, obj, theForm, other_param){
		//alert(mode+", "+obj+", "+theForm.name);
		var value = obj.value;
		var str_mess="";
		
		if(mode=="motcle" || mode=="nom"){
			str_mess="Input value here";				
		}else if(mode=="theme"){
			str_mess="Select value";						
		}else if(mode=="type_le_document" || mode=="langue" || mode=="genre" || mode=="region"){
			str_mess="Select option";		
		}
		
		if(mode=="motcle" || mode=="nom" || mode=="theme"){
			if(value=="" || value=="0" || value=="recherche par mot-clé" || value=="recherche par nom"){
				alert(str_mess);
				obj.value="";
				obj.focus();
				return false;
			}
		
		}else if(mode=="periode"){
			var obj_entre = eval("document."+theForm.name+"."+obj);
			var obj_et = eval("document."+theForm.name+"."+other_param);
			
			var value_entre = obj_entre.value;
			var value_et = obj_et.value;
			
			value = value_entre+"-"+value_et;
			
		}else{
			var arr_value = "";
			var num_item = other_param;
			for(var c=1; c<=num_item; c++){
				var obj_item = eval("document."+theForm.name+"."+obj+"_"+c);
				var value_item = "";
				if(obj_item.checked){
					value_item = obj_item.value+",";
				}
				arr_value+=value_item;
			}
			if(arr_value==""){
				alert(str_mess);
				return false;
			}else{
				var temp = arr_value;
				arr_value = arr_value.substring(0, temp.length -1);				
			}
			
			value = arr_value;
		}
										
		if(mode=="genre" || mode=="region"){
			
			var params_calendar = "";
			//alert(theForm.name+", "+theForm.select_year);
			var select_year = theForm.select_year.value;
			var select_month = theForm.select_month.value;			
			var select_week = theForm.select_week.value;
			var select_day = theForm.select_day.value;
			var zoneId;
			var genId;
			
			if(mode=="genre"){
				nameField = "genId";
				zoneId = theForm.zoneId.value;
				if(zoneId!=""){
					params_calendar += "&zoneId="+zoneId; 
				}
			}else{
				nameField = "zoneId";
				genId = theForm.genId.value;
				if(genId!=""){
					params_calendar += "&genId="+genId; 
				}
			}
			
			if(select_year!=""){
				params_calendar += "&year="+select_year; 
			}
			if(select_month!=""){
				params_calendar += "&month="+select_month; 
			}
			if(select_week!=""){
				params_calendar += "&week="+select_week; 
			}
			if(select_day!=""){
				params_calendar += "&day="+select_day; 
			}
			//alert("site.php?rub=1&"+nameField+"="+value+""+params_calendar);
			document.location.href="site.php?rub=1&"+nameField+"="+value+""+params_calendar;		
		}else{
			theForm.action="site.php?rub=2&mode_recherche="+mode+"&value_recherche="+value;
			theForm.submit();
		}			
		
		//alert(theForm.name+", "+theForm.action);
		//theForm.submit();
		return true;		
	}
	
	////////////////////////////////
	function unsetTextMotcle(theForm){
		//alert(theForm+", "+theForm.textfield_motcle.value);
		if(theForm.textfield_motcle.value == 'recherche par mot-clé'){
			theForm.textfield_motcle.value = '';
			theForm.textfield_motcle.focus();
		}
	}
	function unsetTextNom(theForm){
		//alert(theForm+", "+theForm.textfield_nom.value);
		if(theForm.textfield_nom.value == 'recherche par nom'){
			theForm.textfield_nom.value = '';
			theForm.textfield_nom.focus();
		}
	}
	function unsetTextRecherche(theForm){
		if(theForm.textfield_recherche.value == 'recherche'){
			theForm.textfield_recherche.value = '';
			theForm.textfield_recherche.focus();
		}
	}
	function Recherche(theForm){
		if(theForm.textfield_recherche.value == 'recherche' || theForm.textfield_recherche.value == ''){
			alert("Input value here");
			theForm.textfield_recherche.value = '';
			theForm.textfield_recherche.focus();
			return false;
		}else{
			theForm.action="site.php?rub=2&mode_recherche=recherche&value_recherche="+theForm.textfield_recherche.value;
			theForm.submit();
		}
	}

	////////////////////////
	function Envoyer(docId,ficheAlias){
		//alert(docId);
		MM_openBrWindow('forward.php?docId='+docId+'&ficheAlias='+ficheAlias,'envoyer','width=300,height=400,top=0,left=0');
	}
