var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);

	var XmlHttp;
	 
	/* Array of GLayers
	 * The 'name' label is not being used yet
	*/
	var is_ie = (navigator.userAgent.indexOf('MSIE') >= 0) ? 1 : 0; 
	var is_ie5 = (navigator.appVersion.indexOf("MSIE 5.5")!=-1) ? 1 : 0; 
	var is_opera = ((navigator.userAgent.indexOf("Opera6")!=-1)||(navigator.userAgent.indexOf("Opera/6")!=-1)) ? 1 : 0; 

	//netscape, safari, mozilla behave the same??? 
	var is_Mozila = (navigator.userAgent.indexOf('Netscape') >= 0) ? 1 : 0;
	//Creating and setting the instance of appropriate XMLHTTP Request object to a &ldquo;XmlHttp&rdquo; variable  

	function CreateXmlHttp(){
		//Creating object of XMLHTTP in IE
		try	{XmlHttp = new ActiveXObject("Msxml2.XMLHTTP");	}
		catch(e){try{XmlHttp = new ActiveXObject("Microsoft.XMLHTTP");} catch(oc){XmlHttp = null;}}
		//Creating object of XMLHTTP in Mozilla and Safari 
		if(!XmlHttp && typeof XMLHttpRequest != "undefined") {XmlHttp = new XMLHttpRequest();}
	}
	
	function HelpInfo(val,id)
	{
		var valc
		if(val=="Tokyo")
		valc="Tokyo"
		else if(val=="Yokohama")
		valc="Tokyo"
		else if(val=="Kanto Other")
		valc="Tokyo"
		else if(val=="Nagoya")
		valc="Nagoya"
		else if(val=="Chubu Other")
		valc="Nagoya"
		
		
		
		if(id==1)
		var requestUrl = "js/trainlines.asp?city="+valc;
		else
		var requestUrl = "../js/trainlines.asp?city="+valc;
		
		CreateXmlHttp();
		if(XmlHttp)	
		{
			XmlHttp.onreadystatechange = displayAllPins;	
			XmlHttp.open("GET", requestUrl,  true);	
			XmlHttp.send(null);	
		}
	}
	
	function displayAllPins()
	{
		if(XmlHttp.readyState == 4)
		 {
			if(XmlHttp.status == 200)
			 {
				HeplInfo_Get(XmlHttp.responseXML);
			 }
		else
			alert("Please Select Atleast One City.");
		 }
	}

	function HeplInfo_Get(PinNodes)
	{
		var InfoNodes = PinNodes.getElementsByTagName('TrainsLines');
		if(InfoNodes.length > 0)
		{	
			var itemname = document.getElementById("trline");
			markarr = new Array(InfoNodes.length);
			
			for (var i=0;i<45;i++) 
			 {
				itemname.remove(itemname.options[i]);
			 }
			 
			for (var count = 0; count < InfoNodes.length; count++)
			{
					CName = InfoNodes[count].getElementsByTagName("Lines")[0].firstChild.data;
					option = new Option(CName,CName);
					itemname.options[count] = option;
					itemname.value[count] = option;

			}
		}
	}
