var XMLFile = "../conf/images.xml"
var xml = null;
var section = null;

function setImages(s)
{
	section = s
	if (window.ActiveXObject)
	{	
	  xml = new ActiveXObject("Microsoft.XMLDOM")
	  xml.onreadystatechange = IEGo;
	  xml.load(XMLFile);	  
	}
	else if (document.implementation && document.implementation.createDocument)
	{
	  xml = document.implementation.createDocument("","",null)
	  xml.load(XMLFile)
	  xml.onload=parseXml	  	  	  	
	}
}

function IEGo()
{
  if (xml.readyState == 4)
    parseXml();
}

function parseXml()
{  
  var nodo = xml.getElementsByTagName(section)[0].getElementsByTagName("img");
  for (i = 0 ; i < nodo.length ; i++) {
  	imgName = nodo[i].getAttribute("name");
	imgSrc = nodo[i].firstChild.nodeValue;
	if (document[imgName])
	{
		document[imgName].src=imgSrc;
	}
  }  
}
