function retrieveZoneOptions(id){
    
    country= document.getElementById('country');
    country_id = country.options[country.selectedIndex].value;
    document.getElementById('country_region').options.length = 0;
    //document.getElementById('city').options.length = 0;
    document.getElementById('country_region').options[0]= new Option('Select','0');
    //document.getElementById('city').options[0]= new Option('- - - - - -Select- - - - - -','0');
    url="./zoneSelection.do?country_id="+country_id;
    
    //Do the Ajax call
    try
    {
        // Firefox, Opera 8.0+, Safari
        req=new XMLHttpRequest();
    }
    catch (e)
    {
        // Internet Explorer
        try
        {
            req=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            try
            {
                req=new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e)
            {
                alert("Your browser does not support AJAX!");
                return false;
            }
        }
    }
    // req=GetXmlHttpObject();
          if(country_id!="0")
              {
                req.open("POST", url, true);
                req.send(null);
                req.onreadystatechange =function(){
                    document.getElementById('country_region').options.length = 0;
                    if (req.readyState == 4) {
                        textToSplit = req.responseText;
                        var returnElements=textToSplit.split("|");
                        if ((req.status == "200") ||(req.status == 200)) {                                        // OK response
                            document.getElementById('country_region').options[0] = new Option("Select", "0");
                            for ( var i=1; i<(returnElements .length)+1; i++ ){
                                valueLabelPair = returnElements[i-1].split(",");
                                document.getElementById('country_region').options[i] = new Option(valueLabelPair[0], valueLabelPair[1]);
                            }
                        }
                    }
                }
            }
}

        
//  function retrieveZoneDynamicOptions(country_id,zone_id){
//    //alert('retrieveZoneDynamicOptions');
//    country= document.getElementById(country_id);
//    country_id = country.options[country.selectedIndex].value;
//    document.getElementById(zone_id).options.length = 0;
//    //document.getElementById('city').options.length = 0;
//    document.getElementById(zone_id).options[0]= new Option('Select','0');
//    //document.getElementById('city').options[0]= new Option('- - - - - -Select- - - - - -','0');
//    url="./zoneSelection.do?country_id="+country_id;
//    
//    //Do the Ajax call
//    try
//    {
//        // Firefox, Opera 8.0+, Safari
//        req=new XMLHttpRequest();
//    }
//    catch (e)
//    {
//        // Internet Explorer
//        try
//        {
//            req=new ActiveXObject("Msxml2.XMLHTTP");
//        }
//        catch (e)
//        {
//            try
//            {
//                req=new ActiveXObject("Microsoft.XMLHTTP");
//            }
//            catch (e)
//            {
//                alert("Your browser does not support AJAX!");
//                return false;
//            }
//        }
//    }
//    // req=GetXmlHttpObject();
//          if(country_id!="0")
//              {
//                req.open("POST", url, true);
//                req.send(country_id);
//                req.onreadystatechange =function(){
//                    document.getElementById(zone_id).options.length = 0;
//                    if (req.readyState == 4) {
//                        textToSplit = req.responseText;
//                        var returnElements=textToSplit.split("|");
//                        if ((req.status == "200") ||(req.status == 200)) {                                        // OK response
//                            document.getElementById(zone_id).options[0] = new Option("Select", "0");
//                            for ( var i=1; i<(returnElements .length)+1; i++ ){
//                                valueLabelPair = returnElements[i-1].split(",");
//                                document.getElementById(zone_id).options[i] = new Option(valueLabelPair[0], valueLabelPair[1]);
//                            }
//                        }
//                    }
//                }
//            }
//            return true;
//}