/**
* Version1.2:	It has got special border feature.
*				All left right image gizmo is removed & made simpler.
*				Static arrow image is taken instade of programmatical input 
*				as it was previously, so now veriable is of no use.
*				Similar techniques in IE & NS for concept compatibility.
*/

/**
* suggest at:	yogeshsarang@indiatimes.com
*/

/**
* object implementation for holding menu positions.
*
* Name		:	Location.
* Date		:	Friday,February 8,2001.
* Author	:	Yogesh Sarang.
* Company	:	Infoseek India Pvt. Ltd.
*
* Method Summary
*	Default Constructor			: no return.
*		Asigns default values to member veriables.
* Variable Summary
*	x					: type int.
*		Its left position of element.
*	y					: type int.
*		Its top position of element.
*/
function Location()
{
	this.x=0;
	this.y=0;
}

/**
* object impementation for showing Single MenuItem.

* Name		:	MenuItem.
* Date		:	Friday,February 8,2001.
* Author	:	Yogesh Sarang.
* Company	:	Infoseek India Pvt. Ltd.
*
* Method Summary
*	Parameterized Constructor	: no return.
*		Asigns default values to member veriables.
*	createObject				: no return.
*		It creates the MenuItem in DHTML for IE it uses divisions &
*		for netscape it uses layers.	
*		\\ last improved July-24-2002. no improvements till suggested. 
* Variable Summary
*	parent				: type reference.
*		Its reference to the parent object which should of type YSMenu.
*	height				: type int.
*		Its height of the MenuItem to be displayed.
*	width				: type int.
*		Its width of the MenuItem to be displayed.
*	bgcolorOn			: type string.
*		Its background-color for MenuItem when mouse is over it.
*	bgcolorOff			: type string.
*		Its background-color for MenuItem when mouse is not over it.
*	fontSize			: type int.
*		Its height of font in pixels for MenuItem text.
*	fontFamily			: type string.
*		Its font-family used for MenuItem text.
*	fontColor			: type string.
*		Its color of the font used for MenuItem text.
*	borderColor			: type string.
*		Its color of the border for MenuItem tab.
*	mArrowImg			: type string.
*		Its the path of image to be treated as arrow.
*/
function MenuItem(parent)
{
	this.parent=parent;
	this.height=25;
	this.width=60;
	this.bgcolorOn='magenta';
	this.bgcolorOff='lightyellow';
	this.fontSize=15;
	this.fontFamily='verdana';
	this.fontColor='#aaaaaa';
	this.borderColor='black';
	this.mArrowImg='arrow.gif';
	this.createObject=createMenuItem;
}

/**
* Impementation of createObject for object MenuItem.
* Parameter summary
*	name				: type string.
*		Its name of MenuItem division or layer.
*	loc					: type Location.
*		Its the position in relative to position of main MenuItem in pixels.
*	hasSub				: type boolean.
*		It indicates if this MenuItem has submenu to it.
*	content				: type string.
*		Its text to be displayed in MenuItem.
*	refStr				: type string.
*		Its reference to other page on clicking MenuItem.
*	mOver				: type string.
*		Its mouseover script to be run for MenuItem.
*	mOut				: type string.
*		Its mouseout script to be run for MenuItem.
*/
function createMenuItem(name,loc,hasSub,content,refStr,mOver,mOut)
{
	var text="";

	if(document.all || document.getElementById)
	// If browser is IE compatible, independent of version
	{
		// for border using dual divisions.
		text="<DIV name="+name+" id="+name+" style=\"background-color:"+this.borderColor+";visibility:hidden;position:absolute;width:"+this.width+";height:"+this.height+";left:"+loc.x+";top:"+loc.y+";z-index:3\">";
		text+="<DIV name="+name+"_child id="+name+"_child ";
		text+="style=\"visibility:hidden;position:relative;background-color:"+this.bgcolorOff+";"+((refStr.length > 0)?"cursor:hand;":"cursor:default;")+"width:"+(this.width-2)+";height:"+(this.height-2)+";left:1;top:1;z-index:4\" ";
		text+="onmouseover=\"this.style.zIndex=15;this.style.backgroundColor='"+this.bgcolorOn+"';"+mOver+"\" ";
		text+="onmouseout=\"this.style.zIndex=4;this.style.backgroundColor='"+this.bgcolorOff+"';"+mOut+"\" ";
		if(document.all && hasSub)
			text+="onblur=\"if(((document.activeElement.name==null)||(document.activeElement.name.indexOf('"+this.parent.name+"')!=0))&&("+this.parent.name+".showingMenu!=-1)) {"+this.parent.name+".offMain("+this.parent.name+".showingMenu); "+this.parent.name+".hideSub("+this.parent.name+".showingMenu);}\" ";
		// strict checking provides straight link with onClick event like href.
		if(refStr.length > 0)
		{
			if((refStr.indexOf("htm")!=-1)
				||(refStr.indexOf("html")!=-1)
				||(refStr.indexOf("asp")!=-1))
				text+="onclick=\"javascript:location.href='"+refStr+"'\" ";
			else
				text+="onclick=\""+refStr+"\" ";
		}
		text+="><center>";
		text+="<table name="+name+"_table id="+name+"_table width=92% height=100% cellspacing=0 cellpadding=0 border=0><tr>";
		text+="<td name="+name+"_td  id="+name+"_td valign='middle' width=100% height=100% "
		text+="style=\"font-size:"+this.fontSize+"pt;font-family:"+this.fontFamily+";color:"+this.fontColor+"\" ";
		text+=">"+content+"</td>";
		if((hasSub)
			&& (this.parent.subMenuItemCollection.direction == this.parent.HORIZONTAL))
			text+="<td name="+name+"_td id="+name+"_td valign='middle'><img name="+name+"_img id="+name+"_img src=/images/arrow.gif></td>";
		text+="</tr></table></center></DIV></DIV>";
	}
	else if(document.layers)
	// If browser is NS compatible, perticularly of version 4.
	{
		
		// compulsary linking set to do nothing when no link.
		if(refStr.length > 0)
			refStr="href='"+refStr+"'"

		// for border use dual layers.
		text="<LAYER name="+name+" id="+name+" top="+loc.y+" left="+loc.x+" bgColor="+this.borderColor+" width="+this.width+" height="+this.height+" visibility=hidden z-index=4>";
		text+="<LAYER name="+name+"_child id="+name+"_child top=1 left=1 bgColor="+this.bgcolorOff+" width="+(this.width-2)+" height="+(this.height-2)+" visibility=hidden z-index=4 onmouseover=\"this.bgColor="+((this.bgcolorOn!=null)? "'"+this.bgcolorOn+"'" : "null")+";"+mOver+"\" onmouseout=\"this.bgColor="+((this.bgcolorOff!=null)? "'"+this.bgcolorOff+"'" : "null")+";"+mOut+"\">";
		text+="<center><table width=92% height=100% cellspacing=0 cellpadding=0 border=0><tr>";
		text+="<td valign='middle' width=100% height=100%><A "+refStr+" style='text-decoration:none;font-size:"+this.fontSize+"pt;font-family:"+this.fontFamily+";color:"+this.fontColor+"'>"+content+"</A></td>";
		if((hasSub)
			&& (this.parent.subMenuItemCollection.direction == this.parent.HORIZONTAL))
			text+="<td align='right'><img src=/images/arrow.gif></td>";
		text+="</tr></table></center></LAYER></LAYER>";
	}

	// directly adds to filler should be returned by function.  *?* 
	this.parent.filler+=text;
}

/**
* object impementation for showing MenuItem Collection.
*
* Name		:	MenuItemCollection.
* Date		:	Friday,February 8,2001.
* Author	:	Yogesh Sarang.
* Company	:	Infoseek India Pvt. Ltd.
*
* Method Summary
*	Parameterized Constructor	: no return.
*		Asigns default values to member veriables.
*	createObject				: no return.
*		It creates the MenuItemCollection in DHTML for IE it uses divisions &
*		for netscape it uses layers. Some thing like submenu in win32 programming.	
*		\\ last improved July-23-2002. no improvements till suggested. 
* Variable Summary
*	parent				: type reference.
*		Its reference to the parent object which should of type YSMenu.
*	direction			: type int.
*		Its direction in which menu should be droped.
*		It has two values VERTICAL, HORIZONTAL.
*	placement			: type int.
*		VERTICAL	->Its the horizontal seperation from left of parent MenuItem.
*		HORIZONTAL	->Its the vertical seperation from top of parent MenuItem.
*/
function MenuItemCollection(parent)
{
	this.parent=parent;
	this.direction=parent.VERTICAL;
	this.placement=3;
	this.createObject=createMenuItemCollection;
}

/**
* Impementation of createObject for object MenuItemCollection.
* Parameter summary
*	i					: type int.
*		Its index of main MenuItem in the collection.
*	content				: type string.
*		Its text to be displayed in main MenuItem.
*	loc					: type Location.
*		Its position of main MenuItem in pixels.
*	mitems				: type array.
*		Its array of texts to be displayed in sub MenuItems.
*	mlinks				: type array.
*		Its array of links to be set on sub MenuItems.
*/
function createMenuItemCollection(i,content,loc,mitems,mlinks)
{
	this.parent.mainMenuItem.createObject(this.parent.name+"_mainMenu_"+i,		//name of menuitem division
											loc,								//position of menu
											true,								//got a submenu
											content,							//menu text
											"",									//reference
											this.parent.name+".showSub("+i+");if(document.all)this.focus();",	//mouseover
											"");								//mouseout

	if(this.direction==this.parent.HORIZONTAL)
	// If submenu is to be shown sliding horizontallly.
	{
		loc.x+=this.parent.mainMenuItem.width;
		loc.y+=this.placement;
	}
	else if(this.direction==this.parent.VERTICAL)
	// If submenu is to be shown droping verticallly.
	{
		loc.x+=this.placement;
		loc.y+=this.parent.mainMenuItem.height;
	}

	// Create container for submenu item collection.
	if(document.all || document.getElementById)
		this.parent.filler+="<div name="+this.parent.name+"_subMenu_"+i+" id="+this.parent.name+"_subMenu_"+i+" style='visibility:visible;position:absolute;left:"+loc.x+";top:"+loc.y+";' onmouseover="+this.parent.name+".onMain("+i+")>";
	else if(document.layers)
		this.parent.filler+="<layer name="+this.parent.name+"_subMenu_"+i+" id="+this.parent.name+"_subMenu_"+i+" visibility=hidden left="+loc.x+" top="+loc.y+" z-index=15 onmouseover="+this.parent.name+".onMain("+i+")>";

	for(j=0; j<mitems.length; j++)
	{
		// Create relative position of submenu items.
		var sloc=new Location();

		sloc.x=0;
		sloc.y=(this.parent.subMenuItem.height -1)*j;

		if((typeof(mlinks)=="object")
		&&(typeof(mlinks[j])=="string"))
		//If link exists on MenuItem.
			this.parent.subMenuItem.createObject(this.parent.name+"_subMenu_"+i+"_"+j,	//name of menuitem division
												sloc,									//position of menu
												false,									//got a submenu
												mitems[j],								//menu text
												mlinks[j],								//reference
												"",										//mouseover
												"");									//mouseout
		else
			this.parent.subMenuItem.createObject(this.parent.name+"_subMenu_"+i+"_"+j,	//name of menuitem division
												sloc,									//position of menu
												false,									//got a submenu
												mitems[j],								//menu text
												"",										//reference
												"",										//mouseover
												"");									//mouseout
	}

	// Close container tag.
	if(document.all || document.getElementById)
		this.parent.filler+="</div>";
	else if(document.layers)
		this.parent.filler+="</layer>";
}

/**
* object impementation for showing entire menu.
*
* Name		:	YSMenu.
* Date		:	Friday,February 8,2001.
* Author	:	Yogesh Sarang.
* Company	:	Infoseek India Pvt. Ltd.
*
* Method Summary
*	Parameterized Constructor	: no return.
*		Asigns default values to member veriables.
*	showMain					: no return.
*		It displayes main MenuItems.
*		\\ last improved July-23-2002. no improvements till suggested. 
*	showSub						: no return.
*		It displayes sub MenuItems.
*		\\ last improved July-23-2002. no improvements till suggested. 
*	hideSub						: no return.
*		It hides sub MenuItems.
*		\\ last improved July-23-2002. no improvements till suggested. 
*	CreateMenu					: no return.
*		It creates the total menu structure in DHTML for IE it uses divisions &
*		for netscape it uses layers.
*		\\ last improved Nov-8-2001. no improvements till suggested. 
* Variable Summary
*	name				: type string.
*		Its name for reference to the YSMenu object & DHTML tags used for creating menu.
*	MainMenuItems		: type array.
*		Its collection of main MenuItem contents.
*	SubMenuItems		: type array.
*		Its collection of sub MenuItem contents.
*	MainMenuLinks		: type array.
*		Its collection of main MenuItem links.
*	SubMenuLinks		: type array.
*		Its collection of sub MenuItem links.
*	mainMenuLocations	: type array.
*		Its array of Location objects to store placemennt of each main MenuItem
*		in case of UNORDERED direction.
*	mainMenuItem		: type MenuItem.
*		Its main MenuItem object contains properties of main MenuItem collection
*		& method to create it in DHTML.
*	subMenuItem			: type MenuItem.
*		Its sub MenuItem object contains properties of sub MenuItem collection
*		& method to create it in DHTML.
*	subMenuItemCollection: type MenuItemCollection.
*		Its submenu collection object contains properties of submenu collection
*		& method to create it in DHTML.
*	direction			: type int.
*		Its direction in which menu should be droped.
*		It has two values VERTICAL, HORIZONTAL, UNORDERED.
*	placement			: type int.
*		UNORDERED	->User should implement the mainMenuLocations array placement is ignored.
*		VERTICAL	->Its vertical seperation between MenuItems in pixels.
*		HORIZONTAL	->Its horizontal seperation between MenuItems in pixels.
*/
function YSMenu(name)
{
	this.HORIZONTAL=0,this.VERTICAL=1,this.UNORDERED=2;
	this.NULL=0;

	this.name=name;

	this.MainMenuItems=new Array();
	this.SubMenuItems=new Array();
	
	this.MainMenuLinks=new Array();
	this.SubMenuLinks=new Array();
	
	this.mainMenuLocations=new Array();

	this.mainMenuItem=new MenuItem(this);
	this.subMenuItem=new MenuItem(this);
	this.subMenuItemCollection=new MenuItemCollection(this);
	
	this.showMain=showMain;

	this.showSub=showSub;
	this.hideSub=hideSub;
	this.onMain=onMain;
	this.offMain=offMain;

	this.CreateMenu=create;

	this.filler="";
	this.direction=this.HORIZONTAL;
	this.placement=0;
	this.showingMenu=-1;
}

/**
* Impementation of CreateMenu for object YSMenu.
* Parameter summary
*	x					: type int.
*		Its left position of first main MenuItem.
*		when placement is not UNORDERED.
*	y					: type int.
*		Its top position of first main MenuItem.
*		when placement is not UNORDERED.
*/
function create(x,y)
{
	
	if((this.direction==this.UNORDERED)
		&&(this.mainMenuLocations.length<this.MainMenuItems.length))
	// if UNORDERED its gotta be telling all positions.
	// otherwise set to good old HORIZONTAL.
			this.direction=this.HORIZONTAL;
	
	if(this.direction==this.HORIZONTAL)
	// if HORIZONTAL place MenuItems separated by placement in horizontal.
	{
		for(i=0; i<this.MainMenuItems.length; i++)
		{
			this.mainMenuLocations[i]=new Location();
			this.mainMenuLocations[i].x=x+i*(this.mainMenuItem.width+this.placement);
			this.mainMenuLocations[i].y=y;
		}
	}
	else if(this.direction==this.VERTICAL)
	// if VERTICAL place MenuItems separated by placement in vertical.
	{
		for(i=0; i<this.MainMenuItems.length; i++)
		{
			this.mainMenuLocations[i]=new Location();
			this.mainMenuLocations[i].x=x;
			this.mainMenuLocations[i].y=y+i*(this.mainMenuItem.height+this.placement);
		}
	}
	
	if(document.layers)
	// for Netscape4.X to get transparent color it should be set to null.
	{
		if(this.mainMenuItem.bgcolorOn.length==0)
			this.mainMenuItem.bgcolorOn=null;
		if(this.mainMenuItem.bgcolorOff.length==0)
			this.mainMenuItem.bgcolorOff=null;
		if(this.subMenuItem.bgcolorOn.length==0)
			this.subMenuItem.bgcolorOn=null;
		if(this.subMenuItem.bgcolorOff.length==0)
			this.subMenuItem.bgcolorOff=null;
	}

	for(i=0; i<this.MainMenuItems.length; i++)
	{
		if(typeof(this.SubMenuItems[i])=="object")
		// if there are subitems to this main MenuItem.
			this.subMenuItemCollection.createObject(i,
													this.MainMenuItems[i],
													this.mainMenuLocations[i],
													this.SubMenuItems[i],
													this.SubMenuLinks[i]);
		else if(typeof(this.MainMenuLinks[i])=="string")
		// if there are no subitems to this main MenuItem, but its got a link.
			this.mainMenuItem.createObject(this.name+"_mainMenu_"+i,				//name of menuitem division
											this.mainMenuLocations[i],				//position of menu
											false,									//got a submenu
											this.MainMenuItems[i],					//menu text
											this.MainMenuLinks[i],					//reference
"if("+this.name+".showingMenu!=-1) {"+this.name+".offMain("+this.name+".showingMenu);"+this.name+".hideSub("+this.name+".showingMenu);}",//mouseover
											"");									//mouseout
		else
		// if there are no subitems to this main MenuItem & also no link.
			this.mainMenuItem.createObject(this.name+"_mainMenu_"+i,				//name of menuitem division
											this.mainMenuLocations[i],				//position of menu
											false,									//got a submenu
											this.MainMenuItems[i],					//menu text
											"",										//reference
"if("+this.name+".showingMenu!=-1) {"+this.name+".offMain("+this.name+".showingMenu);"+this.name+".hideSub("+this.name+".showingMenu);}",//mouseover
											"");									//mouseout
	}

	this.filler+="<script language='javascript'>";
	this.filler+="if(document.all); else if(document.layers || document.getElementById){window.captureEvents(Event.FOCUS);window.onfocus="+this.name+"ClickedWindow;} function "+this.name+"ClickedWindow(e) { if("+this.name+".showingMenu!=-1) {"+this.name+".offMain("+this.name+".showingMenu); "+this.name+".hideSub("+this.name+".showingMenu);}}";
	//window.attachEvent('onfocus',"+this.name+"ClickedWindow)
	this.filler+="</script>";

	// since document.write is supported by all following DOM-0.
	// some bug is there hence document is not closed still not finalized.
	document.write(this.filler);
}

/**
* Impementation of showMain for object YSMenu.
* It displays the main MenuItems. Its implemented separately than create
* for modularity purpose.
*/
function showMain()
 {
	for(i=0; i<this.MainMenuItems.length; i++)
	{
		if(document.all)
		{
			document.all[this.name+"_mainMenu_"+i].style.visibility="visible";
			document.all[this.name+"_mainMenu_"+i+"_child"].style.visibility="visible";
		}
		else if(document.layers)
		{
			document.layers[this.name+"_mainMenu_"+i].visibility="show";
			document.layers[this.name+"_mainMenu_"+i].document.layers[this.name+"_mainMenu_"+i+"_child"].visibility="show";
		}
		else if(document.getElementById)
		{
			document.getElementById(this.name+"_mainMenu_"+i).style.visibility="visible";
			document.getElementById(this.name+"_mainMenu_"+i+"_child").style.visibility="visible";
		}
	}
}

/**
* Impementation of showSub for object YSMenu.
* sets visibility for all sub menuItems 
* & keeps main MenuItem mouseover color as for win32 menus.
* Parameter summary
*	main				: type int.
*		Its position of main MenuItem which has submenu.
*/
function showSub(main)
{
	if(this.showingMenu==main)
		return;
	else if(this.showingMenu!=-1)
	{
		this.offMain(this.showingMenu);
		this.hideSub(this.showingMenu);
	}
	this.showingMenu=main;
	if(document.all)
	{
		document.all[this.name+"_subMenu_"+main].style.visibility="visible";

		for(i=0; i<this.SubMenuItems[main].length; i++)
		{
			document.all[this.name+"_subMenu_"+main+"_"+i].style.visibility="visible";
			document.all[this.name+"_subMenu_"+main+"_"+i+"_child"].style.visibility="visible";
		}
	}
	else if(document.layers)
	{
		document.layers[this.name+"_subMenu_"+main].visibility="visible";

		for(i=0; i<this.SubMenuItems[main].length; i++)
		{
			document.layers[this.name+"_subMenu_"+main].document.layers[this.name+"_subMenu_"+main+"_"+i].visibility="visible";
			document.layers[this.name+"_subMenu_"+main].document.layers[this.name+"_subMenu_"+main+"_"+i].document.layers[this.name+"_subMenu_"+main+"_"+i+"_child"].visibility="visible";
		}
	}
	else if(document.getElementById)
	{
		document.getElementById(this.name+"_subMenu_"+main).style.visibility="visible";

		for(i=0; i<this.SubMenuItems[main].length; i++)
		{
			document.getElementById(this.name+"_subMenu_"+main+"_"+i).style.visibility="visible";
			document.getElementById(this.name+"_subMenu_"+main+"_"+i+"_child").style.visibility="visible";
		}
	}
}

/**
* Impementation of hideSub for object YSMenu.
* resets visibility for all sub menuItems 
* & sets main MenuItem mouseout color.
* Parameter summary
*	main				: type int.
*		Its position of main MenuItem which has submenu.
*/
function hideSub(main)
{
	this.showingMenu=-1;
	if(document.all)
	{
		document.all[this.name+"_subMenu_"+main].style.visibility="hidden";

		for(i=0; i< this.SubMenuItems[main].length; i++)
		{
			document.all[this.name+"_subMenu_"+main+"_"+i].style.visibility="hidden";
			document.all[this.name+"_subMenu_"+main+"_"+i+"_child"].style.visibility="hidden";
		}
	}
	else if(document.layers)
	{
		document.layers[this.name+"_subMenu_"+main].visibility="hidden";

		for(i=0; i< this.SubMenuItems[main].length; i++)
		{
			document.layers[this.name+"_subMenu_"+main].document.layers[this.name+"_subMenu_"+main+"_"+i].visibility="hidden";
			document.layers[this.name+"_subMenu_"+main].document.layers[this.name+"_subMenu_"+main+"_"+i].document.layers[this.name+"_subMenu_"+main+"_"+i+"_child"].visibility="hidden";
		}
	}
	else if(document.getElementById)
	{
		document.getElementById(this.name+"_subMenu_"+main).style.visibility="hidden";

		for(i=0; i< this.SubMenuItems[main].length; i++)
		{
			document.getElementById(this.name+"_subMenu_"+main+"_"+i).style.visibility="hidden";
			document.getElementById(this.name+"_subMenu_"+main+"_"+i+"_child").style.visibility="hidden";
		}
	}
}

/**
* Impementation of onMain for object YSMenu.
* keeps main MenuItem mouseover color as for win32 menus.
* Parameter summary
*	main				: type int.
*		Its position of main MenuItem which has submenu.
*/
function onMain(main)
{
	if(document.all)
	{
		document.all[this.name+"_mainMenu_"+main].style.backgroundColor=this.mainMenuItem.borderColor;
		document.all[this.name+"_mainMenu_"+main+"_child"].style.backgroundColor=this.mainMenuItem.bgcolorOn;
	}
	else if(document.layers)
	{
		document.layers[this.name+"_mainMenu_"+main].bgColor=this.mainMenuItem.borderColor;
		document.layers[this.name+"_mainMenu_"+main].document.layers[this.name+"_mainMenu_"+main+"_child"].bgColor=this.mainMenuItem.bgcolorOn;
	}
	else if(document.getElementById)
	{
		document.getElementById(this.name+"_mainMenu_"+main).style.backgroundColor=this.mainMenuItem.borderColor;
		document.getElementById(this.name+"_mainMenu_"+main+"_child").style.backgroundColor=this.mainMenuItem.bgcolorOn;
	}
}

/**
* Impementation of offMain for object YSMenu.
* sets main MenuItem mouseout color.
* Parameter summary
*	main				: type int.
*		Its position of main MenuItem which has submenu.
*/
function offMain(main)
{
	if(document.all)
	{
		document.all[this.name+"_mainMenu_"+main].style.backgroundColor=this.mainMenuItem.borderColor;
		document.all[this.name+"_mainMenu_"+main+"_child"].style.backgroundColor=this.mainMenuItem.bgcolorOff;

	}
	else if(document.layers)
	{
		document.layers[this.name+"_mainMenu_"+main].bgColor=this.mainMenuItem.borderColor;
		document.layers[this.name+"_mainMenu_"+main].document.layers[this.name+"_mainMenu_"+main+"_child"].bgColor=this.mainMenuItem.bgcolorOff;
	}
	else if(document.getElementById)
	{
		document.getElementById(this.name+"_mainMenu_"+main).style.backgroundColor=this.mainMenuItem.borderColor;
		document.getElementById(this.name+"_mainMenu_"+main+"_child").style.backgroundColor=this.mainMenuItem.bgcolorOff;
	}
}
