<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>

<TITLE> New Document </TITLE>

<link href='CSS/TISCO.css' rel='stylesheet' type='text/css'>
<style type="text/css">
<!--
#foldheader{cursor:pointer;cursor:hand ; list-style-image:url(images/fold.gif)}
#foldinglist{list-style-image:url(images/list.gif)}
.page_font {  font-family: "Microsoft Sans Serif"}
a:link { color: #005CA2; text-decoration: none}
a:visited { color: #666666; text-decoration: none}
a:active { color: #009900; text-decoration:none}
a:hover { color: #0099FF; text-decoration: none}
-->
</style>
<SCRIPT src="../JS/MENU.js"></SCRIPT>
</HEAD>

<BODY>
<div id="xmlInfo">

</div>
<form method="post">



<!----------BEGIN CSC INITIAL ZONE ------------------------>

<%=screen.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->

<script language="javascript">
     var xmlDoc;
	 var xmlList;
          if (document.implementation && document.implementation.createDocument)
	      {
		       xmlDoc = document.implementation.createDocument("", "", null);
			   xmlDoc.load("../XML/ORGCHART.xml");
			   xmlDoc.onload = ShowMozilla;
			   xmlList=xmlDoc.getElementsByTagName("JOBCODE");
	      }
	      else if (document.documentElement && document.documentElement.applyElement)
	      { 
		       xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		       xmlDoc.async=false;
			   xmlDoc.load("../XML/ORGCHART.xml");
			   xmlList=xmlDoc.getElementsByTagName("JOBCODE");
               ShowData();
 	      }
	      else
	      {

		       alert('Your browser can\'t handle this script');
	      }

	 function ShowData()
	 {
		  document.write("<div align='center'>");
		  document.write("<table>");
		  document.write("<tr><td  class='header'>Company Structure&nbsp;</td></tr>");
		  document.write("<tr><td  colspan='2'><div align='center'><br>");
		  document.write("<table class='largest' border='0' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF'>");
		  document.write("<tr><td width='4%'>&nbsp;</td><td width='96%'><div nowrap>");

          document.write("<ul id='foldinglist' style=&{head};>");
          for(var i=0;i<xmlList.length;i++)
		  {
		   	  //document.write("<li>");
               if(xmlList.item(i).hasChildNodes())
			   {
				    document.write("<li id='foldheader'><a href='CI02_1.jsp?jobid="+xmlList.item(i).getAttribute("jobcodeid")+"'>"+
					xmlList.item(i).getAttribute("tdesc")+"</a></li><ul id='foldinglist' style='display:none';>");
			   }
			   else
			   {
                    
			        if(xmlList.item(i).nextSibling)
					{
                         document.write("<li>"+xmlList.item(i).getAttribute("tdesc")+"</li>");
						 //alert(xmlList.item(i).nextSibling.getAttribute("tdesc"));
					}
					else
					{
				         document.write("<li>"+xmlList.item(i).getAttribute("tdesc")+"</li></ul>");
					}
			   }
		  }
          document.write("</ul>");

          document.write("</div></td></tr></table><br></div></td></tr>");
		  document.write("<tr><td class='bottom'></td></tr></table><br></div>");
      
	 }

     function ShowMozilla()
	 {
          var e = document.getElementById("xmlInfo");
          
		  e.appendChild(document.createElement("div")).innerHTML ="<link href='CSS/TISCO.css' rel='stylesheet' type='text/css'>";
		  e.appendChild(document.createElement("div")).innerHTML ="<div align='center'>";
		  e.appendChild(document.createElement("div")).innerHTML ="<table>";
		  e.appendChild(document.createElement("div")).innerHTML ="<tr><td  class='header'>Company Structure&nbsp;</td></tr>";
		  e.appendChild(document.createElement("div")).innerHTML ="<tr><td  colspan='2'><div align='center'><br>";
		  e.appendChild(document.createElement("div")).innerHTML ="<table class='largest' border='0' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF'>";
		  e.appendChild(document.createElement("div")).innerHTML ="<tr><td>&nbsp;</td><div nowrap>";

          e.appendChild(document.createElement("div")).innerHTML ="<ul>";
          for(var i=0;i<xmlList.length;i++)
		  {
		   	  e.appendChild(document.createElement("div")).innerHTML ="<li>";
               if(xmlList.item(i).hasChildNodes())
			   {
				    e.appendChild(document.createElement("div")).innerHTML =xmlList.item(i).getAttribute("tdesc")+"</li><ul>";
			   }
			   else
			   {
                    
			        if(xmlList.item(i).nextSibling)
					{
                         e.appendChild(document.createElement("div")).innerHTML =xmlList.item(i).getAttribute("tdesc")+"</li>";
					}
					else
					{
				         e.appendChild(document.createElement("div")).innerHTML =xmlList.item(i).getAttribute("tdesc")+"</li></ul>";
					}
			   }
		  }
          e.appendChild(document.createElement("div")).innerHTML ="</ul>";

          e.appendChild(document.createElement("div")).innerHTML ="</div></tr></table><br></div></td></tr>";
		  e.appendChild(document.createElement("div")).innerHTML ="<tr><td class='bottom'></td></tr></table><br></div>";
	 }
</script>
</form>
</BODY>
</HTML>