//include /Js/ajaxHelpers.js before this
//web service proxy
function StateService(){
	var proxy=new Newtex.WwwV10.WebServices.StateService();
	//proxy.set_defaultSucceededCallback(AjaxMethod_Success);
	proxy.set_defaultFailedCallback(AjaxMethod_Failure);
	return proxy;
}
//remove handler to avoid memory leaks
function Page_Unload(){
	$removeHandler(ddlCountry,'change',CountryChanged);
}
//when country dropdown changes
function CountryChanged(evt){
	var countryCode=evt.target.options[evt.target.selectedIndex].value;
	StateService().GetListByCountry(countryCode,CountryChanged_Success);
}
