
var xmlFeed=false;
var gecko= (document.implementation && document.implementation.createDocument) ? true:false;
var ie= (window.ActiveXObject && document.all) ? true:false;

// FIX MIMETYPES/DOCUMENT HEADERS FOR GECKO
// By Vladdy from CodingForums.com
function fixXmlMimeType(filename)
{
    var oxmlhttp = null;
    try {
        oxmlhttp = new XMLHttpRequest();
        oxmlhttp.overrideMimeType("text/xml");
    }
    catch(e) {
        try {
            oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e) {
            return null;
        }
    }

    if (!oxmlhttp) return null;

    try {
        oxmlhttp.open("GET", filename, false);
        oxmlhttp.send(null);
    }
    catch(e) {
        return null;
    }

    return oxmlhttp.responseXML;
}


// IMPORT XML DOCUMENT
// Code from the Public Domain
function importXML(FeedParserRSSFile)
{
    // For Gecko Browsers
    if (gecko)
    {
        xmlFeed = document.implementation.createDocument("", "", null);
        xmlFeed.async=false;
        xmlFeed = fixXmlMimeType(FeedParserRSSFile);
    }

    // For IE/Win
    else if (ie)
    {
        xmlFeed = new ActiveXObject("Microsoft.XMLDOM");
        xmlFeed.async=false;
        xmlFeed.load(FeedParserRSSFile);
    }

    // If a browser doesn't support this, do nothing.
    else return false;

    // If it's all good, return the object.
    if (typeof xmlFeed != "undefined") return xmlFeed;
    else return false;
}

function newdestination()

{

var feed = importXML('/ttrs/railtourism/html/destinationCitysCommon.xml');
var destincityRT = feed.getElementsByTagName('cityName');
//var destincityHoliday = feed.getElementsByTagName('cityNameHoliday');
var destinRT=new Array();
var destinHoliday=new Array();
var newDestin=new Array();
var datadest="";
var datadest1="";
datadest=datadest+'<select name="destinationCity" class="DropDownHome">';
datadest="<option value=\"\">Select DestinationCity</option>";
//datadest=datadest+"<option value=\"ALL\">ALL</option>";
for(var i = 0; i < destincityRT.length; i++)
{
   destinRT[i]=destincityRT[i].getAttribute('name');
}


try
{
	newDestin=destinRT.sort();
	
}
catch (err)
{
	
}



//newDestin=destinRT.concat(destinHoliday).sort();
for(var i=0;i< newDestin.length;i++)
{
    if((i+1)!=newDestin.length && newDestin[i]==newDestin[i+1])
    {
      continue;
    }
    else
    {
      datadest=datadest+"<option value=\""+newDestin[i]+"\" >"+newDestin[i]+"</option>"
	  //document.write("<option value=\""+newCity[i]+"\" >"+newCity[i]+"</option>");
    }

}
datadest=datadest+'</select>';
return datadest;
}

/*var feed = importXML('ttrs/html/destinationCitys.xml');
var destincity = feed.getElementsByTagName('cityName');
var destin=new Array();
var newDestin=new Array();*/


document.write("<select name=\"destinationCity\" class=\"DropDownHome\"><option value=\"\">Select DestinationCity</option></select>");
//document.write("<option value=\"ALL\">ALL</option>");
//Modified By Subrato Adhikary 15.01.2008 End







