// ************************************************************************** //
// ******** AK JScript Menu Version 1.0 CopyRightŪ Anat Keshev, 2003 ******** //
// ************************************************************************** //
var ak_Menu = new Array();
var ak_arTbl = new Array();
var ak_ActiveMenu = null;
var ak_ActiveItem = new Array();
var ak_OpenedSubMenus = new Array();
var ak_ItemIndex = 0;
var SubMenuIndex = 0;
var ak_DelayShowTime;
var ak_DelayHideTime;
var	ak_MyIntShow = null;
var	ak_MyIntHide = new Array();
var ak_Left;
var ak_Top;
var ak_Align;
function HideMenus(MenuIndex)
{
	clearInterval(ak_MyIntHide[MenuIndex]);
	HideMenu(ak_Menu[MenuIndex]);
}
function ShowMenus(id, Direction,Ctrl)
{
	clearInterval(ak_MyIntShow);
	ShowSubMenu(id, Direction,Ctrl);
}
function HideMenu(Menu)
{
	for (var i=0; i<ak_OpenedSubMenus.length; i++)
		document.all('sb_'+ak_OpenedSubMenus[i]).style.display='none';
	ak_OpenedSubMenus.length=0;	
}
function StartDelayHide(MenuIndex)
{
	ak_MyIntHide[MenuIndex]=setInterval('HideMenus('+MenuIndex+')', ak_DelayHideTime)
}
function StartDelayShow(id, Direction,Ctrl)
{
	if (document.all('sb_'+id).style.display!='block')
	{
		if (ak_DelayShowTime>0) 
			ak_MyIntShow=setInterval('ShowMenus('+'"'+id+'"'+','+'"'+Direction+'"'+','+'"'+Ctrl+'"'+')', ak_DelayShowTime)
		else		
		{
			ShowSubMenu(id, Direction,Ctrl);
		}	
	}
}
function CreateMenu(
										Ctrl,
										Align,
										Left,
										Top,
										TimeDelayShow,
										TimeDelayHide,
										Orientation,
										Direction,
										Arrow,
										Padding,
										Spacing,
										Dir,
										BorderStyle,
										BorderWidth,
										BorderColor,
										ShadowWidth,
										ShadowColor,
										ShadowDirection,
										FontFamily,
										FontSize,
										FontWeight,
										Color,
										BgColor,
										SelColor,
										SelBgColor,
										ActColor,
										ActBgColor
									)
{
	ak_DelayShowTime=CheckParam(TimeDelayShow,500);
	ak_DelayHideTime=CheckParam(TimeDelayHide,500);
	ak_Left=Left;
	ak_Top=Top;
	ak_Align=Align;
	ak_arTbl.length=0;
	ak_Menu[ak_Menu.length] = new ak_SubMenu(Orientation, Direction, Arrow, Padding, Spacing, Dir, BorderStyle, BorderWidth, BorderColor, ShadowWidth, ShadowColor, ShadowDirection, FontFamily, FontSize, FontWeight, Color, BgColor, SelColor, SelBgColor, ActColor, ActBgColor, ak_Menu.length, Ctrl, 'root_'+ak_Menu.length);
	return ak_Menu[ak_Menu.length-1];
}
function ak_Item(Menu,id,Caption,OnClickString,Hint,Color,Width)
{
	this.Menu = Menu;
	this.id = id;
	this.Caption = Caption;
	this.OnClickString = OnClickString;
	this.Color = Color;
	this.Width = Width;
	this.Hint = Hint;
	this.AddSubMenu = ak_AddSubMenu;
}
function CheckParam(Param,DefaultValue)
{
	if ((Param=='') || (Param==null)) 
		return DefaultValue
	else
		return Param;
}
function ak_SubMenu(
									Orientation,
									Direction,
									Arrow,
									Padding,
									Spacing,
									Dir,
									BorderStyle,
									BorderWidth,
									BorderColor,
									ShadowWidth,
									ShadowColor,
									ShadowDirection,
									FontFamily,
									FontSize,
									FontWeight,
									Color,
									BgColor,
									SelColor,
									SelBgColor,
									ActColor,
									ActBgColor,
									MenuIndex,
									Ctrl,
									SubMenuIndex
								)
{
	this.Ctrl=Ctrl;
	this.SubMenuIndex=SubMenuIndex;
	this.Orientation=Orientation;
	this.Direction=Direction;
	this.Arrow=Arrow;
	this.Padding=CheckParam(Padding,'5px');
	this.Spacing=CheckParam(Spacing,'1px');
	this.Dir=CheckParam(Dir,'ltr');
	this.BorderStyle=CheckParam(BorderStyle,'solid');
	this.BorderWidth=CheckParam(BorderWidth,'1px');
	this.BorderColor=CheckParam(BorderColor,'silver');
	this.ShadowWidth=CheckParam(ShadowWidth,'3');
	this.ShadowColor=CheckParam(ShadowColor,'silver');
	this.ShadowDirection=CheckParam(ShadowDirection,135);
	this.FontFamily=CheckParam(FontFamily,'arial');
	this.FontSize=CheckParam(FontSize,'10px');
	this.FontWeight=CheckParam(FontWeight,'normal');
	this.Color=CheckParam(Color,'blue');
	this.BgColor=CheckParam(BgColor,'#dddddd');
	this.SelColor=CheckParam(SelColor,'white');
	this.SelBgColor=CheckParam(SelBgColor,'teal');
	this.ActColor=CheckParam(ActColor,'red');
	this.ActBgColor=CheckParam(ActBgColor,'#dddddd');
	this.MenuIndex=MenuIndex;
	this.Items= new Array();
	this.AddItem=ak_AddItem;
	this.AddSeparator=ak_AddSeparator;
	this.Item=ak_GetItem;
	this.Show=ak_Show;
}
function ak_AddItem(Caption,OnClickString,Hint)
{
	ak_ItemIndex++;
	id='m_'+this.MenuIndex+'_'+ak_ItemIndex;
	this.Items[this.Items.length]	= new ak_Item(this,id,Caption,OnClickString,Hint);
	return this.Items[this.Items.length-1];
}
function ak_AddSeparator(Color,Width,Shadow)
{
	ak_ItemIndex++;
	id='m_'+this.MenuIndex+'_'+ak_ItemIndex;
	this.Items[this.Items.length]	= new ak_Item(this,id,'-',Shadow,'',Color,Width);
	return this.Items[this.Items.length-1];
}
function ak_AddSubMenu(Orientation,Direction,Arrow,Padding,Spacing,Dir,BorderStyle,BorderWidth,BorderColor,ShadowWidth,ShadowColor,ShadowDirection,FontFamily,FontSize,FontWeight,Color,BgColor,SelColor,SelBgColor,ActColor,ActBgColor)
{
	Orientation=CheckParam(Orientation,this.Menu.Orientation)
	Direction=CheckParam(Direction,this.Menu.Direction)
	Arrow=CheckParam(Arrow,this.Menu.Arrow)
	Padding=CheckParam(Padding,this.Menu.Padding)
	Spacing=CheckParam(Spacing,this.Menu.Spacing)
	Dir=CheckParam(Dir,this.Menu.Dir)
	BorderStyle=CheckParam(BorderStyle,this.Menu.BorderStyle)
	BorderWidth=CheckParam(BorderWidth,this.Menu.BorderWidth)
	BorderColor=CheckParam(BorderColor,this.Menu.BorderColor)
	ShadowWidth=CheckParam(ShadowWidth,this.Menu.ShadowWidth)
	ShadowColor=CheckParam(ShadowColor,this.Menu.ShadowColor)
	ShadowDirection=CheckParam(ShadowDirection,this.Menu.ShadowDirection)
	FontFamily=CheckParam(FontFamily,this.Menu.FontFamily)
	FontSize=CheckParam(FontSize,this.Menu.FontSize)
	FontWeight=CheckParam(FontWeight,this.Menu.FontWeight)
	Color=CheckParam(Color,this.Menu.Color)
	BgColor=CheckParam(BgColor,this.Menu.BgColor)
	SelColor=CheckParam(SelColor,this.Menu.SelColor)
	SelBgColor=CheckParam(SelBgColor,this.Menu.SelBgColor)
	ActColor=CheckParam(ActColor,this.Menu.ActColor)
	ActBgColor=CheckParam(ActBgColor,this.Menu.ActBgColor)
	this.SubMenu = new ak_SubMenu(Orientation, Direction, Arrow, Padding, Spacing, Dir, BorderStyle, BorderWidth, BorderColor, ShadowWidth, ShadowColor, ShadowDirection, FontFamily, FontSize, FontWeight, Color, BgColor, SelColor, SelBgColor, ActColor, ActBgColor, this.Menu.MenuIndex, this.Menu.Ctrl, this.id);
	return this.SubMenu;
}
function ak_Show(id)
{
	var baseURL = GetBase();
	if (this.Items.length==null) return;
	if (id==null) id='root_'+this.MenuIndex;
	var j;
	var cOnMouseOver='';
	var cOnMouseOut='';
	var cOnClick='';
	j=ak_arTbl.length;
	var st='<style type="text/css">\n'
	st+='.st_SbMn_'+id+' {\n';
	st+='display:none;\n';
	st+='cursor:default;\n';
	st+='position:absolute;\n';
	st+='top:0;\n';
	st+='left:0;\n';
	st+='border-style: '+this.BorderStyle+';\n';
	st+='border-width: '+this.BorderWidth+';\n';
	st+='border-color: '+this.BorderColor+';\n';
	st+='background-color: '+this.BgColor+';\n';
	st+='font-family: '+this.FontFamily+';\n';
	if (this.ShadowWidth>0)
		st+='FILTER: progid:DXImageTransform.Microsoft.Shadow(direction='+this.ShadowDirection+', color='+this.ShadowColor+', Strength='+this.ShadowWidth+');\n';
	st+='font-weight:'+this.FontWeight+';\n';
	st+='font-size:'+this.FontSize+';\n';
	st+='color:'+this.Color+';\n';
	st+='}\n';
	document.write(st);
	st='';
	st+='.st_Item_'+id+' {\n';
	st+='font-family: '+this.FontFamily+';\n';
	st+='font-weight:'+this.FontWeight+';\n';
	st+='font-size:'+this.FontSize+';\n';
	st+='text-decoration: none;\n';
	st+='color:'+this.Color+';\n';
	st+='display:block;\n';
	st+='}\n';

	st+='.st_Item_'+id+':hover {\n';
	st+='text-decoration: none;\n';
	st+='color:'+this.SelColor+';\n';
	st+='display:block;\n';
	st+='}\n';

	document.write(st);

	st='';
	st+='.st_ItemSel_'+id+' {\n';
	st+='font-family: '+this.FontFamily+';\n';
	st+='font-weight:'+this.FontWeight+';\n';
	st+='font-size:'+this.FontSize+';\n';
	st+='color:'+this.SelColor+';\n';
	st+='background-color:'+this.SelBgColor+';\n';
	st+='}\n';
	document.write(st);

	st='';
	st+='.st_ItemAct_'+id+' {\n';
	st+='font-family: '+this.FontFamily+';\n';
	st+='font-weight:'+this.FontWeight+';\n';
	st+='font-size:'+this.FontSize+';\n';
	st+='color:'+this.ActColor+';\n';
	st+='background-color:'+this.ActBgColor+';\n';
	st+='}\n';
	document.write(st);

	st='';
	st+='.st_Padding_'+id+' {\n';
	st+='padding:'+this.Padding+';\n';
	st+='}\n';
	document.write(st);

	st='</style>\n';
	document.write(st);

	ak_arTbl[j]='';
	ak_arTbl[j]+='<table cellpadding="0" cellspacing="0" id="sb_'+id+'" ';
	ak_arTbl[j]+='onselectstart="return false" ';
	ak_arTbl[j]+='onmouseout="';
	ak_arTbl[j]+='StartDelayHide('+this.MenuIndex+'); ';
	ak_arTbl[j]+='clearInterval(ak_MyIntShow); ';
	ak_arTbl[j]+='" ';
	ak_arTbl[j]+='onmouseover="';
	ak_arTbl[j]+='clearInterval(ak_MyIntHide['+this.MenuIndex+']); ';
	ak_arTbl[j]+='ak_ActiveMenu='+"'"+this.MenuIndex+"'"+'; ';
	ak_arTbl[j]+='" ';
	ak_arTbl[j]+='dir="'+this.Dir+'" ';
	ak_arTbl[j]+='class="st_SbMn_'+id+'" ';
	ak_arTbl[j]+='>';
	for (var i=0; i<this.Items.length; i++)
	{
		cOnMouseOver=' onmouseover="';
		cOnMouseOver+='HideSubMenu('+"'"+this.Items[i].id+"'"+","+"'"+this.MenuIndex+"'"+'); ';
		if (this.Items[i].SubMenu!=null)
			cOnMouseOver+='ak_ActiveMenu='+"'"+this.MenuIndex+"'"+'; StartDelayShow('+"'"+this.Items[i].id+"'"+','+"'"+this.Items[i].SubMenu.Direction+"'"+'); ';
		cOnMouseOver+='this.className='+"'st_ItemSel_"+id+"'"+'" ';
		cOnMouseOut=' onmouseout="';
		cOnMouseOut+='this.className='+"'st_Item_"+id+"'"+'" ';
		cOnClick='';
		if (this.Orientation!='Horizontal')
			ak_arTbl[j]+='<tr valign="middle">';
		ak_arTbl[j]+='<td'
		if ((this.Items[i].Hint!='') && (this.Items[i].Hint!=null))
			ak_arTbl[j]+=' title="'+this.Items[i].Hint+'"';
		ak_arTbl[j]+=' style="';
		ak_arTbl[j]+='">';
		if (this.Items[i].Caption=='-')
		{
			if (this.Orientation=='Horizontal')
			{
				ak_arTbl[j]+='<table align="left" height="'+(eval(this.FontSize)+this.Padding*2-this.Spacing*2)+'" cellpadding="0" cellspacing="0" border="0" bgcolor="'+this.Items[i].Color+'" width="'+this.Items[i].Width+'"><tr valign="middle"><td></table>';
				if (this.Items[i].OnClickString==1)
					ak_arTbl[j]+='<table align="left" height="'+(eval(this.FontSize)+this.Padding*2-this.Spacing*2)+'" cellpadding="0" cellspacing="0" border="0" bgcolor="white" width="1px"><tr valign="middle"><td></table>';
			}
			else
			{
				if (this.Items[i].Width == 0)
					this.Items[i].Width = 1;
				ak_arTbl[j]+='<DIV style="MARGIN-LEFT: ' + this.Spacing + 'px; MARGIN-RIGHT: ' + this.Spacing + 'px; BACKGROUND-COLOR: '+this.Items[i].Color+'; HEIGHT: '+this.Items[i].Width+'px; OVERFLOW: hidden;"></DIV>'
				if (this.Items[i].OnClickString==1)
					ak_arTbl[j]+='<DIV style="MARGIN-LEFT: ' + this.Spacing + 'px; MARGIN-RIGHT: ' + this.Spacing + 'px; BACKGROUND-COLOR: #FFFFFF; HEIGHT: 1px; OVERFLOW: hidden;"></DIV>'
			}				
		}	
		else
		{
			ak_arTbl[j]+='<table border="0" width="100%" height="100%" id="'+this.Items[i].id+'"'+cOnMouseOver+cOnMouseOut+cOnClick+' '
			ak_arTbl[j]+='cellspacing="0" ';
			ak_arTbl[j]+='cellpadding="0" ';
			ak_arTbl[j]+='class="st_Item_'+id+'" ';
			ak_arTbl[j]+='><tr valign="middle"><td nowrap';
			if ((this.Items[i].OnClickString=='') || (this.Items[i].OnClickString==null))
				ak_arTbl[j]+=' class="st_Padding_'+id+'"';
			ak_arTbl[j]+='>';

			
			if ((this.Items[i].OnClickString!='') && (this.Items[i].OnClickString!=null))
			{
				var arHREF = new Array();
				var HREF = '';
				arHREF = this.Items[i].OnClickString.split(',');
	
				ak_arTbl[j]+='<a class="st_Item_'+id+' st_Padding_'+id+'" href="';
				
				if (arHREF[0].substr(0,7).toLowerCase()=='http://')
				{	
					HREF = arHREF[0];
				}
				else
				{	
					if (baseURL != null)
						HREF = baseURL + arHREF[0];
					else
						HREF = arHREF[0];
				}

				ak_arTbl[j] += HREF;

				ak_arTbl[j] += '" target="' + arHREF[1] + '"';
				ak_arTbl[j]+='>';
			}

			ak_arTbl[j]+='&nbsp;&nbsp;<span id="'+this.Items[i].id+'_caption" class="">';
			ak_arTbl[j]+=this.Items[i].Caption;
			ak_arTbl[j]+='</span>';
			if ((this.Items[i].OnClickString!='') && (this.Items[i].OnClickString!=null))
				ak_arTbl[j]+='&nbsp;&nbsp;';


			if ((this.Items[i].OnClickString!='') && (this.Items[i].OnClickString!=null))
				ak_arTbl[j]+='</a>';

			if (this.Items[i].SubMenu!=null)
			{
				if (this.Arrow!=0)
				{
					if (this.Orientation=='Horizontal')
					{
//						ak_arTbl[j]+='<img src="arD'+arSize+'.gif" style="margin-left: '+this.Padding+'px;">';
						ak_arTbl[j]+='<td style="padding-left: '+this.Padding*2+'px;"><script>mnArDown('+(this.FontSize-1)+', "'+this.Color+'");</script>';
					}	
					else
					{
						if (this.Dir=='ltr')
//							ak_arTbl[j]+='<td width="1"><img src="arR'+arSize+'.gif" align="bottom" style1="margin-right: '+this.Padding+'px;"></td>';
							ak_arTbl[j]+='<td align="right" style="padding-left: '+this.FontSize+'px;padding-right: '+this.Padding*2+'px;"><script>mnArRight('+(this.FontSize-3)+', "'+this.Color+'");</script>';
						if (this.Dir=='rtl')
//							ak_arTbl[j]+='<td width="1"><img src="arL'+arSize+'.gif" align="bottom" style1="margin-left: '+this.Padding+'px;"></td>';
							ak_arTbl[j]+='<td align="left" style="padding-right: '+this.FontSize+'px;"><script>mnArLeft('+(this.FontSize-3)+', "'+this.Color+'");</script>';
					}	
				}		
				else
					ak_arTbl[j]+='<td width="1px">';
				this.Items[i].SubMenu.Show(this.Items[i].id);
			}	
			ak_arTbl[j]+='</table>';
		}
	}	
	ak_arTbl[j]+='</table>';
	if (id=='root_'+this.MenuIndex)
	{
		document.write('<div id="akMenuDiv'+this.MenuIndex+'">');
			document.write(ak_arTbl.join(''));
		document.write('</div>');
		ShowSubMenu('root_'+this.MenuIndex,'',this.Ctrl);
	}	
}
function ShowSubMenu(id, Direction,Ctrl)
{
	var ShadowWidth=0;
	var ind;
	if (ak_ActiveMenu!=null)
	{
		ShadowWidth=ak_Menu[ak_ActiveMenu].Item(id).Menu.ShadowWidth*1;
		var ShadowDirection=ak_Menu[ak_ActiveMenu].Item(id).Menu.ShadowDirection*1;
		if ((ShadowDirection == 45) || (ShadowDirection == 135))
			ShadowWidth = 0;
	}
	document.all('sb_'+id).style.display='block';
	if (id.indexOf('root_')<0)
	{
		ak_OpenedSubMenus[ak_OpenedSubMenus.length]=id;
		var point=fGetXY(document.all(id));

//		var rowInd = document.all(id).parentNode.parentNode.rowIndex;
//		ChildShadowWidth=ak_Menu[ak_ActiveMenu].Item(id).Menu.Items[rowInd].SubMenu.ShadowWidth*1;
//		var ShadowDirection=ak_Menu[ak_ActiveMenu].Item(id).Menu.Items[rowInd].SubMenu.ShadowDirection*1;

		if (Direction=='Left') {
//			if ((ShadowDirection == 225) || (ShadowDirection == 315))
//				ChildShadowWidth = 0;
			document.all('sb_'+id).style.left=point.x-document.all('sb_'+id).offsetWidth+ShadowWidth/*+ChildShadowWidth*/;
			document.all('sb_'+id).style.top=point.y+1/*+ChildShadowWidth*/;
		}
		else if (Direction=='Bottom') {
			if (ak_Menu[ak_ActiveMenu].Item(id).Menu.Dir=='ltr')
				document.all('sb_'+id).style.left=point.x+1
			else	
				document.all('sb_'+id).style.left=point.x+document.all(id).offsetWidth-document.all('sb_'+id).offsetWidth-1;
			document.all('sb_'+id).style.top=point.y+document.all(id).offsetHeight-1;
		}
		else if (Direction=='Top') {
			document.all('sb_'+id).style.left=point.x+1;
			document.all('sb_'+id).style.top=point.y-document.all('sb_'+id).offsetHeight+1;
		}
		else {
//			if ((ShadowDirection == 45) || (ShadowDirection == 135))
//				ChildShadowWidth = 0;
			document.all('sb_'+id).style.left=point.x+document.all(id).offsetWidth+ShadowWidth/*-ChildShadowWidth*/;
			document.all('sb_'+id).style.top=point.y+1;
		}
		if (parseInt(document.all('sb_'+id).style.top)+document.all('sb_'+id).offsetHeight>document.body.scrollTop+document.body.clientHeight)
			{document.all('sb_'+id).style.top=document.body.scrollTop+document.body.clientHeight-document.all('sb_'+id).offsetHeight}
	}	
	else
	{
		if ((Ctrl!='') && (Ctrl!=null)) 
		{
			var point=fGetXY(Ctrl);
			document.all('sb_'+id).style.left=point.x;
			document.all('sb_'+id).style.top=point.y;
		}	
		else
		{
			document.all('sb_'+id).style.left=ak_Left;
			document.all('sb_'+id).style.top=ak_Top;
			if ((ak_Top==null) || (ak_Top==''))
			{
				document.all('sb_'+id).style.position='static';
				document.all('sb_'+id).align=ak_Align;
			}
		}	
	}
}
function HideSubMenu(id,MenuIndex)
{
	for (var i=0; i<ak_OpenedSubMenus.length; i++)
	{
		if (ak_OpenedSubMenus[i]==id) return;
	}
	for (var i=0; i<ak_OpenedSubMenus.length; i++)
	{
		if (ak_OpenedSubMenus[i]==ak_Menu[MenuIndex].Item(id).Menu.SubMenuIndex)
		{
			for (var j=i+1; j<ak_OpenedSubMenus.length; j++)
			{
				document.all('sb_'+ak_OpenedSubMenus[j]).style.display='none';
			}
			ak_OpenedSubMenus.length=i+1;	
			return;
		}
	}
	for (var i=0; i<ak_OpenedSubMenus.length; i++)
		document.all('sb_'+ak_OpenedSubMenus[i]).style.display='none';
	ak_OpenedSubMenus.length=0;	
}
//////////////////////////////////////////////////////////////////////
function ak_ShowActiveItem(NewItem)
{
	var ActItem=ak_ActiveItem[ak_ActiveMenu];
	if (ActItem!=null)
	{
		var s = '';
		s+='this.className='+"'st_Item_"+ak_Menu[ak_ActiveMenu].Item(ActItem).Menu.SubMenuIndex+"'"+'; ';	
		s = new Function(s)
		document.all(ActItem).onmouseout=s
		document.all(ActItem).className='st_Item_'+ak_Menu[ak_ActiveMenu].Item(ActItem).Menu.SubMenuIndex;
	}
	var s = '';
	s+='this.className='+"'st_ItemAct_"+ak_Menu[ak_ActiveMenu].Item(NewItem).Menu.SubMenuIndex+"'"+'; ';	
	s = new Function(s)
	document.all(NewItem).onmouseout=s;
	document.all(NewItem).className='st_ItemAct_'+ak_Menu[ak_ActiveMenu].Item(NewItem).Menu.SubMenuIndex;
}
//////////////////////////////////////////////////////////////////////
function Point(iX, iY)
{
	this.x = iX;
	this.y = iY;
}
//////////////////////////////////////////////////////////////////////
function fGetXY(aTag)
{
  var oTmp = aTag;
  var pt = new Point(0,0);
  do {
  	pt.x += oTmp.offsetLeft;
  	pt.y += oTmp.offsetTop;
  	oTmp = oTmp.offsetParent;
  } while(oTmp.tagName!="BODY");
  return pt;
}
//////////////////////////////////////////////////////////////////////
function ak_GetItem(id)
{
	var Item;
	for (var i=0; i<this.Items.length; i++)
	{
		if (this.Items[i].id==id) return this.Items[i];
		if (this.Items[i].SubMenu!=null)
		{
			Item=this.Items[i].SubMenu.Item(id);
			if (Item!=null) return Item;
		}
	}
	return null
}
//////////////////////////////////////////////////////////////////////
function GetBase()
{
//    var oBaseColl = document.all.tags('BASE');
    var oBaseColl = document.getElementsByTagName('BASE');
    return ( (oBaseColl && oBaseColl.length) ? oBaseColl[0].href : 
        null );
}
function mnArDown(size, color)	
{
	var s = ''
	s += '<DIV style="POSITION: relative; WIDTH: ' + size + 'px; HEIGHT: ' + (size + 1) / 2 + 'px">'
	for (var i = 1; i <= (size + 1) / 2; i++)
	{
		s += '<DIV style="POSITION: absolute; BACKGROUND-COLOR: ' + color + '; WIDTH: ' + (size - i * 2) + 'px; HEIGHT: 1px; OVERFLOW: hidden; TOP: ' + i + 'px; LEFT: ' + i + 'px"></DIV>'
	}
	s += '</DIV>'
	document.write(s)
}
function mnArLeft(size, color)	
{
	var s = '';
	s += '<DIV style="POSITION: relative; HEIGHT: ' + size + 'px; WIDTH: ' + (size + 1) / 2 + 'px">';
	for (var i = 1; i <= size; i++)
	{
		w = i;
		if (i > size / 2)
			w = size - i;
		s += '<DIV style="POSITION: absolute; BACKGROUND-COLOR: ' + color + '; WIDTH: ' + w + 'px; HEIGHT: 1px; OVERFLOW: hidden; TOP: ' + i + 'px; LEFT: ' + (size - w + 1) + 'px"></DIV>';
	}
	s += '</DIV>'
	document.write(s)
}
function mnArRight(size, color)	
{
	var s = '';
	s += '<DIV style="POSITION: relative; HEIGHT: ' + size + 'px; WIDTH: ' + (size + 1) / 2 + 'px">';
	for (var i = 1; i <= size; i++)
	{
		w = i;
		if (i > size / 2)
			w = size - i;
		s += '<DIV style="POSITION: absolute; BACKGROUND-COLOR: ' + color + '; WIDTH: ' + w + 'px; HEIGHT: 1px; OVERFLOW: hidden; TOP: ' + i + 'px; LEFT: 1px"></DIV>';
	}
	s += '</DIV>'
	document.write(s)
}

