<!--
// JavaScript Document
/**
 * Classe ChampAide
 * Affecte un comportement à un champ text. Lorsque le l'utilisateur clique sur le champ, la valeur initale s'efface;
 *
 * Exemle d'utilisation: 
 *  <script language="JavaScript" type="text/JavaScript">
 * var champAide
 * function initialise () {
 * 	champAide = new ChampAide('q');
 * }
 * </script>
 * <body onLoad="initialise();">
 * <form name="rechercher" method="post" action="/rechercher.php">
 * <input name="q" type="text" id="q" value="Rechercher...">
 * <input name="go" type="submit" value="Go" id="submit">
 * </form>
 * </body>
 * 
 * @autor : xavier.ottolini@adelis.com
 * @param o :  objet représentant un input de type text 
 */
function ChampAide(id) {
	this.champ = window.document.getElementById(id);
	this.champ.valeurParDefaut = window.document.getElementById(id).value;
	this.champ.onclick = libereChampText;
}

/**
 * Methode libereChampText
 * Si la valeur du champ est différente de la valeur par défaut, elle s'efface;
 * 
 * @autor : xavier.ottolini@adelis.com
 */
function libereChampText() {
	if(this.value == this.valeurParDefaut) {
		this.value='';
	} 
}
//-->