			var defineMenuLocation = "images/sys/DefineMenu.xml"
			
			var d,yy,menuDom,rootitem,outfocusheaderclassname,onfocusheaderclassname;
			var outfocusrowsclassname,onfocusrowsclassname,delayms,colwidth;
		
	  		function xmlLoad(strFile,namespaces)
			{
				var dom;
				
				dom = new ActiveXObject("Msxml.DOMDocument");
				dom.async = false;
				dom.setProperty("SelectionLanguage", "XPath");
				if(namespaces)
					dom.setProperty("SelectionNamespaces",namespaces);
				dom.load(strFile);
				if (dom.parseError != 0)
				{
					alert(dom.url + ": " + dom.parseError.reason + "\nline number: " + dom.parseError.line);
					return null;
				}
				else
					return dom;
			}
			function getMenu()
			{		
				menuDom = xmlLoad(defineMenuLocation);
				rootitem				= menuDom.documentElement.getElementsByTagName("menu").item(0).childNodes;
	  			outfocusheaderclassname = menuDom.documentElement.getElementsByTagName("header").item(0).attributes(0).value;
	  			onfocusheaderclassname  = menuDom.documentElement.getElementsByTagName("header").item(0).attributes(1).value;
	  			outfocusrowsclassname   = menuDom.documentElement.getElementsByTagName("rows").item(0).attributes(0).value;
	  			onfocusrowsclassname    = menuDom.documentElement.getElementsByTagName("rows").item(0).attributes(1).value;
	  			delayms					= menuDom.documentElement.getElementsByTagName("delay").item(0).attributes(0).value;
	  			colwidth				= menuDom.documentElement.getElementsByTagName("colwidth").item(0).attributes(0).value;
			}
			function setMenuDivs()
			{
			 	menudivs = '<div id="coldiv" ></div>';
				menudivs = menudivs + '<div id="row1div"></div><div id="row2div"></div><div id="row3div"></div>';
				document.all['menuid'].innerHTML = menudivs;
			}
			function drawMenuBar()
			{
				getMenu();
				setMenuDivs();
				curHTML   = '<table id="roottable" style="POSITION:relative;top:-3;width:'+(colwidth*rootitem.length)+'" cellpadding="0" border="0" cellspacing="3"><tr>';
				for(i=0;i<rootitem.length;i++)
				{
					curitemtext   = rootitem.item(i).attributes(0).value;
					curitemurl    = rootitem.item(i).attributes(1).value;
					curitemtarget = rootitem.item(i).attributes(2).value;
					if(curitemtarget == "")
						pagesend	  = "\'"+curitemurl+"\'";
					else
						pagesend	  = "\'"+curitemurl+"?target="+curitemtarget+"\'";
						
					curHTML		  = curHTML + '<td id="rwhead" style="left:'+(i*colwidth)+';width:'+colwidth+'" onclick="gopage('+pagesend+')" class="'+outfocusheaderclassname+'" align="center" onmouseover="clearRows(),setHeaderFocus(this),draw1stRows('+i+')">'+curitemtext+'</td>';
				}
				curHTML = curHTML + '</tr></table>';
				coldiv.innerHTML = curHTML;
			}
			function draw1stRows(n)
			{
				row1div.innerHTML = "";
				xpos  = -9;
				ypos  = n*colwidth;
				rowitems = rootitem.item(n).childNodes;
				curHTML = '<table style="POSITION:relative;z-index:2000;top:'+xpos+';left:'+ypos+';" class="1-4" cellpadding="0" border="0" cellspacing="0">';
				for(i=0;i<rowitems.length;i++)
				{
					curitemtext   = rowitems.item(i).attributes(0).value;
					curitemurl    = rowitems.item(i).attributes(1).value;
					curitemtarget = rowitems.item(i).attributes(2).value;
					if(curitemtarget == "")
						pagesend	  = "~"+curitemurl+"~";
					else
						pagesend	  = "~"+curitemurl+"?target="+curitemtarget+"~";
					curHTML		  = curHTML + '<tr><td id="rw" style="" class="'+outfocusrowsclassname+'" onclick="gopage('+pagesend+')" onmouseover="clear3rdRows(),setRowsFocus(this),draw2ndRows('+n+','+i+')">'+curitemtext+'</td></tr>';
					myHTML		  = curHTML + '</table>';
					d = window.setTimeout("writeNewRows('"+myHTML+"',1)",(delayms*i));
				}
			}
			function draw2ndRows(m,n)
			{
				row2div.innerHTML = "";
				xpos  = m*colwidth+151;
				ypos  = (n+1)*20+13;
				rowitems = rootitem.item(m).childNodes.item(n).childNodes;
				curHTML = '<table style="POSITION:absolute;z-index:2000;top:'+ypos+';left:'+xpos+';" class="1-4"  cellpadding="0" border="0" cellspacing="0">';
				for(i=0;i<rowitems.length;i++)
				{
					curitemtext   = rowitems.item(i).attributes(0).value;
					curitemurl    = rowitems.item(i).attributes(1).value;
					curitemtarget = rowitems.item(i).attributes(2).value;
					if(curitemtarget == "")
						pagesend	  = "~"+curitemurl+"~";
					else
						pagesend	  = "~"+curitemurl+"?target="+curitemtarget+"~";
					curHTML		  = curHTML + '<tr><td id="rw"  class="'+outfocusrowsclassname+'" onclick="gopage('+pagesend+')" onmouseover="setRowsFocus(this),draw3rdRows('+m+','+n+','+i+')">'+curitemtext+'</td></tr>';
					myHTML		  = curHTML + '</table>';
					d = window.setTimeout("writeNewRows('"+myHTML+"',2)",delayms*i);
				}
			}
			function draw3rdRows(m,n,p)
			{
				row3div.innerHTML = "";
				
				xpos  = m*colwidth+302;
				ypos  = (n+1)*20+14+p*25;

				rowitems = rootitem.item(m).childNodes.item(n).childNodes.item(p).childNodes;
				curHTML = '<table style="position:absolute;z-index:2;top:'+ypos+';left:'+xpos+';" class="1-4"  cellpadding="0" border="0" cellspacing="0">';
				for(i=0;i<rowitems.length;i++)
				{
					curitemtext   = rowitems.item(i).attributes(0).value;
					curitemurl    = rowitems.item(i).attributes(1).value;
					curitemtarget = rowitems.item(i).attributes(2).value;
					if(curitemtarget == "")
						pagesend	  = "~"+curitemurl+"~";
					else
						pagesend	  = "~"+curitemurl+"?target="+curitemtarget+"~";
					curHTML		  = curHTML + '<tr><td id="rw"  class="'+outfocusrowsclassname+'" onclick="gopage('+pagesend+')" onmouseover="setRowsFocus(this)">'+curitemtext+'</td></tr>';
					myHTML		  = curHTML + '</table>';
					d = window.setTimeout("writeNewRows('"+myHTML+"',3)",delayms*i);
				}
			}
			function writeNewRows(rowHTML,n)
			{
				for(i=0;i<1000;i++)
				{
					if(rowHTML.indexOf("~") > -1)
						rowHTML = rowHTML.replace("~","'");
					else
						break;
				}
				switch(n)
				{
					case 1:
						row2div.innerHTML = "";
						row3div.innerHTML = "";
						row1div.innerHTML = rowHTML;
					break;
					case 2:
						row3div.innerHTML = "";
						row2div.innerHTML = rowHTML;
					break;
					case 3:
						row3div.innerHTML = rowHTML;
					break;
				}
			}
			function clearRows()
			{
				window.clearTimeout(d)
				if(document.all["row1div"])
				{
					document.all["row1div"].innerHTML  = "";
					document.all["row2div"].innerHTML  = "";
					document.all["row3div"].innerHTML  = "";
				}
			}
			function clear3rdRows()
			{
				row3div.innerHTML  = "";
			}
			function setHeaderFocus(obj)
			{
				mm = obj.parentElement.parentElement.childNodes;			
				for(i=0;i<mm.item(0).childNodes.length;i++)
				{
					 mm.item(0).childNodes.item(i).className = outfocusheaderclassname;
				}
				obj.className = onfocusheaderclassname;
			}
			function setRowsFocus(obj)
			{
				mm = obj.parentElement.parentElement.childNodes.length;
				for(i=0;i<mm;i++)
				{
					 obj.parentElement.parentElement.childNodes.item(i).childNodes.item(0).className = outfocusrowsclassname;
				}
				obj.className = onfocusrowsclassname;
			}
			function gopage(pageName)
			{
				window.navigate(pageName);
			}
			function setDiv()
			{
				yy = event.srcElement.id;
				event.cancelBubble = true;
				event.returnValue  = false;
				if(yy.indexOf("rw")<0)
				{
					clearRows();
					if(document.all['rwhead'])
					if(!isNaN(rwhead.length))
					{
						for(i=0;i<rwhead.length;i++)
						{
							rwhead[i].className = outfocusheaderclassname;
						}
					}
				}
				yy = null;
			}