var HFautocomplete;

function HFgetSelectedId(text, li) {
	document.getElementById('HFgeonameid').value = li.id;
}
function HFsetParameters() {
	try {
		HFautocomplete.setParameters('L=en&C=' + document.getElementById('HFcountry').value);
	} catch (ex) {
	}
}
function HFcleanCity() {
	var hObj = document.getElementById('HFgeonameid');
	var iObj = document.getElementById('HFcity');
	hObj.value=0;
	iObj.value='City';
}
function HFprivacy() {
	window.open('http://www.horoscopofree.com/en/community/registration/privacy.html','_blank','scrollbars=yes,resizable=no,width=450,height=230,status=no,location=no,toolbar=no,dependent=yes,hotkeys=no');
}
function HFresetField(obj,str){
	if(obj.value.length==0){
		obj.value=str;
		return;
	}
	if(obj.value==str){
		obj.value="";
	}
}

new Ajax.Request("/en/misc/partnership/iframe/reg_new.html", {
	method: 'get',
	onSuccess: function(transport) {
		var notice = document.getElementById('HFFrame');
		notice.innerHTML = transport.responseText;
		HFautocomplete = new Ajax.Autocompleter("HFcity","HFhint","/geonames/search.php",{afterUpdateElement : HFgetSelectedId});
		HFsetParameters();
	}
});

