//////////////////////////////////////////////////
// DMB DHTML ENGINE 1.3.003                     //
// (c)xFX JumpStart                             //
//                                              //
// PSN: 0177A1-434584-XFX-8458                  //
//                                              //
// GENERATED: 9/12/2002 - 9:03:14 AM            //
// -------------------------------------------- //
//  Config: remote                              //
//   AddIn:                                     //
// JS Name: menu                                //
//////////////////////////////////////////////////


	var nStyle = new Array;
	var hStyle = new Array;
	var nLayer = new Array;
	var hLayer = new Array;
	var nTCode = new Array;

	var AnimStep = 0;
	var AnimHnd = 0;
	var HTHnd = new Array;
	var MenusReady = false;
	var imgLRsc = new Image;
	var imgRRsc = new Image;
	var smHnd = 0;
	var lsc = null;
	var tmrHideHnd = 0;
	var IsOverHS = false;
	var IsContext = false;
	var IsFrames = false;
	var AnimSpeed = 35;
	var TimerHideDelay = 2000;
	var SubMenusDelay = 200;

	var cntxMenu = '';
	var DoFormsTweak = true;

	function GetOPStyle(){;}function SetOPStyle(){;}

	var nsOW;
	var nsOH;

	var mFrame;
	var cFrame = self;

	var OpenMenus = new Array;
	var nOM = 0;

	var mX;
	var mY;

	var BV=parseFloat(navigator.appVersion.indexOf("MSIE")>0?navigator.appVersion.split(";")[1].substr(6):navigator.appVersion);
	var BN=navigator.appName;
	var IsWin=(navigator.userAgent.indexOf('Win')!=-1);
	var IsMac=(navigator.userAgent.indexOf('Mac')!=-1);
	var KQ=(BN.indexOf('Konqueror')!=-1&&(BV>=5))?true:false;
	var OP=(navigator.userAgent.indexOf('Opera')!=-1&&BV>=4)?true:false;
	var NS=(BN.indexOf('Netscape')!=-1&&(BV>=4&&BV<5)&&!OP)?true:false;
	var SM=(BN.indexOf('Netscape')!=-1&&(BV>=5)||OP)?true:false;
	var IE=(BN.indexOf('Explorer')!=-1&&(BV>=4)||SM||KQ)?true:false;

	if(!eval(frames['self'])) {
		frames.self = window;
		frames.top = top;
	}


	


	var fx = 0;



var tbUseToolbar = true;
var tbBorder = 0;
var tbSpacing = 1;
var tbStyle = 1;
var tbAlignment = 0;
var tbSpanning = 1;
var tbFollowHScroll = false;
var tbFollowVScroll = false;
var tbMargins = [1,1];
var tbFPos = [0,0];
var lmcHS = null;
var tbHS = new Array;
var tbWidth = 149;
var tbHeight = 247;
var hshStyle = new Array;
tbHS[1]=[149,30];
tbHS[2]=[149,30];
tbHS[3]=[149,30];
tbHS[4]=[149,30];
tbHS[5]=[149,30];
tbHS[6]=[149,30];
tbHS[7]=[149,30];
tbHS[8]=[149,30];
hshStyle[1001]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand";
hshStyle[1002]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand";
hshStyle[1003]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand";
hshStyle[1004]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand";
hshStyle[1005]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand";
hshStyle[1006]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand";
hshStyle[1007]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand";
hshStyle[1008]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand";
	nTCode[1001]="cFrame.execURL('/index_fr.htm', 'top');";
	nTCode[1002]="cFrame.execURL('/about_us.htm', 'frames[top].frames[mainFrame]');";
	nTCode[1003]="cFrame.ShowMenu('Software',GetHSPos(3,6,217,216)[0],GetHSPos(3,6,217,216)[1],false);";
	nTCode[1004]="cFrame.execURL('/accounting.htm', 'frames[top].frames[mainFrame]');";
	nTCode[1005]="cFrame.execURL('/client_access.htm', 'frames[top].frames[mainFrame]');";
	nTCode[1006]="cFrame.execURL('/partners.htm', 'frames[top].frames[mainFrame]');";
	nTCode[1007]="cFrame.execURL('/contact_us.htm', 'frames[top].frames[mainFrame]');";
	nTCode[1008]="cFrame.execURL('/contact_us.htm', 'frames[top].frames[mainFrame]');";
	if(IE)
		with(document) {
			open();
			write("<div id=dmbTBBack style=\"position:absolute; overflow:hidden; z-index:998; visibility:hidden; width:149px; height:100%;\"></div><div id=dmbTB style=\"position:absolute; z-index:999; visibility:hidden; width:149px; height:247px;\"><div id=1001 style=\"position: absolute; top: 0px; left: 0px; width: 149px; height: 30px; border: 2px outset -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #000000; background-color: #EBEBEE\" OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsHoverSel(0,\'\',\'\',this);\" OnClick=\"cFrame.execURL(\'/index_fr.htm\', \'top\');\" OnMouseOut=\"if(lmcHS)hsHoverSel(1);\"><span style=\"position:absolute; top: 6px; left: 4px; width: 137px; height: 14px;\"><div style=\"position:absolute; top:0px; width:137px; left:0px;\" align=left>  Home</div></span></div><div id=1002 style=\"position: absolute; top: 31px; left: 0px; width: 149px; height: 30px; border: 2px outset -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #000000; background-color: #EBEBEE\" OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsHoverSel(0,\'\',\'\',this);\" OnClick=\"cFrame.execURL(\'/about_us.htm\', \'frames[top].frames[mainFrame]\');\" OnMouseOut=\"if(lmcHS)hsHoverSel(1);\"><span style=\"position:absolute; top: 6px; left: 4px; width: 137px; height: 14px;\"><div style=\"position:absolute; top:0px; width:137px; left:0px;\" align=left>  About Us</div></span></div><div id=1003 style=\"position: absolute; top: 62px; left: 0px; width: 149px; height: 30px; border: 2px outset -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #000000; background-color: #EBEBEE\" OnMouseOver=\"hsHoverSel(0,\'\',\'\',this);cFrame.ShowMenu(\'Software\',GetHSPos(3,6,217,216)[0],GetHSPos(3,6,217,216)[1],false);\" OnClick=\"cFrame.ShowMenu(\'Software\',GetHSPos(3,6,217,216)[0],GetHSPos(3,6,217,216)[1],false);\" OnMouseOut=\"tHideAll();\"><span style=\"position:absolute; top: 6px; left: 4px; width: 137px; height: 14px;\"><div style=\"position:absolute; top:0px; width:137px; left:0px;\" align=left>  Software</div></span></div><div id=1004 style=\"position: absolute; top: 93px; left: 0px; width: 149px; height: 30px; border: 2px outset -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #000000; background-color: #EBEBEE\" OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsHoverSel(0,\'\',\'\',this);\" OnClick=\"cFrame.execURL(\'/accounting.htm\', \'frames[top].frames[mainFrame]\');\" OnMouseOut=\"if(lmcHS)hsHoverSel(1);\"><span style=\"position:absolute; top: 6px; left: 4px; width: 137px; height: 14px;\"><div style=\"position:absolute; top:0px; width:137px; left:0px;\" align=left>  Accounting Services</div></span></div><div id=1005 style=\"position: absolute; top: 124px; left: 0px; width: 149px; height: 30px; border: 2px outset -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #000000; background-color: #EBEBEE\" OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsHoverSel(0,\'\',\'\',this);\" OnClick=\"cFrame.execURL(\'/client_access.htm\', \'frames[top].frames[mainFrame]\');\" OnMouseOut=\"if(lmcHS)hsHoverSel(1);\"><span style=\"position:absolute; top: 6px; left: 4px; width: 137px; height: 14px;\"><div style=\"position:absolute; top:0px; width:137px; left:0px;\" align=left>  Client Access</div></span></div><div id=1006 style=\"position: absolute; top: 155px; left: 0px; width: 149px; height: 30px; border: 2px outset -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #000000; background-color: #EBEBEE\" OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsHoverSel(0,\'\',\'\',this);\" OnClick=\"cFrame.execURL(\'/partners.htm\', \'frames[top].frames[mainFrame]\');\" OnMouseOut=\"if(lmcHS)hsHoverSel(1);\"><span style=\"position:absolute; top: 6px; left: 4px; width: 137px; height: 14px;\"><div style=\"position:absolute; top:0px; width:137px; left:0px;\" align=left>  Partners/Links</div></span></div><div id=1007 style=\"position: absolute; top: 186px; left: 0px; width: 149px; height: 30px; border: 2px outset -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #000000; background-color: #EBEBEE\" OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsHoverSel(0,\'\',\'\',this);\" OnClick=\"cFrame.execURL(\'/contact_us.htm\', \'frames[top].frames[mainFrame]\');\" OnMouseOut=\"if(lmcHS)hsHoverSel(1);\"><span style=\"position:absolute; top: 6px; left: 4px; width: 137px; height: 14px;\"><div style=\"position:absolute; top:0px; width:137px; left:0px;\" align=left>  Contact Us</div></span></div><div id=1008 style=\"position: absolute; top: 217px; left: 0px; width: 149px; height: 30px; border: 2px outset -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: none; text-decoration: none; color: #000000; background-color: #EBEBEE\" OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsHoverSel(0,\'\',\'\',this);\" OnClick=\"cFrame.execURL(\'/contact_us.htm\', \'frames[top].frames[mainFrame]\');\" OnMouseOut=\"if(lmcHS)hsHoverSel(1);\"><span style=\"position:absolute; top: 6px; left: 4px; width: 137px; height: 14px;\"><div style=\"position:absolute; top:0px; width:137px; left:0px;\" align=left>Request Information</div></span></div></div>");
			close();
		}
	if(NS)
		with(document) {
			open();
			write(FixPointSize("<layer name=dmbTBBack width=149 height=100% z-index=998 visibility=hidden></layer><layer name=dmbTB width=149 height=247 z-index=999 visibility=hidden><layer name=MC1001EH1001 left=0 top=0 width=149 height=30 z-index=1001 OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsNSHoverSel(0,this);\" OnMouseOut=\"if(lmcHS)hsNSHoverSel(1);\"\"></layer><layer name=MC1001N left=0 top=0 width=149 height=30 z-index=1000 bgColor=#EBEBEE visibility=show><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#000000><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Home</div></layer></layer></font></b></ilayer></layer><layer name=MC1001O left=0 top=0 width=149 height=30 z-index=1000 bgColor=#0000CC visibility=hidden><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#FFFFFF><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Home</div></layer></layer></font></b></ilayer></layer><layer name=MC1002EH1002 left=0 top=31 width=149 height=30 z-index=1001 OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsNSHoverSel(0,this);\" OnMouseOut=\"if(lmcHS)hsNSHoverSel(1);\"\"></layer><layer name=MC1002N left=0 top=31 width=149 height=30 z-index=1000 bgColor=#EBEBEE visibility=show><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#000000><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  About Us</div></layer></layer></font></b></ilayer></layer><layer name=MC1002O left=0 top=31 width=149 height=30 z-index=1000 bgColor=#0000CC visibility=hidden><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#FFFFFF><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  About Us</div></layer></layer></font></b></ilayer></layer><layer name=MC1003EH1003 left=0 top=62 width=149 height=30 z-index=1001 OnMouseOver=\"hsNSHoverSel(0,this);cFrame.ShowMenu(\'Software\',GetHSPos(3,6,217,216)[0],GetHSPos(3,6,217,216)[1],false);\" OnMouseOut=\"tHideAll();\"\"></layer><layer name=MC1003N left=0 top=62 width=149 height=30 z-index=1000 bgColor=#EBEBEE visibility=show><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#000000><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Software</div></layer></layer></font></b></ilayer></layer><layer name=MC1003O left=0 top=62 width=149 height=30 z-index=1000 bgColor=#0000CC visibility=hidden><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#FFFFFF><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Software</div></layer></layer></font></b></ilayer></layer><layer name=MC1004EH1004 left=0 top=93 width=149 height=30 z-index=1001 OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsNSHoverSel(0,this);\" OnMouseOut=\"if(lmcHS)hsNSHoverSel(1);\"\"></layer><layer name=MC1004N left=0 top=93 width=149 height=30 z-index=1000 bgColor=#EBEBEE visibility=show><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#000000><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Accounting Services</div></layer></layer></font></b></ilayer></layer><layer name=MC1004O left=0 top=93 width=149 height=30 z-index=1000 bgColor=#0000CC visibility=hidden><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#FFFFFF><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Accounting Services</div></layer></layer></font></b></ilayer></layer><layer name=MC1005EH1005 left=0 top=124 width=149 height=30 z-index=1001 OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsNSHoverSel(0,this);\" OnMouseOut=\"if(lmcHS)hsNSHoverSel(1);\"\"></layer><layer name=MC1005N left=0 top=124 width=149 height=30 z-index=1000 bgColor=#EBEBEE visibility=show><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#000000><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Client Access</div></layer></layer></font></b></ilayer></layer><layer name=MC1005O left=0 top=124 width=149 height=30 z-index=1000 bgColor=#0000CC visibility=hidden><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#FFFFFF><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Client Access</div></layer></layer></font></b></ilayer></layer><layer name=MC1006EH1006 left=0 top=155 width=149 height=30 z-index=1001 OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsNSHoverSel(0,this);\" OnMouseOut=\"if(lmcHS)hsNSHoverSel(1);\"\"></layer><layer name=MC1006N left=0 top=155 width=149 height=30 z-index=1000 bgColor=#EBEBEE visibility=show><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#000000><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Partners/Links</div></layer></layer></font></b></ilayer></layer><layer name=MC1006O left=0 top=155 width=149 height=30 z-index=1000 bgColor=#0000CC visibility=hidden><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#FFFFFF><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Partners/Links</div></layer></layer></font></b></ilayer></layer><layer name=MC1007EH1007 left=0 top=186 width=149 height=30 z-index=1001 OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsNSHoverSel(0,this);\" OnMouseOut=\"if(lmcHS)hsNSHoverSel(1);\"\"></layer><layer name=MC1007N left=0 top=186 width=149 height=30 z-index=1000 bgColor=#EBEBEE visibility=show><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#000000><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Contact Us</div></layer></layer></font></b></ilayer></layer><layer name=MC1007O left=0 top=186 width=149 height=30 z-index=1000 bgColor=#0000CC visibility=hidden><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#FFFFFF><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>  Contact Us</div></layer></layer></font></b></ilayer></layer><layer name=MC1008EH1008 left=0 top=217 width=149 height=30 z-index=1001 OnMouseOver=\"if(!HTHnd[nOM])cFrame.IsOverHS=true;hsNSHoverSel(0,this);\" OnMouseOut=\"if(lmcHS)hsNSHoverSel(1);\"\"></layer><layer name=MC1008N left=0 top=217 width=149 height=30 z-index=1000 bgColor=#EBEBEE visibility=show><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#000000><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>Request Information</div></layer></layer></font></b></ilayer></layer><layer name=MC1008O left=0 top=217 width=149 height=30 z-index=1000 bgColor=#0000CC visibility=hidden><ilayer left=4 top=6><b><font face=Tahoma point-size=9 color=#FFFFFF><layer left=2 top=0 width=137 height=18><layer top=2 width=137 left=0><div align=left>Request Information</div></layer></layer></font></b></ilayer></layer></layer>"));
			close();
		}


	hStyle[0]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: normal; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand;";
	hStyle[1]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: normal; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand;";
	hStyle[2]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: normal; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand;";
	hStyle[3]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: normal; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand;";
	hStyle[4]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: normal; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand;";
	hStyle[5]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: normal; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand;";
	hStyle[6]="border: 2px groove -2; font-family: Tahoma; font-size: 12px; font-weight: bold; font-style: normal; text-decoration: none; color: #FFFFFF; background-color: #0000CC; cursor: hand;";
	nTCode[1]="cFrame.execURL('/software/summary.htm', 'frames[top].frames[mainFrame]');";
	nTCode[2]="cFrame.execURL('/software/overview.htm', 'frames[top].frames[mainFrame]');";
	nTCode[3]="cFrame.execURL('/software/data_entry.htm', 'frames[top].frames[mainFrame]');";
	nTCode[4]="cFrame.execURL('/software/inquiry_feat.htm', 'frames[top].frames[mainFrame]');";
	nTCode[5]="cFrame.execURL('/software/tax_feat.htm', 'frames[top].frames[mainFrame]');";
	nTCode[6]="cFrame.execURL('/software/sched_feat.htm', 'frames[top].frames[mainFrame]');";
	nTCode[7]="cFrame.execURL('/software/requirements.htm', 'frames[top].frames[mainFrame]');";


	var dmbtbF;
	var dmbtbB;
	
	function SetupToolbar() {
		if(!MenusReady)  {
			window.setTimeout("SetupToolbar()", 10);
			return false;
		}
		with(cFrame.document) {
			if(IE)
				if(SM) {
					dmbtbF = getElementById("dmbTB");
					dmbtbB = getElementById("dmbTBBack");
				} else {
					dmbtbF = all["dmbTB"];
					dmbtbB = all["dmbTBBack"];
				}
			if(NS) {
				dmbtbF = layers["dmbTB"];
				dmbtbB = layers["dmbTBBack"];
			}
		}
		
		if(!dmbtbF) {
			window.setTimeout("SetupToolbar()", 10);
			return false;
		}
		
		if(IE) {
			dmbtbF = dmbtbF.style;
			dmbtbB = dmbtbB.style;
		} else {
			dmbtbB.width = dmbtbB.clip.width;
			dmbtbB.height = dmbtbB.clip.height;
		}
			
		var tbleft = 0; var tbBackleft = 0;
		var tbtop  = 0; var tbBacktop = 0;
		switch(tbAlignment) {
			case 0:
				break;
			case 1:
				tbleft = GetWidthHeight(cFrame)[0]/2-tbWidth/2;
				tbBackleft = tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]/2-parseInt(dmbtbB.width)/2);
				break;
			case 2:
				tbleft = GetWidthHeight(cFrame)[0]-tbWidth;
				tbBackleft = tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]-parseInt(dmbtbB.width));
				break;
			case 3:
				tbtop  = GetWidthHeight(cFrame)[1]/2-tbHeight/2;
				tbBacktop = tbStyle==0?(tbtop):(tbSpanning==0?GetWidthHeight(cFrame)[1]/2-parseInt(dmbtbB.height)/2:0);
				break;
			case 4:
				tbleft = GetWidthHeight(cFrame)[0]/2-tbWidth/2;
				tbtop  = GetWidthHeight(cFrame)[1]/2-tbHeight/2;
				tbBackleft = tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]/2-parseInt(dmbtbB.width)/2);
				tbBacktop = tbStyle==0?(tbtop):(tbSpanning==0?GetWidthHeight(cFrame)[1]/2-parseInt(dmbtbB.height)/2:0);
				break;
			case 5:
				tbleft = GetWidthHeight(cFrame)[0]-tbWidth;
				tbtop  = GetWidthHeight(cFrame)[1]/2-tbHeight/2;
				tbBackleft = tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]-parseInt(dmbtbB.width));
				tbBacktop = tbStyle==0?(tbtop):(tbSpanning==0?GetWidthHeight(cFrame)[1]/2-parseInt(dmbtbB.height)/2:0);
				break;
			case 6:
				tbtop  = GetWidthHeight(cFrame)[1]-tbHeight;
				tbBacktop = tbStyle==0?GetWidthHeight(cFrame)[1]-parseInt(dmbtbB.height):0;
				break;
			case 7:
				tbleft = GetWidthHeight(cFrame)[0]/2-tbWidth/2;
				tbtop  = GetWidthHeight(cFrame)[1]-tbHeight;
				tbBackleft = tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]/2-parseInt(dmbtbB.width)/2);
				tbBacktop = tbStyle==0?GetWidthHeight(cFrame)[1]-parseInt(dmbtbB.height):0;
				break;
			case 8:
				tbleft = GetWidthHeight(cFrame)[0]-tbWidth;
				tbtop  = GetWidthHeight(cFrame)[1]-tbHeight;
				tbBackleft = tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]-parseInt(dmbtbB.width));
				tbBacktop = tbStyle==0?GetWidthHeight(cFrame)[1]-parseInt(dmbtbB.height):0;
				break;
			case 9:
				tbleft = tbFPos[0];
				tbtop  = tbFPos[1];
				tbBackleft = tbleft;
				tbBacktop = tbtop;
				break;
		}
		dmbtbF.left = parseInt(tbleft) + (tbFollowHScroll?GetLeftTop(cFrame)[0]:0) + tbMargins[0] + (NS?"":"px");
		dmbtbF.top  = parseInt(tbtop)  + (tbFollowVScroll?GetLeftTop(cFrame)[1]:0) + tbMargins[1] + ((NS||OP)?"":"px");
		dmbtbB.left = parseInt(tbBackleft) + (tbFollowHScroll?GetLeftTop(cFrame)[0]:0) + tbMargins[0] + (NS?"":"px");
		dmbtbB.top  = parseInt(tbBacktop)  + (tbFollowVScroll?GetLeftTop(cFrame)[1]:0) + tbMargins[1] + ((NS||OP)?"":"px");
		if(tbSpanning==1) {
			if(tbStyle==0) dmbtbB.width = GetWidthHeight(cFrame)[0] + (NS?"":"px");
			if(tbStyle==1) dmbtbB.height = GetWidthHeight(cFrame)[1] + (NS?"":"px");
		}
		
		dmbtbF.visibility = "visible";
		dmbtbB.visibility = "visible";
		
		if(NS||SM) window.setTimeout("SetupToolbar()", 100);
		
		return true;
	}
	
	function GetHSPos(n, Alignment, mW, mH) {
		var acc = 0;
		var x = 0;
		var y = 0;
		for(var h=n-1;h>0;h--)
			if(tbStyle==0)
				acc += tbHS[h][0] + tbSpacing;
			else
				acc += tbHS[h][1] + tbSpacing;
		x = (IsFrames&&(tbStyle==1))?-(tbWidth-tbBorder):parseInt(dmbtbF.left) + tbBorder;
		y = (IsFrames&&(tbStyle==0))?-(tbHeight-tbBorder):parseInt(dmbtbF.top);
		if(tbStyle==0) {
			x += acc;
			switch(Alignment) {
				case 0:
					y += tbHeight - tbBorder;
					break;
				case 1:
					x -= (mW - tbHS[n][0]);
					y += tbHeight - tbBorder;
					break;
				case 2:
					y -= mH - tbBorder;
					break;
				case 3:
					x -= (mW - tbHS[n][0]);
					y -= mH - tbBorder;
					break;
				case 4:
					x -= mW;
					y += tbBorder;
					break;
				case 5:
					x -= mW;
					y += (tbHeight - mH) - tbBorder;
					break;
				case 6:
					x += tbHS[n][0];
					y += tbBorder;
					break;
				case 7:
					x += tbHS[n][0];
					y += (tbHeight - mH) - tbBorder;
					break;
			}
		} else {
			y += acc + tbBorder;
			switch(Alignment) {
				case 0:
					y += tbHS[n][1];
					break;
				case 1:
					x -= (mW - tbWidth) + 2*tbBorder;
					y += tbHS[n][1];
					break;
				case 2:
					y -= mH;
					break;
				case 3:
					x -= (mW - tbWidth) + 2*tbBorder;
					y -= mH;
					break;
				case 4:
					x -= mW;
					break;
				case 5:
					x -= mW;
					y += (tbHS[n][1] - mH);
					break;
				case 6:
					x += tbWidth - 2*tbBorder;
					break;
				case 7:
					x += tbWidth - 2*tbBorder;
					y += (tbHS[n][1] - mH);
					break;
			}
		}
		if(IsFrames) {
			x += GetLeftTop()[0];
			y += GetLeftTop()[1];
		}
		return [x,y];
	}
	
	function hsNSHoverSel(mode, mc, bcolor) {
		var mcN;
		
		if(mode==0) {
			if(lmcHS) hsNSHoverSel(1);
			mcN = mc.parentLayer.layers[mc.name.substr(0, mc.name.indexOf("EH")) + "N"];
			mcN.mcO = mc.parentLayer.layers[mc.name.substr(0, mc.name.indexOf("EH")) + "O"];
			if(mcN!=lmcHS) HideAll();
			if(nOM>1) if(mcN==OpenMenus[nOM-1].SelCommand) return false;
			while(!InMenu()&&nOM>1)	Hide();
			IsOverHS = true;
			mcN.mcO.visibility = "show";
			mcN.visibility = "hide";
			lmcHS = mcN;
		} else {
			mcN = lmcHS;
			mcN.visibility = "show";
			mcN.mcO.visibility = "hide";
			lmcHS = null;
		}
		return true;
	}
	
	function hsHoverSel(mode, imgLName, imgRName, e) {
		var mc;
		
		if(mode==0) {
			mc = GetCurCmd(e);
			if(!mc) return false;
			if(mc!=lmcHS) HideAll();
			if(lmcHS) hsHoverSel(1);
			IsOverHS = true;
			if(imgLName) imgLRsc = eval(imgLName+"On");
			if(imgRName) imgRRsc = eval(imgRName+"On");
			
			if(!mc.nStyle) {
				if(OP)
					mc.nStyle = GetOPStyle(mc);
				else
					mc.nStyle = SM?mc.getAttribute("style"):mc.style.cssText;
				mc.hStyle = GetCStyle(mc.style) + ((SM||KQ)?hshStyle[mc.id].replace("hand","pointer"):hshStyle[mc.id]);
			}
			
			lmcHS = mc;
			lmcHS.CommandPar = [imgLName,imgRName,mc.nStyle];
			if(!OP) {
				mc.b = mc.style.borderLeft;
				mc.hasBorder = mc.b.split(" ").length>1;
			}
			if(SM||KQ)
				if(OP)
					SetOPStyle(mc, mc.hStyle);
				else
					mc.setAttribute("style", mc.hStyle);
			else
				mc.style.cssText = mc.hStyle;
		} else {
			mc = lmcHS;
			imgLName = lmcHS.CommandPar[0];
			imgRName = lmcHS.CommandPar[1];
			mc.style.background = "";
			if(SM||KQ)
				if(OP)
					SetOPStyle(mc, mc.nStyle);
				else
					mc.setAttribute("style", GetCStyle(mc.style) + lmcHS.CommandPar[2]);
			else
				mc.style.cssText = GetCStyle(mc.style) + lmcHS.CommandPar[2];
			if(imgLName) imgLRsc = eval(imgLName+"Off");
			if(imgRName) imgRRsc = eval(imgRName+"Off");
			lmcHS = null;
		}
		
		if(imgLName) cFrame.document.images[imgLName].src = _fip(imgLRsc);
		if(imgRName) cFrame.document.images[imgRName].src = _fip(imgRRsc);
		
		if(!OP) FixHover(mc, mode);
		
		return true;
	}
	
	if(!NS) window.onresize = SetupToolbar;
	window.onscroll = SetupToolbar;
	SetupToolbar();

	function GetCurCmd(e) {
		//IE,SM,OP
		//This function will return the current command under the mouse pointer.
		//It will return null if the mouse is not over any command.
		//------------------------------
		//Version 1.5
		//
		if(SM)
			var cc = e;
		else {
			var cc = mFrame.window.event;
			if(!cc)
				cc = cFrame.window.event;
			cc = cc.srcElement;
		}
		while(cc.id=="") {
			cc = cc.parentElement;
			if(cc==null)
				break;
		}
		return cc;
	}

	function HoverSel(mode, imgLName, imgRName, e) {
		//IE,SM,OP
		//This is the function called every time the mouse pointer is moved over a command.
		//------------------------------
		//mode: 0 if the mouse is moving over the command and 1 if is moving away.
		//imgLName: Name of the left image object, if any.
		//imgRName: Name of the right image object, if any.
		//------------------------------
		//Version 16.2
		//
		var nStyle;
		var mc;
		
		if(mode==0 && OpenMenus[nOM].SelCommand!=null)
			HoverSel(1);
		
		if(mode==0) {
			mc = GetCurCmd(e);
			if(nOM>1) {
				if(mc==OpenMenus[nOM-1].SelCommand)
					return false;
				while(((BV>=5)?mc.parentNode.parentNode.id!=OpenMenus[nOM].mName:mc.parentElement.parentElement.id!=OpenMenus[nOM].mName))
						Hide();
			}
			if(imgLName) imgLRsc = eval(imgLName+"On");
			if(imgRName) imgRRsc = eval(imgRName+"On");
			if(OP)
				mc.opw = OpenMenus[nOM].width - 2*mc.style.left;
			else {
				mc.opw = mc.style.width;
				mc.b = mc.style.borderLeft;
				mc.hasBorder = mc.b.split(" ").length>1;
			}

			if(!mc.nStyle) {
				if(OP)
					mc.nStyle = GetOPStyle(mc);
				else
					mc.nStyle = SM?mc.getAttribute("style"):mc.style.cssText;
				mc.hStyle = GetCStyle(mc.style) + ((SM||KQ)?xrep(hStyle[mc.id],"hand","pointer"):hStyle[mc.id]);
			}
		
			OpenMenus[nOM].SelCommand = mc;
			OpenMenus[nOM].SelCommandPar = [imgLName,imgRName,mc.nStyle];
			
			if(SM||KQ) {
				IsOverHS = false;
				if(OP)
					SetOPStyle(mc, mc.hStyle);
				else
					mc.setAttribute("style", mc.hStyle);
			} else
				mc.style.cssText = mc.hStyle;
		} else {
			mc = (mode==1)?OpenMenus[nOM].SelCommand:OpenMenus[nOM].Opener;
			imgLName = (mode==1)?OpenMenus[nOM].SelCommandPar[0]:OpenMenus[nOM].OpenerPar[0];
			imgRName = (mode==1)?OpenMenus[nOM].SelCommandPar[1]:OpenMenus[nOM].OpenerPar[1];
			nStyle = (mode==1)?OpenMenus[nOM].SelCommandPar[2]:OpenMenus[nOM].OpenerPar[2];
			mc.style.background = "";
			if(IsMac) mc.style.border = "0px none";
			if(SM||KQ) {
				if(OP)
					SetOPStyle(mc, nStyle);
				else
					mc.setAttribute("style", nStyle);
			} else
				mc.style.cssText = ((BV<5)?GetCStyle(mc.style):"") + nStyle;
			if(imgLName) imgLRsc = eval(imgLName+"Off");
			if(imgRName) imgRRsc = eval(imgRName+"Off");
			OpenMenus[nOM].SelCommand = null;
		}
		
		if(imgLName) mFrame.document.images[imgLName].src = _fip(imgLRsc);
		if(imgRName) mFrame.document.images[imgRName].src = _fip(imgRRsc);
		
		if(!OP) FixHover(mc, mode);
		
		return true;
	}
	
	function FixHover(mc, mode) {
		//IE,SM
		//This function fixes the position of the commands' contents when using special highlighting effects.
		//------------------------------
		//Version 2.2
		//
		var hasBorder;
		var bw;
		if(mode==0) {
			if(BV>=5)
				s = mc.getElementsByTagName("SPAN")[0];
			else
				s = mc.document.all.tags("SPAN")[0];
			mc.s = s;
			mc.stop = s.style.top;
			mc.sleft = s.style.left;
			
			hasBorder = mc.style.borderLeft.split(" ").length>1;
			if(hasBorder != mc.hasBorder) {
				bw = (hasBorder?-GetBorderWidth(mc.style.borderLeft):GetBorderWidth(mc.b));
				s.style.left = parseInt(s.style.left) + bw + "px";
				s.style.top = parseInt(s.style.top) + bw + "px";
				if(SM)
					with(mc.style) {
						mc.cwidth = width;
						mc.cheight = height;
						width = parseInt(width) + 2*bw + "px";
						height = parseInt(height) + 2*bw + "px";
					}
			}			
		} else {
			mc.s.style.top = mc.stop;
			mc.s.style.left = mc.sleft;
			if(SM) {
				mc.style.width = mc.cwidth;
				mc.style.height = mc.cheight;
			}
		}
	}
	
	function NSHoverSel(mode, mc) {
		//NS
		//This is the function called every time the mouse pointer is moved over or away from a command.
		//------------------------------
		//mode: 0 if the mouse is moving over the command and 1 if is moving away.
		//------------------------------
		//Version 13.0
		//
		var mcN;
		
		ClearTimer(parseInt(HTHnd[nOM]));HTHnd[nOM] = 0;
		if(!nOM) return false;
		
		if(mode==0 && OpenMenus[nOM].SelCommand!=null)
			NSHoverSel(1);
		
		if(mode==0) {
			mcN = mc.parentLayer.layers[mc.name.substr(0, mc.name.indexOf("EH")) + "N"];
			mcN.mcO = mc.parentLayer.layers[mc.name.substr(0, mc.name.indexOf("EH")) + "O"];
			if(nOM>1) if(mc==OpenMenus[nOM-1].SelCommand) return false;
			while(!InMenu()&&nOM>1) Hide();
			OpenMenus[nOM].SelCommand = mcN;
			mcN.mcO.visibility = "show";
			mcN.visibility = "hide";
		} else {
			mcN = (mode==1)?OpenMenus[nOM].SelCommand:OpenMenus[nOM].Opener;
			mcN.visibility = "show";
			mcN.mcO.visibility = "hide";						
			OpenMenus[nOM].SelCommand = null;
		}
		return true;
	}

	function Hide() {
		//IE,NS,SM,OP
		//This function hides the last opened group and it keeps hiding all the groups until
		//no more groups are opened or the mouse is over one of them.
		//Also takes care of reseting any highlighted commands.
		//------------------------------
		//Version 4.6
		//
		ClearTimer(HTHnd[nOM]);HTHnd[nOM] = 0;
		ClearTimer(AnimHnd);AnimHnd = 0;
		ClearTimer(tmrHideHnd);
		
		if(nOM) {
			if(OpenMenus[nOM].SelCommand!=null) {
				if(IE) HoverSel(1);
				if(NS) NSHoverSel(1);
			}
			if(OpenMenus[nOM].Opener!=null) {
				if(IE) HoverSel(3);
				if(NS) NSHoverSel(3);
			}

			OpenMenus[nOM].visibility = "hidden";
			nOM--;

		}
		
		if(nOM==0) {
			if(tbUseToolbar && lmcHS) {
				if(IE) hsHoverSel(1);
				if(NS) hsNSHoverSel(1);
			}
			FormsTweak("visible");
			status = "";
		} else
			if(!InMenu()) HTHnd[nOM] = window.setTimeout("Hide()", TimerHideDelay/20);
	}
	
	function ShowMenu(mName, x, y, isCascading, hsImgName, algn) {
		//IE,NS,SM,OP
		//This function controls the way menus and submenus are displayed.
		//It also applies a delay to display submenus.
		//------------------------------
		//Version 1.0
		//
		ClearTimer(smHnd);smHnd = 0;
		if(isCascading) {
			lsc = OpenMenus[nOM].SelCommand;
			smHnd = window.setTimeout("if(nOM)if(lsc==OpenMenus[nOM].SelCommand)ShowMenu2('" + mName + "',0,0,true,''," + algn + ")", SubMenusDelay);
		} else
			ShowMenu2(mName, x, y, false, hsImgName, algn);
	}

	function ShowMenu2(mName, x, y, isCascading, hsImgName, algn) {
		//IE,NS,SM,OP
		//This is the main function to show the menus when a hotspot is triggered or a cascading command is activated.
		//------------------------------
		//mName: Name of the <div> or <layer> to be shown.
		//x: Left position of the menu.
		//y: Top position of the menu.
		//isCascading: True if the menu has been triggered from a command.
		//hsImgName: Image to which the menu is attached to.
		//algn: Alignment setting for the menu.
		//------------------------------
		//Version 20.0
		//
		var xy;
		ClearTimer(parseInt(HTHnd[nOM]));HTHnd[nOM] = 0;
		x = parseInt(x);y = parseInt(y);
		
		if(IE)
			if(BV>=5)
				var Menu = mFrame.document.getElementById(mName);
			else
				var Menu = mFrame.document.all[mName];
		if(NS)
			var Menu = mFrame.document.layers[mName];
		if(!Menu)
			return false;		
		if(IE) {
			Menu = Menu.style;
			if(BV>=5)
				Menu.frmt = mFrame.document.getElementById(mName+"frmt").style;
			else
				Menu.frmt = mFrame.document.all[mName+"frmt"].style;
		}
		
		if(nOM>0)
			if(OpenMenus[1].mName == mName && !isCascading) {
				IsOverHS = true;
				return false;
			}
		if(Menu==OpenMenus[nOM]) return false;
			
		if(AnimHnd && nOM>0) {
			AnimStep=100;
			Animate();
		}
			
		if(!isCascading) {
			var oldlmcHS = lmcHS;
			lmcHS = null;
			HideAll();
			lmcHS = oldlmcHS;
		}
		
		Menu.mName = mName;
		Menu.Opener = nOM>0?OpenMenus[nOM].SelCommand:null;
		Menu.OpenerPar = nOM>0?OpenMenus[nOM].SelCommandPar:null;
		Menu.SelCommand = null;
		if(OP) {
			Menu.width = Menu.pixelWidth;
			Menu.height = Menu.pixelHeight;
		}
		
		if(!isCascading) {
			if(hsImgName) {
				var imgObj = NS?FindImage(cFrame.document, hsImgName.split("|")[0]):cFrame.document.images[hsImgName.split("|")[0]];
				if(imgObj) {
					var tbMode = hsImgName.split("|")[1];
					if(tbMode&2) x = AutoPos(Menu, imgObj, algn)[0] + (IsFrames?GetLeftTop()[0]:0);
					if(tbMode&1) y = AutoPos(Menu, imgObj, algn)[1] + (IsFrames?GetLeftTop()[1]:0);
					if(IsMac&&IE&&!SM&&(BV>=5)) {
						x += parseInt(mFrame.document.body.leftMargin);
						y += parseInt(mFrame.document.body.topMargin);
					}
				}
			}

		}
		
		var pW = GetWidthHeight()[0] + GetLeftTop()[0];
		var pH = GetWidthHeight()[1] + GetLeftTop()[1];
		
		if(IE) {
			if(SM) Menu.display = "none";
			if(isCascading) {
				xy = GetSubMenuPos(Menu, algn);
				x = xy[0];y = xy[1];

			}
			Menu.left = ((x+parseInt(Menu.width)>pW)?(isCascading?parseInt(OpenMenus[nOM].left):pW) - parseInt(Menu.width):x) + "px";
			Menu.top =  ((y+parseInt(Menu.height)>pH)?pH - parseInt(Menu.height):y) + (OP?"":"px");
			if(IsWin&&!SM)
				Menu.clip = "rect(0 0 0 0)";
		}
		if(NS) {
			if(isCascading) {
				xy = GetSubMenuPos(Menu, algn);
				x = xy[0];y = xy[1];

			}
			Menu.clip.width = 0;
			Menu.clip.height = 0;

			Menu.moveToAbsolute((x+Menu.w>pW)?(isCascading?OpenMenus[nOM].left:pW) - Menu.w:x,(y+Menu.h>pH)?pH - Menu.h:y);
		}
		if(isCascading)
			Menu.zIndex = parseInt(OpenMenus[nOM].zIndex) + 1;
		OpenMenus[++nOM] = Menu;
		if(SM&&!OP) FixCommands(mName);
		if(SM) Menu.display = "inline";
		Menu.visibility = "visible";
		HTHnd[nOM] = 0;
		if((IE&&IsWin&&!SM)||(NS&&Menu.clip.width==0))
			AnimHnd = window.setTimeout("Animate()", 10);
		FormsTweak("hidden");
		
		if(!isCascading&&!IsContext)
			IsOverHS = true;
		IsContext = false;
		ClearTimer(tmrHideHnd);
		tmrHideHnd = window.setTimeout("AutoHide()", TimerHideDelay);
		
		return true;
	}
	
	function GetSubMenuPos(mg, a) {
		//IE,NS,SM,OP
		//This function calculates the position of a submenu based on its alignment.
		//------------------------------
		//Version 1.0
		//
		var x;
		var y;
		var pg = OpenMenus[nOM];
		var sc = pg.SelCommand;
		
		if(NS) {
			pg.width = pg.w;
			pg.height = pg.h;
			mg.width = mg.w;
			mg.height = mg.h;
			sc.width = sc.clip.width;
			sc.height = sc.clip.height;
		} else
			sc = sc.style;
		
		var lp = parseInt(pg.left) + parseInt(sc.left);
		var tp = parseInt(pg.top) + parseInt(sc.top);

		switch(a) {
			case 0:
				x = lp;
				y = tp + parseInt(sc.height);
				break;
			case 1:
				x = lp + parseInt(sc.width) - parseInt(mg.width);
				y = tp + parseInt(sc.height);
				break;
			case 2:
				x = lp;
				y = tp - parseInt(mg.height);
				break;
			case 3:
				x = lp + parseInt(sc.width) - parseInt(mg.width);
				y = tp - parseInt(mg.height);
				break;
			case 4:
				x = lp - parseInt(mg.width);
				y = tp;
				break;
			case 5:
				x = lp - parseInt(mg.width);
				y = tp + parseInt(sc.height) - parseInt(mg.height);
				break;
			case 6:
				x = lp + parseInt(sc.width);
				y = tp;
				break;
			case 7:
				x = lp + parseInt(sc.width);
				y = tp + parseInt(sc.height) - parseInt(mg.height);
				break;
		}
		return [x,y];		
	}
	
	function FixCommands(mName) {
		//SM
		//This function is used to fix the way the Gecko engine calculates
		//the borders and the way they affect the size of divs
		//------------------------------
		//Version 1.8
		//
		var m = mFrame.document.getElementById(mName);
		if(!m.Fixed) {
			var sd = m.getElementsByTagName("DIV");
			with(sd[0].style) {
				var b = GetBorderWidth(borderLeft);
				width = parseInt(width) - 2*b + "px";
				height = parseInt(height) - 2*b + "px";
			}
			for(i=1;i<(sd.length);i++)
				with(sd[i].style) {
					if(borderLeft.indexOf("none")==-1) {
						width = parseInt(width) - 2*GetBorderWidth(borderLeft) + "px";
						height = parseInt(height) - 2*GetBorderWidth(borderTop) + "px";
					}
				}
				
		}
		m.Fixed = true;
	}

	function Animate() {
		//IE,NS,SM,OP
		//This function is called by ShowMenu every time a new group must be displayed and produces the predefined unfolding effect.
		//Currently is disabled for Navigator, because of some weird bugs we found with the clip property of the layers.
		//------------------------------
		//Version 1.9
		//
		var r = '';
		var nw = nh = 0;
		if(AnimStep+AnimSpeed>100) AnimStep = 100;
		switch(fx) {
			case 1:
				if(IE) r = "0 " + AnimStep + "% " + AnimStep + "% 0";
				if(NS) nw = AnimStep; nh = AnimStep;
				break;
			case 2:
				if(IE) r = "0 100% " + AnimStep + "% 0";
				if(NS) nw = 100; nh = AnimStep;
				break;
			case 3:
				if(IE) r = "0 " + AnimStep + "% 100% 0";
				if(NS) nw = AnimStep; nh = 100;
				break;
			case 0:
				if(IE) r = "0 100% 100% 0";
				if(NS) nw = 100; nh = 100;
				break;
		}
		if(OpenMenus[nOM]) {
			with(OpenMenus[nOM]) {
				if(IE)
					clip =  "rect(" + r + ")";
				if(NS) {
					clip.width = w*(nw/100);
					clip.height = h*(nh/100);
				}
			}
			AnimStep += AnimSpeed;
			if(AnimStep<=100)
				AnimHnd = window.setTimeout("Animate()",25);
			else {
				ClearTimer(AnimHnd);
				AnimStep = 0;
				AnimHnd = 0;
			}
		}
	}
	
	function InTBHotSpot() {
		//IE,NS,SM,OP
		//This function returns true if the mouse pointer is over a toolbar item.
		//------------------------------
		//Version 1.0
		//
		if(!tbUseToolbar) return false;
		var m = lmcHS;
		if(!m) return false;
		var l = parseInt(m.left);
		var r = l+(IE?parseInt(m.width):m.clip.width);
		var t = parseInt(m.top);
		var b = t+(IE?parseInt(m.height):m.clip.height);
		return ((mX>=l && mX<=r) && (mY>=t && mY<=b)) || IsOverHS || (nOM>0);
	}
	
	function InMenu() {
		//IE,NS,SM,OP
		//This function returns true if the mouse pointer is over the last opened menu.
		//------------------------------
		//Version 2.1
		//
		var m = OpenMenus[nOM];
		if(!m) return false;
		var l = parseInt(m.left);
		var r = l+(IE?parseInt(m.width):m.clip.width);
		var t = parseInt(m.top);
		var b = t+(IE?parseInt(m.height):m.clip.height);
		return ((mX>=l && mX<=r) && (mY>=t && mY<=b)) || IsOverHS;
	}

	function SetPointerPos(e) {
		//IE,NS,SM,OP
		//This function sets the mX and mY variables with the current position of the mouse pointer.
		//------------------------------
		//e: Only used under Navigator, corresponds to the Event object.
		//------------------------------
		//Version 1.6
		//
		if(IE) {
			if(!SM) {
				if(mFrame!=cFrame||event==null)
					if(mFrame.window.event==null)
						return;
					else
						e = mFrame.window.event;
				else
					e = event;
			}
			mX = e.clientX + GetLeftTop()[0];
			mY = e.clientY + GetLeftTop()[1];
		}
		if(NS) {
			mX = e.pageX;
			mY = e.pageY;
		}
	}
	
	function HideMenus(e) {
		//IE,NS,SM,OP
		//This function checks if the mouse pointer is on a valid position and if the current menu should be kept visible.
		//The function is called every time the mouse pointer is moved over the document area.
		//------------------------------
		//e: Only used under Navigator, corresponds to the Event object.
		//------------------------------
		//Version 25.1
		//
		if(nOM>0) {
			SetPointerPos(e);
			if(OpenMenus[nOM].SelCommand!=null)
				if(!InMenu()&&!HTHnd[nOM])
					HTHnd[nOM] = window.setTimeout("if(nOM>0)if(!InMenu())Hide()", TimerHideDelay);
		}
	}
	
	function FormsTweak(state) {
		//IE,SM,OP
		//This is an undocumented function, which can be used to hide every listbox (or combo) element on a page.
		//This can be useful if the menus will be displayed over an area where is a combo box, which is an element that cannot be placed behind the menus and it will always appear over the menus resulting in a very undesirable effect.
		//------------------------------
		//Version 2.2
		//
		var fe;
		if(DoFormsTweak && IE)
			for(var f = 0; f <= (mFrame.document.forms.length - 1); f++)
				for(var e = 0; e <= (mFrame.document.forms[f].elements.length - 1); e++) {
					fe = mFrame.document.forms[f].elements[e];
					if(fe.type) if(fe.type.indexOf("select")==0) fe.style.visibility = state;
				}
	}

	function execURL(url, tframe) {
		//IE,NS,SM,OP
		//This function is called every time a command is triggered to jump to another page or execute some javascript code.
		//------------------------------
		//url: Encrypted URL that must be opened or executed.
		//tframe: If the url is a document location, tframe is the target frame where this document will be opened.
		//------------------------------
		//Version 1.2
		//
		HideAll();
		window.setTimeout("execURL2('" + escape(_purl(url)) + "', '" + tframe + "')", 100);
	}

	function execURL2(url, tframe) {
		//IE,NS,SM,OP
		//This function is called every time a command is triggered to jump to another page or execute some javascript code.
		//------------------------------
		//url: Encrypted URL that must be opened or executed.
		//tframe: If the url is a document location, tframe is the target frame where this document will be opened.
		//------------------------------
		//Version 1.6
		//
		var fObj = (tframe=="_blank"?window.open(""):(tframe=="_parent"?mFrame.parent:eval(rStr(tframe))));
		url = rStr(unescape(url));
		url.indexOf("javascript:")!=url.indexOf("vbscript:")?eval(url):fObj.location.href = url;
	}

	function rStr(s) {
		//IE,NS,SM,OP
		//This function is used to decrypt the URL parameter from the triggered command.
		//------------------------------
		//Version 1.2
		//
		s = xrep(s,"%1E", "'");
		s = xrep(s,"\x1E", "'");
		if(OP&&s.indexOf("frames[")!=-1) {
			s = xrep(s,String.fromCharCode(s.charCodeAt(7)), "'");
		}
		return xrep(s,"\x1D", "\x22");
	}

	function hNSCClick(e) {
		//NS
		//This function executes the selected command's trigger code.
		//------------------------------
		//Version 1.0
		//
		eval(this.TCode);
	}
	
	function HideAll() {
		//IE,NS,SM,OP
		//This function will hide all the currently opened menus.
		//------------------------------
		//Version 1.1
		//
		if(nOM)
			while(nOM>0) Hide();
		else Hide();
	}

	function GetLeftTop(f) {
		//IE,NS,SM,OP
		//This function returns the scroll bars position on the menus frame.
		//------------------------------
		//Version 2.2
		//
		if(!f) f = mFrame;
		if(IE)
			if(SM)
				return [OP?0:f.scrollX,OP?0:f.scrollY];
			else
				if(f.document.body)
					return [f.document.body.scrollLeft,f.document.body.scrollTop];
				else
					return [0, 0];
		if(NS)
			return [f.pageXOffset,f.pageYOffset];
	}
	
	function tHideAll() {
		//IE,NS,SM,OP
		//This function is called when the mouse is moved away from a hotspot to close any opened menu.
		//------------------------------
		//Version 1.2
		//
		IsOverHS = false;
		HTHnd[nOM] = window.setTimeout("if(!InMenu()&&!InTBHotSpot())HideAll(); else HTHnd[nOM]=0;", TimerHideDelay);
	}

	function GetWidthHeight(f) {
		//IE,NS,SM,OP
		//This function returns the width and height of the menus frame.
		//------------------------------
		//Version 2.1
		//
		if(!f) f = mFrame;
		if(IE&&!SM)
			return [f.document.body.clientWidth,f.document.body.clientHeight];
		if(NS||SM)
			return [f.innerWidth,f.innerHeight];
	}
	
	function GetBorderWidth(b) {
		//IE,SM,SM,OP
		//This functions returns the width of a border
		//------------------------------
		//Version 1.1
		//
		if(OP) return 0;
		var w;
		var l = b.split(" ");
		for(var i=0; i<l.length; i++) {
			w = parseInt(l[i]);
			if(w>0)
				return w;
		}
		return 0;
	}
	
	function GetCStyle(cmc) {
		//IE,SM,OP
		//This function completes the style of command with all the common
		//parameters from the original style code.
		//------------------------------
		//Version 1.0
		//
		return "position: absolute; left:" + cmc.left + 
			   "; top: " + cmc.top + 
			   "; width: " + (OP?cmc.pixelWidth:cmc.width) + 
			   "; height: " + (OP?cmc.pixelHeight:cmc.height) + "; ";
	}
	
	function AutoPos(Menu, imgObj, arAlignment) {
		//IE,NS,SM,OP
		//This function finds the image-based hotspot and returns the position at which 
		//the menu should be displayed based on the alignment setting.
		//------------------------------
		//Version 1.1
		//
		var x = GetImgXY(imgObj)[0];
		var y = GetImgXY(imgObj)[1];
		var mW = parseInt(NS?Menu.w:Menu.width);
		var mH = parseInt(NS?Menu.h:Menu.height);
			
		switch(arAlignment) {
			case 0:
				y += GetImgWH(imgObj)[1];
				break;
			case 1:
				x += GetImgWH(imgObj)[0] - mW;
				y += GetImgWH(imgObj)[1];
				break;
			case 2:
				y -= mH;
				break;
			case 3:
				x += GetImgWH(imgObj)[0] - mW;
				y -= mH;
				break;
			case 4:
				x -= mW;
				break;
			case 5:
				x -= mW;
				y -= mH - GetImgWH(imgObj)[1];
				break;
			case 6:
				x += GetImgWH(imgObj)[0];
				break;
			case 7:
				x += GetImgWH(imgObj)[0];
				y -= mH - GetImgWH(imgObj)[1];
				break;
		}
		
		return [x, y];
	}

	function GetImgXY(imgObj) {
		//IE,NS,SM,OP
		//This function returns the x,y coordinates of an image.
		//------------------------------
		//Version 1.2
		//
		var x;
		var y;
			
		if(IE)	{
			x = getOffset(imgObj)[0];
			y = getOffset(imgObj)[1];
		} else	{
			y = GetImgOffset(cFrame, imgObj.name, 0, 0);
			x = imgObj.x + y[0];
			y = imgObj.y + y[1];
		}
			
		return [x, y];
		
	}

	function GetImgWH(imgObj) {
		//IE,NS,SM,OP
		//This function returns the width and height of an image.
		//------------------------------
		//Version 1.1
		//
		return [parseInt(imgObj.width), parseInt(imgObj.height)];
	}

	function getOffset(imgObj) {
		//IE,NS,SM,OP
		//This function returns the horizontal and vertical offset of an object.
		//------------------------------
		//Version 1.0
		//
		x = imgObj.offsetLeft;
		y = imgObj.offsetTop;
		ce =imgObj.offsetParent;
		while (ce!=null)	{
			y += ce.offsetTop;
			x += ce.offsetLeft;
			ce = ce.offsetParent;
		}
		return [x,y];
		
	}
	
	function FindImage(d, img) {
		//NS
		//This function finds an image regardless of its location in the document structure.
		//------------------------------
		//Version 1.0
		//
		var i;
		var tmp;
		
		if(d.images[img]) return d.images[img];
		
		for(i=0; i<d.layers.length; i++) {
			tmp = FindImage(d.layers[i].document, img);
			if(tmp) return tmp;
		}
		
		return null;
	}

	function GetImgOffset(d, img, ox, oy) {
		//NS
		//This function finds the offset to an image regardless of its location in the document structure.
		//------------------------------
		//Version 1.0
		//
		var i;
		var tmp;
		
		if(d.left) {
			ox += d.left;
			oy += d.top;
		}
				
		if(d.document.images[img]) return [ox, oy];
		
		for(i=0; i<d.document.layers.length; i++) {
			tmp = GetImgOffset(d.document.layers[i], img, ox, oy);
			if(tmp) return [tmp[0], tmp[1]];
		}
		
		return null;
	}
	
	function AutoHide() {
		//IE,NS,SM,OP
		//This function hides the menus, even when a submenu is open and no
		//command has been selected.
		//------------------------------
		//Version 1.1
		//
		var original_nOM = nOM;
		var OktoClose = true;
		for(;nOM>0;nOM--)
			if(InMenu()) {
				OktoClose = false;
				break;
			}
		nOM = original_nOM;
		if(OktoClose&&!IsOverHS)
			Hide();
		
		if(nOM) if(!InMenu()) tmrHideHnd = window.setTimeout("AutoHide()", TimerHideDelay);
	}
	
	function ShowContextMenu(e) {
		//IE,NS,SM,OP
		//This function is called when a user rightclicks on the document and it will show a predefined menu.
		//------------------------------
		//Version 1.2
		//
		if(cntxMenu!='') {
			if(IE) {
				SetPointerPos(e);
				IsContext = true;
				cFrame.ShowMenu(cntxMenu, mX-1, mY-1, false);
				return false;
			}
			
			if(NS)
				if(e.which==3) {
					IsContext = true;
					cFrame.ShowMenu(cntxMenu, e.x-1, e.y-1, false);
					return false;
				}
		}		
		return true;
	}

	function SetUpEvents() {
		//IE,NS,SM,OP
		//This function initializes the frame variables and setups the event handling.
		//------------------------------
		//Version 2.5
		//
		if(!SM) onerror = errHandler;
		if(!mFrame) mFrame = cFrame;
		if(typeof(mFrame)=="undefined")
			window.setTimeout("SetUpEvents()",10);
		else {
			if(NS) {
				mFrame.captureEvents(Event.MOUSEMOVE);
				mFrame.onmousemove = HideMenus;
				if(cntxMenu!="") {
					mFrame.window.captureEvents(Event.MOUSEDOWN);
					mFrame.window.onmousedown = ShowContextMenu;
				}
				nsOW = GetWidthHeight()[0];
				nsOH = GetWidthHeight()[1];
				window.onresize = rHnd;
				PrepareEvents();
			}
			if(IE) {
				document.onmousemove = HideMenus;
				mFrame.document.onmousemove = document.onmousemove;
				mFrame.document.oncontextmenu = ShowContextMenu;
				if(SM&&!OP) {
					var i = 0;
					var m;
					while(mFrame.document.getElementById(i)) {
						m = mFrame.document.getElementById(i++);
						m.style.width = parseInt(m.style.width) - 2*parseInt(m.style.paddingLeft) + "px";
						m.style.height = parseInt(m.style.height) - 2*parseInt(m.style.paddingTop) + "px";
					}
				}
			}
			IsFrames = (cFrame!=mFrame);
			MenusReady = true;
			if(IE) FixImages();
		}
		


	}
	
	function errHandler(sMsg,sUrl,sLine) {
		//IE,NS
		//This function will trap any errors generated by the scripts and filter the unhandled ones.
		//------------------------------
		//Version 1.1
		//
		if(sMsg.substr(0,16)!="Access is denied"&&sMsg!="Permission denied")
			alert("Java Script Error\n" +
			      "\nDescription: " + sMsg +
			      "\nSource: " + sUrl +
			      "\nLine: "+sLine);
		return true;
	}
	
	function FixPointSize(s) {
		//NS
		//This function increases the point-size value for Navigator 4.
		//------------------------------
		//Version 2.0
		//
		if(IsWin||!NS) return s;
		for(var i=54; i>1; i--)
			if(s.indexOf("point-size=" + i)!=-1)
				s = xrep(s, "point-size=" + i, "point-size=" + (i+3));
		return s;
	}
	
	function ClearTimer(t) {
		//IE,NS,SM,OP
		//This is a helper function used to overcome a bug in very
		//old versions of Navigator 4
		//------------------------------
		//Version 1.0
		//
		if(t) window.clearTimeout(t);
	}
	
	function xrep(s, f, n) {
		//IE,NS,SM,OP
		//This function looks for any occurrence of the f string and replaces it with the n string.
		//------------------------------
		//Version 1.1
		//
		if((s.length>100)&&SM)
			while(s.indexOf(f)!=-1)
				s = s.substr(0, s.indexOf(f)) + n + s.substr(s.indexOf(f) + f.length);
		else
			s = s.split(f).join(n);
		return s;
	}
	
	function rHnd() {
		//NS
		//This function is used to reload the page when Navigator window is resized.
		//Original Code from DHTML Lab
		//------------------------------
		//Version 1.0
		//
		if((GetWidthHeight()[0]!=nsOW) || (GetWidthHeight()[1]!=nsOH))
			frames["top"].location.reload();
	}

	function PrepareEvents() {
		//NS
		//This function is called right after the menus are rendered.
		//It has been designed to attach the event handlers to the <layer> tag and
		//fix the font size problems with Navigator under the Mac and Linux.
		//------------------------------
		//Version 4.1
		//
		for(var l=0; l<mFrame.document.layers.length; l++) {
			var lo = mFrame.document.layers[l];
			if(lo.layers.length) {
				lo.w = lo.clip.width;
				lo.h = lo.clip.height;
				for(var sx=0; sx<lo.layers.length; sx++)
					for(var sl=0; sl<lo.layers[sx].layers.length; sl++) {
						var slo = mFrame.document.layers[l].layers[sx].layers[sl];
						if(slo.name.indexOf("EH")>0) {
							slo.document.onmouseup = hNSCClick;
							slo.document.TCode = nTCode[slo.name.split("EH")[1]];
						}
					}
				for(var sl=0; sl<cFrame.document.layers['dmbTB'].layers.length; sl++) {
					slo = cFrame.document.layers['dmbTB'].layers[sl];
					if(slo.name.indexOf('EH')>0) {
						slo.document.onmouseup = hNSCClick;
						slo.document.TCode = nTCode[slo.name.split('EH')[1]];
					}
				}

			}
		}
	}

function FixImages(){;}function _purl(u){return u;}function _fip(img){return img.src;}
SetUpEvents();



