
	window.onload = function() {
		if(document.getElementById('loginBox')) {
			var loginBox = document.getElementById('loginBox').getElementsByTagName('input');
			for(i = 0; i < loginBox.length; i++) {
				if(loginBox[i].getAttribute("type") == "text") {
					loginBox[i].onfocus = function() {
						this.setAttribute("value", "");
						if(this.getAttribute("id") == "loginpass") {
							var np = this.cloneNode(true);
							np.setAttribute("type", "password");
							this.parentNode.replaceChild(np,this);
							np.focus();
						}
					}
				}
			}
		}
		
		if(document.getElementById('topMenu')) {
			var toplist = document.getElementById('topMenu').getElementsByTagName('li');
			for(x = 0; x < toplist.length; x++) {
				if(toplist[x].parentNode.getAttribute("id") == "topMenu") {
					links = toplist[x].getElementsByTagName('a')[0];
					links.onmouseover = function() {
						this.style.backgroundImage = "url('img/aea_topmenubg_h.png')";
					}
					links.onmouseout = function() {
						this.style.backgroundImage = "url('img/aea_topmenubg.png')";
					}
				}
				else {
					toplist[x].onmouseover = function() {
						this.parentNode.parentNode.getElementsByTagName('a')[0].style.backgroundImage = "url('img/aea_topmenubg_h.png')";
					}
					toplist[x].onmouseout = function() {
						this.parentNode.parentNode.getElementsByTagName('a')[0].style.backgroundImage = "url('img/aea_topmenubg.png')";					
					}
				}
			}
		}
	}