
function GetDestinations(){


var selectedSource = document.getElementById('ctl00_ContentHolder_DDLSource');
var destinationList = document.getElementById('ctl00_ContentHolder_DDLDestination');
if(selectedSource == null)
{
    selectedSource = document.getElementById('DDLSource')
}
if(destinationList == null)
{
destinationList = document.getElementById('DDLDestination')
}
	if( selectedSource.value != '0')
	{
	    var useJavaWebservices = true;
	    var destinationListAsString="";
	    destinationListAsString = AjaxMethods.GetDestinationsForSpecificSource(selectedSource.value).value;
	    //alert(destinationListAsString);
	    
	    if(destinationListAsString != "")
	    {
	        var destinations = eval("(" + destinationListAsString + ")");
	        
	        destinationList.options.length = 0; 
	        for (var i=0, l=destinations.destinations.length;i<l;i++)
	        {											
		        destinationList.options[destinationList.options.length] = new Option(destinations.destinations[i].value, destinations.destinations[i].id);
		        if(i == 0)
			        destinationList.options[0].selected = true;
		     }
	    }
	}
}
