function SubI_Mkr(parentLayer){
  temp_s_i = CBBeginSubILayer + ' WIDTH=120 HEIGHT=15 BGCOLOR="';
  if ((j % 2) == 0){
    temp_s_i += Menu.SI_EVEN_BGCOLOR;
    temp_bgcolor = Menu.SI_EVEN_BGCOLOR;
  } else {
    temp_s_i += Menu.SI_ODD_BGCOLOR;
    temp_bgcolor = Menu.SI_ODD_BGCOLOR;
  }
  temp_s_i += '" TOP=' + (SI_HEIGHT + (15 * j)) + ' LEFT=2 ID="' + this.id_name + '" onclick="top.location.href=\''+ this.url_name + '\'" class="menucursor" onmouseover="si_rovr(\'' + parentLayer + '\', \'' + this.id_name + '\', \'' + temp_bgcolor + '\')\;" onmouseout="si_rout()\;">';
  temp_s_i += '<A CLASS="si" HREF="' + this.url_name + '">&nbsp\;' + this.value_name + '</A>' + CBEndSubILayer;
  return temp_s_i;
}

function SubI(idName, valueName, urlName){
  this.id_name = idName;
  this.value_name = valueName;
  this.url_name = urlName;
}

SubI.prototype.mk_si = SubI_Mkr;

function SubMenu_Mkr(){
  temp_s_m = '<DIV ID="' + (this.id_name + 'header') + '"  STYLE="position: absolute; top: ' + Menu.SM_HEADER_TOP_COORD + 'px; left: -126px;"></DIV>';
  temp_s_m += CBBeginSubMenuLayer;
  temp_s_m += ' WIDTH=124 HEIGHT=317 BGCOLOR="' + Menu.SM_BGCOLOR + '" ID="' + this.id_name + '" ' + CBTop + Menu.SM_TOP_COORD + CBLeft + '-126' + CBEndSubMenuLayer;
  temp_s_m += CBBeginSubILayer + ' WIDTH=120 HEIGHT='+SI_HEIGHT+' TOP=2 LEFT=2 BGCOLOR="' + Menu.SM_HEADER + '" onmouseover="si_rovr()\;" onmouseout="si_rout()\;"><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=120 HEIGHT='+SI_HEIGHT+'><TR><TD BGCOLOR="' + Menu.SM_HEADER + '" CLASS="mi"><A HREF="' + this.menu_url + '" CLASS="mi">&nbsp\;' + this.value2 + '</A></TD></TR></TABLE>' + CBEndSubILayer;
  for (j = 0; j < this.s_i.length; j++){
    temp_s_m += this.s_i[j].mk_si(this.id_name);
  }
  if (this.s_i.length != 20){
    temp_s_m += CBBeginSubILayer + ' WIDTH=120 HEIGHT=' + ((20 - this.s_i.length) * 15-SI_HEIGHT+15) + ' TOP=' + (SI_HEIGHT + (this.s_i.length * 15)) + ' LEFT=2 BGCOLOR="';
    if ((this.s_i.length % 2) == 0){
	temp_s_m += Menu.SI_EVEN_BGCOLOR;
	}
	else{
	temp_s_m += Menu.SI_ODD_BGCOLOR;
	}
    temp_s_m +=  '" onmouseover="si_rovr()\;" onmouseout="si_rout()\;">&nbsp\;' + CBEndSubILayer;
  }
  temp_s_m += CBCloseTable + CBCloseLayer;
  return temp_s_m;
}

function SubMenu(idName, valueName, urlMenu){
  this.value_name = valueName;
  this.id_name = idName;
  this.menu_url = urlMenu;
  if (arguments[3]) {
	this.value2 = arguments[3];
  } else {
	this.value2 = valueName;
  }
  this.s_i = new Array();
}

SubMenu.prototype.mk_submenu = SubMenu_Mkr;

function MenuI_Mkr(){
if (i >= NAVBAR.m_i.length - 2) {
	k = 3;
} else {
	k = 0;
}
if (i == NAVBAR.m_i.length - 1) {
	SI_HEIGHT = 30;
	MI_HEIGHT = 38;	
} else {
	SI_HEIGHT = 15;
	MI_HEIGHT = 19;
}
temp_m_i = CBBeginLayer + ' BGCOLOR="' + Menu.MI_BGCOLOR[k] + '" WIDTH=102 HEIGHT='+MI_HEIGHT+' ID="' + this.id_name + '" onclick="top.location.href=\''+ this.menu_url + '\'" onmouseover="mi_rovr(\'' + this.id_name + '\', \'' + this.s_m.id_name + '\')\;" onmouseout="mi_rout()\;" CLASS="menucursor" ' + CBTop  + (Menu.TOP_COORD + 17 + (19 * i)) + CBLeft + Menu.LEFT_COORD + CBEndLayer;
temp_m_i += '<TABLE CELLSPACING=0 CELLPADDING=0 HEIGHT=17 BORDER=0><TR><TD><A onclick="this.blur()" HREF="' + this.menu_url + '" CLASS="mi">&nbsp\;<IMG SRC="/dhtml/navbar/images/arrow.gif" BORDER=0>' + this.value_name + '</A></TD></TR></TABLE>';
temp_m_i += CBBeginSubLayer + ' BGCOLOR="' + Menu.MI_BGCOLOR[1] + '" WIDTH=102 HEIGHT=1 ID="' + (this.id_name + 1) + '" TOP='+ (MI_HEIGHT-2) +' LEFT=0>' + CBCloseSubLayer;
temp_m_i += CBBeginSubLayer + ' BGCOLOR="' + Menu.MI_BGCOLOR[2] + '" WIDTH=102 HEIGHT=1 ID="' + (this.id_name + 2) + '" TOP='+ (MI_HEIGHT-1) +' LEFT=0>' + CBCloseSubLayer;
temp_m_i += CBCloseLayer;
temp_m_i += this.s_m.mk_submenu(); 
return temp_m_i;
}
function MenuI(idName, valueName, subMenu, urlMenu){
this.id_name = idName;
this.value_name = valueName;
this.menu_url = urlMenu;
this.s_m = new SubMenu(subMenu, valueName, urlMenu, arguments[4]);
}
MenuI.prototype.mk_mi = MenuI_Mkr;

function Menu_Mkr(){
temp_menu = '';
temp_menu = CBBeginLayer + ' BGCOLOR="#660033" WIDTH=102 HEIGHT=17 ID="SITENAME" CLASS="menucursor" ' + CBTop  + (Menu.TOP_COORD) + CBLeft + Menu.LEFT_COORD + CBEndLayer;
temp_menu += CBBeginSubLayer + ' BGCOLOR="#000000" WIDTH=102 HEIGHT=1 ID="top bar" TOP=0 LEFT=0>' + CBCloseSubLayer;
temp_menu += CBBeginSubLayer + ' BGCOLOR="#660033" WIDTH=102 HEIGHT=1 ID="top bar" TOP=1 LEFT=0>' + CBCloseSubLayer;
temp_menu += '<TABLE CELLSPACING=0 CELLPADDING=0 HEIGHT=14 BORDER=0><TR><TD ALIGN=CENTER><A onclick="this.blur()" HREF="/" CLASS="mi">&nbsp\;&nbsp\;&nbsp\;' + Menu.Site_Tile + '</A></TD></TR></TABLE>';
temp_menu += CBBeginSubLayer + ' BGCOLOR="#336699" WIDTH=102 HEIGHT=1 ID="top bar" TOP=16 LEFT=0>' + CBCloseSubLayer;
temp_menu += CBCloseLayer;
for (i = 0; i < this.m_i.length; i++){
temp_menu += this.m_i[i].mk_mi();
}
return temp_menu;
}
function Menu(){
this.m_i = new Array();
}
Menu.prototype.mk_menu = Menu_Mkr;
