var xmlDoc
//xmlDoc=document.implementation.createDocument("","",null);
var xmlObj
function loadXML(xmlFile) 
{ 

if (window.ActiveXObject)
{	

xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); 
xmlDoc.async=false; 
xmlDoc.onreadystatechange=verify; 
xmlDoc.load(xmlFile); 

}

else if (document.implementation && document.implementation.createDocument)
{
	 var parser=new DOMParser();
	  //xmlDoc=parser.parseFromString(xmlFile,"text/xml");
xmlDoc = document.implementation.createDocument("","",null);
xmlDoc.async =false;
xmlDoc.onreadystatechange=verify; 
xmlDoc.preserveWhiteSpace=false;
xmlDoc.load(xmlFile); 

}
xmlObj=xmlDoc.documentElement; 
}

function init()
{

	//nodes = xmlDoc.getElementsByTagName('upcoming')[0].childNodes.length;
	//alert(writersNode);
}

function verify() 
{ 
 // 0 Object is not initialized 
 // 1 Loading object is loading data 
 // 2 Loaded object has loaded data 
 // 3 Data from object can be worked with 
 // 4 Object completely initialized 
 if (xmlDoc.readyState != 4) 
 { 
   return false; 
 } 
}

//loadXML('xmls/indexdata.xml');

//alert(xmlObj.childNodes(0).childNodes(0).firstChild.text ); 
//xmlObj.childNodes(3).hasChildNodes() 



