// -----  Common.js -----
// Librairie commune de fonctions

/**
 * Affiche text dans la barre status du navigateur
 * @param: text as string -> le texte à afficher
 * @return void;
 */
function chStatus(text){

	window.status = text;
	return;
	
}//end function chStatus(text)

/**
 * Remplace une image par une autre
 * @param: obj as object -> Un obget img
 * @return : 	void
 */
function roll_over(obj){

	
	var reg = /_over\.gif$/ ;
	var str = obj.src

	if(reg.exec(str))
		str = str.replace(reg,'.gif');
	else
		str = str.replace(/\.gif$/,'_over.gif');

	obj.src = str;
	return;
}//end function roll_over(this)


/* qd on sort du champ de l'intitulé, modifie le texte en mettant la première lettre en majuscule */
function putMaj(obj){

	obj.value = obj.value.substring(0,1).toUpperCase() + obj.value.substr(1,obj.value.length-1);

}//end function putMaj


/* qd on sort du champ de l'intitulé, modifie le texte en mettant la première lettre en majuscule et le reste en minuscule */
function putMajMin(obj){

	obj.value = obj.value.substring(0,1).toUpperCase() + obj.value.substr(1,obj.value.length-1).toLowerCase();

}//end function putMajMin
