// JavaScript Document

///////////////////////////////// AJAX calls ///////////////////////////////////////// 

function calcResults(province,city,cityzone,objecttype,offertype,nextmenu,translatelang) { 
	xajax_ajcalcresults(province,city,cityzone,objecttype,offertype,nextmenu,translatelang); 
} 

function calcWidgetResults(city,objecttype,translatelang) { 
	// gather checked offertype radio
	if ( document.cerca.offertype[0].checked == true ) { theoffertype = 2; } 
	else { theoffertype = 1; } 
	xajax_ajcalcresults('',city,'',objecttype,theoffertype,'',translatelang); 
} 

function searchCities(val,objecttype,offertype,tlang) { 
xajax_ajsearchcities(val,objecttype,offertype,tlang); 
} 

function selectCity(prov,city,objecttype,offertype,translatelang) { 
// gather checked offertype radio
if ( document.cerca.offertype[0].checked == true ) { theoffertype = 2; } 
else { theoffertype = 1; } 
theobjecttype = document.getElementById('objecttype').options[document.getElementById('objecttype').selectedIndex].value; 
xajax_ajselectcity(prov,city,theobjecttype,theoffertype,translatelang); 
xajax_ajcalcresults(prov,city,'',theobjecttype,theoffertype,'',translatelang); 
} 

////////////////////////////////////////////////////////////////////////////////////// 

// needed for loading functions 
xajax.callback.global.onRequest = function() {xajax.$('loadpallet2').style.display='block';} 
xajax.callback.global.beforeResponseProcessing = function() {xajax.$('loadpallet2').style.display='none';} 

