

function selstate()
{
		
	with(window.document.frm)
	{ 
		var c_len = state.options.length;
		
		if (c_len > 1)
		{
			for(x=1;x<=c_len;x++)
			{
				state.options[1] = null;
			}
		}
		
		
		for(i=1;i<=tot;i++)
		{ 
			if(MetroList[i][0] == "UK")
			{
				if (navigator.appName.indexOf('Explorer') != -1)
				{
					if(MetroList[i][1] =="England")
					{
						var newoption = window.document.createElement("OPTION");
						newoption.value = MetroList[i][1];
						newoption.text = MetroList[i][2];
						newoption.selected="true";
						state.add(newoption);
						if (newoption.value.toUpperCase() == '') 
						{
				  			si = state.length - 1;
							state.options[si].selected = true;
						}
					}else
					{
						
						var newoption = window.document.createElement("OPTION");
						newoption.value = MetroList[i][1];
						
						newoption.text = MetroList[i][2];
						state.add(newoption);
						if (newoption.value.toUpperCase() == '') 
						{
							si = state.length - 1;
							state.options[si].selected = true;
						}
					}
				}
				else
				{
					//for select england as default if part
					if(MetroList[i][1] =="England")
					{
						var nopt = new Option(MetroList[i][2],MetroList[i][1],"selected");
					
					}
					else
					var nopt = new Option(MetroList[i][2],MetroList[i][1]);
					state[state.length] = nopt;
				}
			}
			
		}
	}
	
selcity();	
	
}


function selcity()
{
	
	with(window.document.frm)
	{ 
		var c_len = city.options.length;
		
		if (c_len > 1)
		{
			for(x=1;x<=c_len;x++)
			{
				city.options[1] = null;
			}
		}
		
		
		for(i=1;i<=tot;i++)
		{ //alert(state.options[state.selectedIndex].value);
		//alert(MetroList[i][0]);
			if(MetroList[i][0] == state.options[state.selectedIndex].value)
			{
				if (navigator.appName.indexOf('Explorer') != -1)
				{
					if(MetroList[i][1] =="London")//for selecting default
					{
						var newoption = window.document.createElement("OPTION");
						newoption.value = MetroList[i][1];
						newoption.text = MetroList[i][2];
						newoption.selected="true";
						city.add(newoption);
						if (newoption.value.toUpperCase() == '') 
						{
							si = city.length - 1;
							city.options[si].selected = true;
						}
					}else
					{
					var newoption = window.document.createElement("OPTION");
					newoption.value = MetroList[i][1];
					newoption.text = MetroList[i][2];
					city.add(newoption);
					if (newoption.value.toUpperCase() == '') 
					{
				  		si = city.length - 1;
						city.options[si].selected = true;
					}
					}
				}
				else
				{
					if(MetroList[i][1] =="London")
					{
					var nopt = new Option(MetroList[i][2],MetroList[i][1],"selected");
					
					}
					else
					var nopt = new Option(MetroList[i][2],MetroList[i][1]);
					city[city.length] = nopt;
				}
			}
		}
	}
	
if(tot>=153)	
selplace();	
}

function selplace()
{
	
	with(window.document.frm)
	{ 
		var c_len = hplace.options.length;
		
		if (c_len > 1)
		{
			for(x=1;x<=c_len;x++)
			{
				hplace.options[1] = null;
			}
		}
		
		
		for(i=1;i<=tot;i++)
		{ //alert(state.options[state.selectedIndex].value);
		//alert(MetroList[i][0]);
			if(MetroList[i][0] == city.options[city.selectedIndex].value)
			{
				if (navigator.appName.indexOf('Explorer') != -1)
				{
					
					var newoption = window.document.createElement("OPTION");
					newoption.value = MetroList[i][1];
					newoption.text = MetroList[i][2];
					hplace.add(newoption);
					if (newoption.value.toUpperCase() == '') 
					{
				  		si = hplace.length - 1;
						hplace.options[si].selected = true;
					}
				}
				else
				{
					
					var nopt = new Option(MetroList[i][2],MetroList[i][1]);
					hplace[hplace.length] = nopt;
				}
			}
		}
	}
	
	
	
}


