/* fix explorer */
/* gestisce la riscrittura del testo all'interno dei campi input identificati dai seguenti id:
		mod_search_searchword,
		wz_11,
		wz_12,
		mod_login_username,
		mod_login_password.
*/
var sfFocus = function() {
	if(document.getElementById) {
			cerca = document.getElementById("mod_search_searchword")
			cerca.onfocus=function() {
					this.className+=" sffocus";
					if (this.name=="searchword" && this.value=="cerca...") this.value = "";
				}
			cerca.onblur=function() {
					this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
					if (this.name=="searchword" && this.value=="") this.value = "cerca...";
				}
/* modifica inserito controllo di esistenza del campo */
			if(document.getElementById("wz_11")){
				nome = document.getElementById("wz_11")
				nome.onfocus=function() {
						this.className+=" sffocus";
						if (this.name=="name" && this.value=="Nome") this.value = "";
					}
				nome.onblur=function() {
						this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
						if (this.name=="name" && this.value=="") this.value = "Nome";
					}
			}
			if(document.getElementById("wz_12")){
				email = document.getElementById("wz_12")
				email.onfocus=function() {
						this.className+=" sffocus";
						if (this.name=="email" && this.value=="E-mail") this.value = "";
					}
				email.onblur=function() {
						this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
						if (this.name=="email" && this.value=="") this.value = "E-mail";
					}
			}
			loginname = document.getElementById("mod_login_username")
			if(loginname) {
				loginname.onfocus=function() {
						this.className+=" sffocus";
					}
					
				loginname.onblur=function() {
						this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
					}
			}

			loginpwd = document.getElementById("mod_login_password")
			if(loginpwd) {
				loginpwd.onfocus=function() {
						this.className+=" sffocus";
					}
				loginpwd.onblur=function() {
						this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
					}
			}
	} else {
		alert("document.getElementById not supported!");
	}
}
