function setlabeltext(){var a=$$("input.labeltext[type=text], input.labeltext[type=password], textarea.labeltext");for(var c=0;c<a.length;c++){var b;if(a[c].getAttribute("title")==""||a[c].getAttribute("title")==null){b=$F(a[c])}else{b=a[c].getAttribute("title");a[c].setAttribute("title","")}a[c].setAttribute("label",b);if(a[c].value==""&&a[c].getAttribute("type")!="password"){a[c].value=b}if(a[c].value==b&&a[c].getAttribute("type")!="password"){a[c].addClassName("label")}if(a[c].getAttribute("type")=="password"){a[c].setAttribute("label-field","password-field-label-"+c);if(a[c].id==""){a[c].id="password-field-"+c}var d=new Element("input",{id:"password-field-label-"+c,type:"text",value:b});d.setAttribute("password-field",a[c].id);d.className=a[c].className;d.addClassName("label");d.onfocus=function(){$(this).hide();$(this.getAttribute("password-field")).show().focus()};if(a[c].value!=""){d.hide()}a[c].insert({after:d});if(a[c].value==""){a[c].hide()}}else{a[c].onfocus=function(){if(this.value==this.getAttribute("label")){this.value="";$(this).removeClassName("label")}};if(a[c].hasClassName("loginlabel")){a[c].onchange=function(){$(this).up().select("input.loginlabel[type=password]").each(function(e){if(e.value!=""&&!e.visible()){$(e.getAttribute("label-field")).hide();e.show()}})}}}a[c].onblur=function(){if(this.value==""){if(this.getAttribute("label-field")!=""&&this.getAttribute("label-field")!=null){$(this).hide();$(this.getAttribute("label-field")).show()}else{this.value=this.getAttribute("label");$(this).addClassName("label")}}else{if(this.type=="text"&&$(this).hasClassName("loginlabel")){$(this).up().select("input.loginlabel[type=password]").each(function(e){if(e.value!=""&&!e.visible()){$(e.getAttribute("label-field")).hide();e.show()}})}}}}}function $LF(a){var b=($(a)?$_F(a):"");if($(a)&&b==$(a).getAttribute("label")){b=""}return b}if(window.$F){window.$_F=window.$F;window.$F=window.$LF}document.observe("dom:loaded",function(){setlabeltext()});