//Menu Script Section - Do Not Edit
//1st Menu Script --------------------------------------------------------------------------------------------------
function BuildMenu1(IsInRootDir){
  var menu = "1";
  var filepath = "";
  var i = 1;

  var MenuArray = MenuString1.split(",");

  if (IsInRootDir == "Yes"){filepath1 = "08web/";}else{filepath1 = "";}
  
  var strMenuStructure = "<table width='93'  border='0' cellspacing='0' cellpadding='0'>\r\n<tr>\r\n<td class='MenuText1'>\r\n";
  if(MenuArray[i] == "#"){filepath = "";}else{filepath = filepath1;}
  strMenuStructure += "<ul id='nav"+menu+"'>\r\n<li><a href='" + filepath + MenuArray[i] + "'";
  i++;
  i++;
  strMenuStructure += " target='"+ MenuArray[i] + "'>";
  i--;
  strMenuStructure += MenuArray[i] + "</a>\r\n";
  i++;
  strMenuStructure += "<ul>\r\n";
  for(i=i;i<MenuArray.length;i++){
     if(MenuArray[i] == "[sub1]"){
		i++;
		if(MenuArray[i] == "#"){filepath = "";}else{filepath = filepath1;}
		strMenuStructure += "<li><a href='" + filepath + MenuArray[i] + "'";
		i++;
		i++;
		strMenuStructure += " target='"+ MenuArray[i] + "'>";
		i--;
		strMenuStructure += MenuArray[i] + "</a>\r\n";
        i++;
		i++;
		if(MenuArray[i] == "[sub1]"  || MenuArray[i] == "[end]"){strMenuStructure += "</li>\r\n";}
		if(MenuArray[i] == "[sub2]"){strMenuStructure += "<ul>\r\n";}
		i--;
     }	 
     if(MenuArray[i] == "[sub2]"){
		i++;
		if(MenuArray[i] == "#"){filepath = "";}else{filepath = filepath1;}
		strMenuStructure += "<li><a href='" + filepath + MenuArray[i] + "'";
		i++;
		i++;
		strMenuStructure += " target='"+ MenuArray[i] + "'>";
		i--;
		strMenuStructure += MenuArray[i] + "</a></li>";
        i++;
		i++;
		if(MenuArray[i] == "[sub1]" || MenuArray[i] == "[end]"){strMenuStructure += "</ul>\r\n</li>\r\n";}
		i--;
     }
  }
  strMenuStructure += "</ul>\r\n";
  strMenuStructure += "</td>\r\n</tr>\r\n</table>";
  return strMenuStructure;
}

//2nd Menu Script --------------------------------------------------------------------------------------------------
function BuildMenu2(IsInRootDir){
  var menu = "2";
  var filepath = "";
  var i = 1;

  var MenuArray = MenuString2.split(",");

  if (IsInRootDir == "Yes"){filepath1 = "08web/";}else{filepath1 = "";}
  
  var strMenuStructure = "<table width='52'  border='0' cellspacing='0' cellpadding='0'>\r\n<tr>\r\n<td class='MenuText1'>\r\n";
  if(MenuArray[i] == "#"){filepath = "";}else{filepath = filepath1;}
  strMenuStructure += "<ul id='nav"+menu+"'>\r\n<li><a href='" + filepath + MenuArray[i] + "'";
  i++;
  i++;
  strMenuStructure += " target='"+ MenuArray[i] + "'>";
  i--;
  strMenuStructure += MenuArray[i] + "</a>\r\n";
  i++;
  strMenuStructure += "<ul>\r\n";
  for(i=i;i<MenuArray.length;i++){
     if(MenuArray[i] == "[sub1]"){
		i++;
		if(MenuArray[i] == "#"){filepath = "";}else{filepath = filepath1;}
		strMenuStructure += "<li><a href='" + filepath + MenuArray[i] + "'";
		i++;
		i++;
		strMenuStructure += " target='"+ MenuArray[i] + "'>";
		i--;
		strMenuStructure += MenuArray[i] + "</a>\r\n";
        i++;
		i++;
		if(MenuArray[i] == "[sub1]"  || MenuArray[i] == "[end]"){strMenuStructure += "</li>\r\n";}
		if(MenuArray[i] == "[sub2]"){strMenuStructure += "<ul>\r\n";}
		i--;
     }	 
     if(MenuArray[i] == "[sub2]"){
		i++;
		if(MenuArray[i] == "#"){filepath = "";}else{filepath = filepath1;}
		strMenuStructure += "<li><a href='" + filepath + MenuArray[i] + "'";
		i++;
		i++;
		strMenuStructure += " target='"+ MenuArray[i] + "'>";
		i--;
		strMenuStructure += MenuArray[i] + "</a></li>";
        i++;
		i++;
		if(MenuArray[i] == "[sub1]" || MenuArray[i] == "[end]"){strMenuStructure += "</ul>\r\n</li>\r\n";}
		i--;
     }
  }
  strMenuStructure += "</ul>\r\n";
  strMenuStructure += "</td>\r\n</tr>\r\n</table>";
  return strMenuStructure;
}

//3rd Menu Script --------------------------------------------------------------------------------------------------
function BuildMenu3(IsInRootDir){
  var menu = "3";
  var filepath = "";
  var i = 1;

  var MenuArray = MenuString3.split(",");

  if (IsInRootDir == "Yes"){filepath1 = "08web/";}else{filepath1 = "";}
  
  var strMenuStructure = "<table width='126'  border='0' cellspacing='0' cellpadding='0'>\r\n<tr>\r\n<td class='MenuText1'>\r\n";
  if(MenuArray[i] == "#"){filepath = "";}else{filepath = filepath1;}
  strMenuStructure += "<ul id='nav"+menu+"'>\r\n<li><a href='" + filepath + MenuArray[i] + "'";
  i++;
  i++;
  strMenuStructure += " target='"+ MenuArray[i] + "'>";
  i--;
  strMenuStructure += MenuArray[i] + "</a>\r\n";
  i++;
  strMenuStructure += "<ul>\r\n";
  for(i=i;i<MenuArray.length;i++){
     if(MenuArray[i] == "[sub1]"){
		i++;
		if(MenuArray[i] == "#"){filepath = "";}else{filepath = filepath1;}
		strMenuStructure += "<li><a href='" + filepath + MenuArray[i] + "'";
		i++;
		i++;
		strMenuStructure += " target='"+ MenuArray[i] + "'>";
		i--;
		strMenuStructure += MenuArray[i] + "</a>\r\n";
        i++;
		i++;
		if(MenuArray[i] == "[sub1]"  || MenuArray[i] == "[end]"){strMenuStructure += "</li>\r\n";}
		if(MenuArray[i] == "[sub2]"){strMenuStructure += "<ul>\r\n";}
		i--;
     }	 
     if(MenuArray[i] == "[sub2]"){
		i++;
		if(MenuArray[i] == "#"){filepath = "";}else{filepath = filepath1;}
		strMenuStructure += "<li><a href='" + filepath + MenuArray[i] + "'";
		i++;
		i++;
		strMenuStructure += " target='"+ MenuArray[i] + "'>";
		i--;
		strMenuStructure += MenuArray[i] + "</a></li>";
        i++;
		i++;
		if(MenuArray[i] == "[sub1]" || MenuArray[i] == "[end]"){strMenuStructure += "</ul>\r\n</li>\r\n";}
		i--;
     }
  }
  strMenuStructure += "</ul>\r\n";
  strMenuStructure += "</td>\r\n</tr>\r\n</table>";
  return strMenuStructure;
}