//clear list
function clear_list()
{
    var country_list = document.getElementsByName("user.userCountry")[0];
    while(country_list.childNodes.length > 0)
    {
		if(country_list.childNodes[0]!=null)
        	country_list.removeChild(country_list.childNodes[0]);
    }
}

function handle_country_dropdown_list(xmlHttp)
{
	//	alert("111");
	//clear_list();
	//clear_list();
	//alert(xmlHttp.respOnseText.length);
	var country_list = document.getElementsByName("user.userCountry")[0];
    var results = xmlHttp.responseXML.getElementsByTagName("name");
    var results2 = xmlHttp.responseXML.getElementsByTagName("id");
    var option = null;

    for(var i = 0; i < results.length; i++)
    {
        option = document.createElement("option");
        option.appendChild(document.createTextNode(results[i].firstChild.nodeValue));   
        country_list.appendChild(option);
		if(results2[i].firstChild.nodeValue != null)
        country_list.options[country_list.length-1].value = results2[i].firstChild.nodeValue;
    }
	
}
