function imageChargement() {
	//Traitement
	var imagesList 		= Array(); 											//Liste des images pechargees
	var donneesList 	= imageChargement.arguments; 		//Liste indefinie de valeur est passee a la function
	for( i=0; i<donneesList.length; i++ ) {
		//Push de l'image
		imagesList[i] 	= new Image;
		
		//Chargement de l'image
		if ( donneesList[i].indexOf("#")!=0 )
			imagesList[i].src = donneesList[i];
	}
}

function survoleMenuPrincipal( strNomLi ) {
	if( document.getElementById( "li_bouton_"+ strNomLi ) )
		document.getElementById( "li_bouton_"+ strNomLi ).style.backgroundPosition = "right top";
}
			
function sortieMenuPrincipal( strNomLi ) {
	if( document.getElementById( "li_bouton_"+ strNomLi ) )
		document.getElementById( "li_bouton_"+ strNomLi ).style.backgroundPosition = "left top";
}

function survoleSortieBoutonRechercheLoupe( strTypeAction ) {
	if( document.getElementById( "img_bouton_loupe_recherche" ) ) {
		switch( strTypeAction ) {
			case "survole" :
				document.getElementById( "img_bouton_loupe_recherche" ).src = "http://vegetolab.com/web/image/interface/bouton_loupe_recherche_over.gif";
				break;
				
			case "sortie" :
				document.getElementById( "img_bouton_loupe_recherche" ).src = "http://vegetolab.com/web/image/interface/bouton_loupe_recherche.gif";
				break;
		}
	}
}

function isNumeric(value) {
	if (value == null || !value.toString().match(/^[-]?\d*\.?\d*$/)) return false;
	return true;
}

function valide_courriel_input( courriel ) {
	var regCourrielValide = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]{2,}[.][a-zA-Z.]{2,9}$/;
	return regCourrielValide.test( courriel );
}

function utils_projet_valid_number(obj){

	var intParticipant = obj.value;
	if( intParticipant != "" ){
		if( !isNumeric( intParticipant ) ){
			obj.value = "";
			document.getElementById("dialog-error").innerHTML = "Vous devez inscrire un chiffre";
			$( "#dialog-error" ).dialog({
				modal: true,
				buttons: {
					"Ok": function() {
						$( this ).dialog( "close" );
					}
				}
			});
		}

	}
}

function rechercher( langue ) {
	if( document.getElementById( "input_recherche" ) ) {
		if( document.getElementById( "input_recherche" ).value != "" )
			window.location.href = "recherche.asp?langue="+langue+"&mot="+ document.getElementById( "input_recherche" ).value;
	}
}

imageChargement( "http://vegetolab.com/web/image/interface/bouton_loupe_recherche_over.gif" );

window.onload = function() {
      if(typeof diaporamaCharger == 'function') {
	      diaporamaCharger( "diaporama_fr.xml", "div_animation_flash" );
     }
};

