function CleanCity(){
   $("City").value = ""
}

function CleanIP() {
   $("IPAddress").value = ""
}

//CITY STUFF //
function addCity() {
 var strCity = $F('City')
 var strMs = new Date().getTime()
 var strUrl = "addcity.asp"
 
 var myAjax = new Ajax.Request(strUrl, {
     method: 'get',
		 parameters: {City:strCity, Ms: strMs},
		 onLoading: showLoadCity,
		 onComplete: showCity
		 });
}

function showLoadCity(){
$('adicionarcity').style.display = 'none'
$('LoadingCity').style.display = 'block'
}

function showCity(originalRequest) {
	var newData = originalRequest.responseText;
	$('LoadingCity').style.display = 'none'
	$('AddCityAnswer').innerHTML = newData; 
}
////////////////////////////////////////////////////////////////////////////////
//CITY STUFF //
function searchIP() {
 var strIP = $F('IPAddress')
 alert(""+strIP+"")
 var strMs = new Date().getTime()
 var strUrl = "searchip.asp"
 
 var myAjax = new Ajax.Request(strUrl, {
     method: 'get',
		 parameters: {IP:strIP, Ms: strMs},
		 onLoading: showLoadIP,
		 onComplete: showIP
		 });
}

function showLoadIP(){
$('searchipform').style.display = 'none'
$('LoadingIP').style.display = 'block'
}

function showIP(originalRequest) {
	var newData = originalRequest.responseText;
	$('LoadingIP').style.display = 'none'
	$('SearchIPAnswer').style.display = 'block'
	$('SearchIPAnswer').innerHTML = newData; 
}

function SearchAgain() {
  $('SearchIPAnswer').style.display = 'none'
	$('searchipform').style.display = 'block'
}
