var usernameid = 'ctl00_ctl00_ctl00_ContentPlaceHolderDefault_MainContent_LoginView1_Login1_UserName';
var passwordlabelid = 'password_lb';
var passwordid = 'ctl00_ctl00_ctl00_ContentPlaceHolderDefault_MainContent_LoginView1_Login1_Password';

if (window.Prototype) {
    Event.observe(window, 'load', function(e) {
       if($('disableHomepageLoginJavascript') == null)
       {
        if ($(usernameid)) {
            $(usernameid).observe('focus', function() {
                if (this.value == 'User Name') {
                    this.value = '';
                }
            });
            $(usernameid).observe('blur', function() {
                if (this.value == '') {
                    this.value = 'User Name';
                }
            });
        }
        if ($(passwordlabelid)) {
            $(passwordlabelid).observe('focus', function() {
                this.hide();
                this.next().show();
                this.next().focus();
            });
        }
        if ($(passwordid)) {
            $(passwordid).observe('blur', function() {
                if (this.value == '') {
                    this.previous().show();
                    this.hide();
                }
            });
        }
	}
    });
}