﻿function parseRepsonse(a,b){a=a.split(":");if(a[0]=="citydata"){$get(ctrlId+"CityDropDown").disabled=false;$get(ctrlId+"SubmitLocationButton").disabled=false;try{$get(ctrlId+"SubmitMapButton").disabled=false;$get(ctrlId+"SubmitScanAvailableButton").disabled=false}catch(e){}var d=a[1].split("|");for(a=0;a<d.length;a++){b=document.createElement("option");var c=d[a].split(",");b.text=(c[2]!=""?c[2]+", ":"")+c[0]+" "+c[4];b.value=c[1];$get(ctrlId+"CityDropDown").options.add(b)}}else if(a[0]=="countrydata"){d=
a[1].split("|");for(a=0;a<d.length;a++){c=d[a].split(",");b=document.createElement("option");b.text=c[0]+" "+c[2];b.value=c[1];$get(ctrlId+"CountryDropDown").options.add(b)}}}
function categorySelected(a){$get(ctrlId+"CountryDropDown").options.length=0;$get(ctrlId+"CityDropDown").options.length=0;$get(ctrlId+"CityDropDown").disabled=true;$get(ctrlId+"SubmitLocationButton").disabled=true;try{$get(ctrlId+"SubmitMapButton").disabled=true;$get(ctrlId+"SubmitScanAvailableButton").disabled=true}catch(b){}$get(ctrlId+"SelectedCategoryField").value=$get(ctrlId+"ListingCategory").options[$get(ctrlId+"ListingCategory").selectedIndex].value;$get(ctrlId+"SelectedLocationField").value=
"";callback("categoryselected:"+a,"")}function countrySelected(a){$get(ctrlId+"CityDropDown").options.length=0;$get(ctrlId+"SelectedLocationField").value=a;$get(ctrlId+"SelectedCategoryField").value=$get(ctrlId+"ListingCategory").options[$get(ctrlId+"ListingCategory").selectedIndex].value;callback("countryselected:"+a+","+$get(ctrlId+"ListingCategory").options[$get(ctrlId+"ListingCategory").selectedIndex].value,"")}
function citySelected(){var a=$get(ctrlId+"CityDropDown").options[$get(ctrlId+"CityDropDown").selectedIndex].value;$get(ctrlId+"SelectedCategoryField").value=$get(ctrlId+"ListingCategory").options[$get(ctrlId+"ListingCategory").selectedIndex].value;if(a!=0)$get(ctrlId+"SelectedLocationField").value=a;else $get(ctrlId+"SelectedLocationField").value=$get(ctrlId+"CountryDropDown").options[$get(ctrlId+"CountryDropDown").selectedIndex].value};
