var dwStr=""
var subMBorder=0
var tmpStr=""
var i,j

if (mBorder) subMBorder=2;

function submenu_border()
{
	if (mBorder) {
		tmpStr='<td onmouseover="clearTimeout(hidetimeout);" onmouseout="SetTimeoutToCloseSubmenu()" width="1" nowrap bgcolor="'+mBorderColor+'" rowspan="'+(arrMText[j].length+subMBorder-1+(arrMText[j].length-1)*mDivider)+'"><img src="../images/spacer.gif" width="1" height="1" border="0"></td>'
		dwStr='<tr>'+tmpStr+'<td onmouseover="clearTimeout(hidetimeout);" onmouseout="SetTimeoutToCloseSubmenu()" bgcolor="'+mBorderColor+'"><img src="../images/spacer.gif" width="1" height="1" border="0"></td>'+tmpStr+'</tr>'+dwStr;
		//Bottom Border of Submenu:
		dwStr+='<tr><td onmouseover="clearTimeout(hidetimeout);" onmouseout="SetTimeoutToCloseSubmenu()" colspan="3" bgcolor="'+mBorderColor+'"><img src="../images/spacer.gif" width="1" height="1" border="0"></td></tr>'
	}
	dwStr='<table' + ((mBorder)?(''):(' width="100%"')) + ' cellpadding="0" cellspacing="0" border="0">'+dwStr+'</table>'
}

if (IE || NN6) {
// SUBMENUS
	tmpStr="";
	for (j=0; j<arrMText.length; j++)
	{
		if(arrMText[j][0]){
			dwStr="";
			for (i=0; i<arrMText[j].length; i++)
			{
				if (i && mDivider) dwStr+='<tr><td height="'+mDivHeight+'" bgcolor="'+mDivColor+'" background="'+mDivBgImage+'" onmouseover="clearTimeout(hidetimeout);" onmouseout="SetTimeoutToCloseSubmenu()"><img src="../images/spacer.gif" width="1" height="1" border="0"></td></tr>'
				
				dwStr+='<tr><td width="100%" height="'+mItemHeight+'" bgcolor="'+mBgColor+'" '
				if (mBgImage!="none" || mBgImageOver!="none") dwStr+='background="'+mBgImage+'"'
				dwStr+=' align="'+mAlign+'" style="font-family: '+mFontFamily+'; font-size:'+mFontSizeNotNN4+'px; color: '+mTextColor+'; cursor:pointer; cursor:hand;" onmouseover="submenuItemOver(this);" onmouseout="submenuItemOut(this);" onclick="location.href=arrMUrl['+j+']['+i+']" nowrap>'
					dwStr+='&nbsp;&nbsp;'+arrMText[j][i]+'&nbsp;&nbsp;'
				dwStr+='</td></tr>' 
			}
			
			dwStr+='<tr>' 
			dwStr+='	<td>' 
			dwStr+='		<table cellpadding="0" cellspacing="0" border="0">' 
			dwStr+='		<tr>' 
			dwStr+='			<td><img src="../images/topMenu/footerL.gif" width="2" height="3" border="0"></td>' 
			dwStr+='			<td width="100%" background="../images/topMenu/footerBGI.gif"><img src="../images/general/spacer.gif" width="1" height="1" border="0"></td>' 
			dwStr+='			<td><img src="../images/topMenu/footerR.gif" width="2" height="3" border="0"></td>' 
			dwStr+='		</tr>' 
			dwStr+='		</table>' 
			dwStr+='	</td>' 
			dwStr+='</tr>' 
			
			submenu_border()
			dwStr='<div id="subMenu'+j+'" style="position: absolute; left:0px; top:0px; width:0px; height:'+(mItemHeight*arrMText[j].length+subMBorder+mDivHeight*(arrMText[j].length-1)*mDivider + 3)+'px; display: none; visibility:hidden; z-index: '+(110+j)+';">'+dwStr+'</div>'
			document.write(dwStr);
		}
	}
}

if (NN4) {
// SUBMENUS
	tmpStr="";
	for (j=0; j<arrMText.length; j++)
	{
		if(arrMText[j][0]){
			dwStr="";
			for (i=0; i<arrMText[j].length; i++)
			{
				if (i && mDivider) dwStr+='<tr><td height="'+mDivHeight+'" bgcolor="'+mDivColor+'" background="'+mDivBgImage+'"><img src="../images/spacer.gif" width="1" height="1" border="0"></td></tr>'
				dwStr+='<tr><td height="1"><ilayer name="ilayerItem'+i+'" clip="0,0,'+arrMWidth[j]+','+mItemHeight+'"><layer name="layerItem'+i+'" left="0" top="0" z-index="10" bgcolor="'+mBgColor+'" background="'+mBgImage+'"><table width="'+arrMWidth[j]+'" cellpadding="0" cellspacing="0" border="0"><tr><td height="'+mItemHeight+'" align="'+mAlign+'"><nobr><spacer type="horizontal" size="4"><font face="'+mFontFamily+'" point-size="'+mFontSizeNN4+'" color="'+mTextColor+'">'+arrMText[j][i]+'</font></nobr></td></tr></table></layer><layer left="0" top="0" z-index="20" onmouseover="menuItemOver('+i+', this.parentLayer.layers[0], '+j+');" onmouseout="menuItemOut(this.parentLayer.layers[0], '+j+');"><a href="'+arrMUrl[j][i]+'"><img src="../images/spacer.gif" width="'+arrMWidth[j]+'" height="'+mItemHeight+'" border="0"></a></layer></ilayer></td></tr>'
			}
			submenu_border()
			dwStr='<layer name="subMenu'+j+'" visibility="hide" clip="0,0,'+(arrMWidth[j]+subMBorder)+','+(mItemHeight*arrMText[j].length+subMBorder+mDivHeight*(arrMText[j].length-1)*mDivider)+'" right="'+arrMCoordX[j]+'" top="'+arrMCoordY[j]+'" z-index="'+(110+j)+'"><layer name="subMenuIn" left="0" top="0">'+dwStr+'</layer></layer>'
			document.write(dwStr);
		}
	}
}

