// JavaScript Document
function hidediv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('popperID').style.visibility = 'hidden';
}
else {
if (document.layers) { // Netscape 4
document.popperID.visibility = 'hidden';
}
else { // IE 4
document.all.popperID.style.visibility = 'hidden';
}
}
}

function showdiv() {

if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('popperID').style.visibility = 'visible';
}
else {
if (document.layers) { // Netscape 4
document.popperID.visibility = 'visible';
}
else { // IE 4
document.all.popperID.style.visibility = 'visible';
}
}
}

function findInfo(stationName) {
if (window.ActiveXObject)
{
  var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async="false";  
  xmlDoc.load('stations.xml');
  xmlObj=xmlDoc.documentElement;
  var string = xmlObj.xml;
  extract(string, stationName);
  
   }
    
	if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("","",null);
var request = new XMLHttpRequest();

request.onreadystatechange = function() { if(request.readyState==4){
var string = request.responseText;
extract(string, stationName);

}
}

	request.overrideMimeType('text/xml');
    request.open("GET", "stations_fr.xml", true);
    request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");	    
	request.send(null); 
}
}

function extract(string, stationName){
var strPos = stationName.search('"');
var theStation = stationName.substring(strPos+1);
var strPos = theStation.search('"');
var theStation = theStation.substring(0, strPos);

document.getElementById("thetd").innerHTML = '<img src="./img/'+theStation+'.jpg" />';

showdiv();

}