/*function getcountry1()
{
	
	var countryID = DWRUtil.getValue("countryID3");
	DWREngine._execute(_cfscriptLocation, null, 'hostcountrylookup', countryID, getHostCountryResult);
}

function getcountry()
{
	var countryName = DWRUtil.getValue("countryID3");
	DWRUtil.useLoadingMessage();
	DWREngine._execute(_cfscriptLocation, null, 'hostcountrylookup', countryName, getHostCountryResult);
}

function getHostCountryResult(modelArray)
{
	DWRUtil.removeAllOptions("vcountryID");
	DWRUtil.addOptions("vcountryID", modelArray, "KEY", "VALUE");
}

function init()
{
	DWRUtil.useLoadingMessage();
	DWREngine._errorHandler =  errorHandler;
	if (DWRUtil.getValue("countryID3") > 0) {
		getcountry();
	}
}*/  
 
populate = function(val, ele, button){ 
	var params = 'country='+encodeURIComponent(val);
	$('#'+ele).empty().attr('disabled', 'true').html('<option value="0">Loading, Please Wait...</option>');
	$('#'+button).attr('disabled','true'); 
	$.ajax({
		url       : '/countryOptions.cfm', 
		returnType: 'html', 
		data      : params,
		type      : 'POST',
		success   : function(html){
			$('#'+ele).empty().html(html).removeAttr('disabled');    
			$('#'+button).removeAttr('disabled');
			document.getElementById(ele).selectedIndex = 0;
		}
	});   
}
