Event.observe(window, 'load', function(event){

	var sSearch = "Recherche";
	var sAccount = "Compte";
	var sPassword = "Mot de passe";
	
	if (lang == "en"){
		sSearch = "Search";
		sAccount = "Account";
		sPassword = "Password";
	}
	
	// -- Moteur de recherche --
	// champs recherche
	if ($("chpsRecherche"))
	{
		var chpsRecherche = $("chpsRecherche");
		
		chpsRecherche.observe("focus", function(){
			var value = this.getValue();
			if (value == sSearch) {
				this.setValue("");
			}
		});
		chpsRecherche.observe("blur", function(){
			var value = this.getValue();
			if (value == "") {
				this.setValue(sSearch);
			}
		});
	}
	
	// --- Sphinx online ---
	// champs identifiant
	if ($("login"))
	{
		var chpsCompte = $("login");
		chpsCompte.observe("focus", function(){
			var value = this.getValue();
			if (value == sAccount) {
				this.setValue("");
			}
		});
		chpsCompte.observe("blur", function(){
			var value = this.getValue();
			if (value == "") {
				this.setValue(sAccount);
			}
		});
	}
	// champs mot de passe
	if ($("pwd"))
	{
		var chpsMotdepasse = $("pwd");
		chpsMotdepasse.observe("focus", function(){
			var value = this.getValue();
			if (value == sPassword) {
				this.setValue("");
			}
		});
		chpsMotdepasse.observe("blur", function(){
			var value = this.getValue();
			if (value == "") {
				this.setValue(sPassword);
			}
		});
	}
});
