window.onload = function() {

	if (isNaN(getElm("locid"))) { 
	
		getElm("locid").style.display = "none";
		getElm("replace").style.display = "block";
		lis = getElm("options").getElementsByTagName("li");
		for (i = 0; i < lis.length; i++) {
			lis[i].onclick = function() {
				getElm("locid").value = this.getAttribute("rel");
						
				new Ajax.Request('/',{method: 'get', asynchronous:true, onComplete: function(t) { getElm('oz').innerHTML = t.responseText; }, parameters:'type=101&locid='+this.getAttribute("rel")});
						
				getElm("options").style.display = "none";
				getElm("current").innerHTML = this.innerHTML;
			}
			lis[i].onmouseover = function() { this.style.backgroundColor = "#EEE"; }
			lis[i].onmouseout = function() { this.style.backgroundColor = "transparent"; }
		}
		
		getElm("replace").onmouseover = function() {
			getElm("options").style.display = "block";
		}
		getElm("replace").onmouseout = function() {
			getElm("options").style.display = "none";
		}
	}

}