var CBWhere = {
	Show:function(){new Effect.Fade('cbUserLoc');$('cbUserLocChange').show();	return false;},
	ShowCities:function(){cntry = "" + $F('cbWhereCountry');if(cntry.length > 0){new Ajax.Request('ajaxops/cities.php',{method:'get',parameters:{country:cntry},onSuccess:function(transport){var j = transport.responseText.evalJSON(true);if(j.cities != null){$('cbWhereCity').options.length = 0;$('cbWhereCity').options[$('cbWhereCity').options.length] = new Option('Please Select','');j.cities.each(function(tzone){$('cbWhereCity').options[$('cbWhereCity').options.length] = new Option(unescape(tzone.city),tzone.id);});$('cbWhereCity').show();}},onFailure: function(){ alert('Unable to fetch Cities for Country'); }});}else{	$('cbWhereCity').selectedIndex = 0; $('cbWhereCity').hide();	$('cbWhereSave').hide();	}},
	ShowSave:function(){if(!isNaN($F('cbWhereCity'))){city = parseInt($F('cbWhereCity'),10);if(city > 0){$('cbWhereSave').show();return;}}$('cbWhereSave').hide();},
	Save:function(){cntry = "" + $F('cbWhereCountry');if(!isNaN($F('cbWhereCity'))){cty = parseInt($F('cbWhereCity'),10);if(cty > 0){new Ajax.Request('ajaxops/where.php',{method:'post',parameters:{country:cntry,city:cty},onSuccess:function(transport){var j = transport.responseText.evalJSON(true);if(j.saved != null){location.href="index.php"; /*$('cbUserLoc').update(j.userloc);$('cbUserLoc').show();new Effect.Highlight('cbUserLoc');$('cbUserLocChange').hide();$('cbWhereCountry').selectedIndex = 0;$('cbWhereCity').hide();$('cbWhereCity').selectedIndex = 0;$('cbWhereSave').hide();*/}else{	alert('Unable to save Country and City');	}},onFailure: function(){	alert('Unable to save Country and City');	}});}}}	
}