var xmlDoc;
function loadXML(url) { 
try //Internet Explorer
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async=false;
  xmlDoc.load(url);
  }
catch(e)
  {
  try //Firefox, Mozilla, Opera, etc.
    {
    xmlDoc=document.implementation.createDocument("","",null);
	xmlDoc.async=false;
	xmlDoc.load(url);
    }
  catch(e)
    {
    try //Safari
    {
    XmlHTTP = new XMLHttpRequest();
	XmlHTTP.open('get', url, false);
	XmlHTTP.send('');
	xmlDoc = XmlHTTP.responseXML;
    }
  catch(e)
    {
    alert("Your Browser doesn't support AJAX");
    return;
    }
    }
  }

}
function showMsg () {
	if(xmlDoc.readyState != 4)
	{	return false;
	}
}
function setIframeContent (id, stat) {
	if (stat=="main")
	{
		abc = xmlDoc.getElementsByTagName("menu");
	}
	else if (stat=="subMenu")
	{
		abc = xmlDoc.getElementsByTagName("submenu");
	}
	for(i=0;i<abc.length; i++)
	{
		if (abc[i].getAttribute("name").toLowerCase() == id.toLowerCase())
		 {
			document.getElementById("myiframe").src = abc[i].getAttribute("htmlURL");
			break;
		 }
	}

}
function setIframeProdContentF (id) {
	abc = xmlDoc.getElementsByTagName("submenu");
	
	if (id!="")
	{
		for(i=0;i<abc.length; i++)
		{
			if (abc[i].getAttribute("subpage").toLowerCase() == id.toLowerCase())
			 {	
				document.getElementById("myiframe").src = abc[i].getAttribute("htmlURL");
				break;
			 }
		}
	}
	else
	{	abc = xmlDoc.getElementsByTagName("menu");
		document.getElementById("myiframe").src = abc[1].getAttribute("htmlURL");
	}

}
function setIframeProdContent (id) {
	//alert(id);
     str = "products.htm" + id;
	 window.location.href = "products.htm" + id;
//alert(window.location.href);
   window.location.href = str;
   setTimeout ("wreload()", 1000);

}
function wreload () {
		 window.location.reload();
}