addLoadEvent(resetfields);

function resetfields() {
inputfields = document.getElementsByTagName("input");
	for (i=0;i<inputfields.length;i++) {
		if (inputfields[i].className.indexOf("login") > -1) {
			inputfields[i].onfocus = resetinput;
			
		}
	}
}

function resetinput() {
	var thetd = document.getElementById("thepassword");
	if (this.defaultValue == this.value) {
		if (this.id == "password") {
		thetd.innerHTML = '<input type="password" name="password" size="12" class="login" id="password2" maxlength="8" value="" />';
        document.getElementById("password2").onmouseup = set_focus ;
        }
		else {
		this.value= "";
        }
	return false;
	}
}

function set_focus() {
  this.focus();
}

