if (document.all)    {n=0;ie=1;ns6=0;fShow="visible";fHide="hidden";}
if (document.getElementById&&!document.all)    {n=0;ie=0;ns6=1;fShow="visible";fHide="hidden";}
if (document.layers) {n=1;ie=0;ns6=0;fShow="show";fHide="hide";}

var isMac = navigator.appVersion.indexOf("Mac")>-1

var vnum=0;
var vminornum=0;
if (ie) {
//4.0(compatable;MSIE 5.01;Windows NT 5.0)
	var vnum=navigator.appVersion.substring(22,23);
	var vminornum=navigator.appMinorVersion.substring(0,1);
	if (isNaN(vnum)) { vnum=4; }
	if (isNaN(vminornum)) { vminornum=1; }
}

opr6=ie&&navigator.userAgent.indexOf("Opera")!=-1

window.onerror=new Function("return true")

var lastMenu=null
var lastMenuID=-99
var lastMenuIDArray=new Array()
var lastMenuXArray=new Array()
var lastMenuYArray=new Array()

var keepstatic=1 //specify whether menu should stay static 0=non static (works only in IE4+)
var menubarcolor="#999999" //specify menu color
var menucolor="#041C43" //specify menu color
var menuitemclass="mainNavLink"	// specify menu item CSS style
var menusubitemclass="subNavLink"	// specify menu subitem CSS style
// warning, submenuwidth must be >= the max width of any of the menu headings!
var menubarheight=15 //specify menu bar height
var submenuwidth=152 //specify sub menus' width
var submenuAOLeft=-30
var submenuAOTop=124 
var menuWidth=650
var contentWidth=650
var isGraphicalToolbar=1

//alert('vnum,vminornum='+vnum+','+vminornum);
//alert('vnum,vminornum='+navigator.appVersion+','+navigator.appMinorVersion);

var nudgeLeft;
var nudgeTop;
if (ie) {
	nudgeLeft=submenuAOLeft+31;
	nudgeTop=submenuAOTop+20; //adjust menu position from top HERE
	if (isMac) {
		nudgeLeft=submenuAOLeft+29;
		nudgeTop=submenuAOTop+19;
	}
}

if (n) {
	nudgeLeft=submenuAOLeft+160;
	if (window.innerWidth > contentWidth) {
		nudgeLeft=submenuAOLeft-175;
		nudgeLeft+=(window.innerWidth/2);
	}
	if (isMac) {
		nudgeLeft=submenuAOLeft+160;
		if (window.innerWidth > contentWidth) {
			nudgeLeft=submenuAOLeft-179;			// full size, 183; content size, 179
			nudgeLeft+=(window.innerWidth/2);
		}
	}
	nudgeTop=submenuAOTop+10;
	if (isMac) {
		nudgeTop=submenuAOTop+8;
	}
//window.innerWidth
//window.innerHeight

}

if (ns6) {
nudgeLeft=submenuAOLeft+30;
nudgeTop=submenuAOTop+19;
}

var shimvalue="/rrcassoc/bfc/images/shim.gif";

var vshimstr2 = "</td><td><img src=\""+shimvalue+"\" width=\"1\" height=\""+menubarheight+"\" alt=\"\" border=\"0\">";
var vshimstr = "</td><td class=gridLineNavInner><img src=\""+shimvalue+"\" width=\"1\" height=\""+menubarheight+"\" alt=\"\" border=\"0\">";

if (isGraphicalToolbar) {
	vshimstr2 = "";
	vshimstr = "";
}

var navBorder="";
if (n) {
	navBorder="<tr><td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td></tr>";
} else {
	navBorder="<tr><td colspan=\"17\" class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td></tr>";
}
if (isGraphicalToolbar)
	navBorder="";

var navTrailer="";
//if (n) {
//	navTrailer="\
//	<td colspan=\"2\" align=\"right\" class=\"txtInfoBanner\">telephone: (510) 548-3422<br>box office: (510) 548-9666<br>";
//} else {
//	navTrailer="\
//	<td align=\"right\" class=\"txtInfoBanner\">telephone: (510) 548-3422<br>box office: (510) 548-9666<br>";
//}

var tableHolderShims="";

if (n)

if (isGraphicalToolbar)
	tableHolderShims="";
else
	tableHolderShims="\
<tr>\
	<td><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>\
</tr>";

else {

if (isGraphicalToolbar)
	tableHolderShims="";
else
	tableHolderShims="\
<tr>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"118\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"33\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"64\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"58\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"63\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"105\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"118\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"50\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>\
    <td class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"41\" height=\"1\" alt=\"\" border=\"0\"></td>\
</tr>";

}

var menuItemDivider="<tr><td colspan=\"2\" class=\"gridLineNavInner\"><img src=\""+shimvalue+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td></tr>";

////////////////////////////////////////////////////////////////////////////
// Function Menu()                                                        //
////////////////////////////////////////////////////////////////////////////
rightX = 0;
function Menu()
{
	this.barBGColor     = menubarcolor;
	this.bgColor     = menucolor;
	if (ie) this.menuFont = "bold 10px Arial";
	if (n)  this.menuFont = "bold 10px Verdana";
	this.fontColor   = "black";

	this.addItem    = addItem;
	this.addGraphicalItem    = addGraphicalItem;
	this.addSubItem = addSubItem;
	this.showMenu   = showMenu;
	this.mainPaneBorder = 0;
	this.subMenuPaneBorder = 0;
	this.mainWidth = menuWidth;
	this.subMenuPaneWidth = submenuwidth;

	lastMenu = null;
	lastMenuID=0;

	rightY = 0;
	leftY = 0;
	leftX = 0;

	HTMLstr = "";
	HTMLstr += "<!-- MENU PANE DECLARATION BEGINS -->";
	HTMLstr += "\n";
	if (!isGraphicalToolbar)
		if (ie||ns6) HTMLstr += "<div id='MainTable' style='top:0'>\n";
//	if (n)  HTMLstr += "<layer name='MainTable'>\n";
	HTMLstr += "<table cellspacing=\"0\" cellpadding=\"0\" width='"+this.mainWidth+"' border='"+this.mainPaneBorder+"'>\n";
	HTMLstr += navBorder;
	HTMLstr += "<tr>";
	if (n) 
		if (!isGraphicalToolbar)
			HTMLstr += "<td>&nbsp;";
		else
			HTMLstr += "<td width=\""+menuWidth+"\">";
	HTMLstr += "<!-- MAIN MENU STARTS -->";
	HTMLstr += "<!-- MAIN_MENU -->";
	HTMLstr += "<!-- MAIN MENU ENDS -->";
	if (!n) HTMLstr += navTrailer;
	if (n) HTMLstr += "</td>";
	if (n) { HTMLstr += navTrailer; if (navTrailer != "") HTMLstr += "</td>"; }
	HTMLstr += "</tr>\n";

	//HTMLstr += navBorder;
	HTMLstr += tableHolderShims;
	HTMLstr += "</table>\n";
	HTMLstr += "\n";
	HTMLstr += "<!-- SUB MENU STARTS -->";
	HTMLstr += "<!-- SUB_MENU -->";
	HTMLstr += "<!-- SUB MENU ENDS -->";
	HTMLstr += "\n";
	if (!isGraphicalToolbar)
		if (ie||ns6) HTMLstr+= "</div>\n";
//	if (n)  HTMLstr+= "</layer>\n";
	HTMLstr += "<!-- MENU PANE DECALARATION ENDS -->";
}

function addItem(idItem, text, hint, location, altLocation, addDivider, offset)
{
	var Lookup = "<!-- ITEM "+idItem+" -->";
	if (HTMLstr.indexOf(Lookup) != -1)
	{
		alert(idParent + " already exist");
		return;
	}
	var MENUitem = "";
	MENUitem += "\n<!-- ITEM "+idItem+" -->";
	if (n)
	{

		lastMenuIDArray[lastMenuID]=idItem;
		lastMenuXArray[lastMenuID]=offset;
		lastMenuYArray[lastMenuID]=null;
		lastMenuID++;
		MENUitem += "<ilayer name="+idItem+">";
		MENUitem += "&nbsp;|\n";
		if (location != null)
			MENUitem += "<a href='"+location+"' class="+menuitemclass+" onmouseover=\"displaySubMenu('"+idItem+"')\" onclick=\"return false;\">";
		else
		{
			if (altLocation != null)
				MENUitem += "<a href='"+altLocation+"' class="+menuitemclass+" onmouseover=\"displaySubMenu('"+idItem+"')\" onclick=\"return false;\">";
			else
				MENUitem += "<a href='.' class="+menuitemclass+" onmouseover=\"displaySubMenu('"+idItem+"')\" onclick=\"return false;\">";
		}
//		MENUitem += vshimstr;
		MENUitem += text;
		MENUitem += "</a>";
		MENUitem += "</ilayer>";
	}
	if (ie||ns6)
	{
		MENUitem += "<td align=\"center\">\n";
//		MENUitem += "<div id='"+idItem+"'>\n";

//		MENUitem += "<div id='"+idItem+"' style='position:relative; background-color: "+tmp+"; font: "+this.menuFont+";'>\n";
		MENUitem += "<div id='"+idItem+"' style='position:relative; width: 100%; font: "+this.menuFont+";'>";
		MENUitem += "<a ";
		MENUitem += "class="+menuitemclass+" ";
//		MENUitem += "style='text-decoration: none; font: "+this.menuFont+"; color: "+this.fontColor+"; cursor: hand;' ";
		if (hint != null)
			MENUitem += "title='"+hint+"' ";
		if (location != null)
		{
			MENUitem += "href='"+location+"' ";
			MENUitem += "onmouseover=\"hideAll()\" ";
		}
		else
		{
			if (altLocation != null)
				MENUitem += "href='"+altLocation+"' ";
			else
				MENUitem += "href='.' ";
			MENUitem += "onmouseover=\"displaySubMenu('"+idItem+"')\" ";
//			MENUitem += "onclick=\"return false;\" "
		}
		MENUitem += ">";
//		MENUitem += vshimstr2+"\n";
		MENUitem += text;
		MENUitem += "</a>\n";
		MENUitem += "</div>\n";
		if (addDivider) { MENUitem += vshimstr+"\n"; } else { MENUitem += vshimstr2+"\n"; }
		MENUitem += "</td>\n";
	}
	MENUitem += "<!-- END OF ITEM "+idItem+" -->\n";
	MENUitem += "<!-- MAIN_MENU -->";

	HTMLstr = HTMLstr.replace("<!-- MAIN_MENU -->", MENUitem);
}

// addGraphicalItem(imageon, imageoff, statustext, width, height, id, text, hint, location, alternativeLocation,addDivider,offset);

function addGraphicalItem(imageon, imageoff, statustext, width, height, idItem, text, hint, location, altLocation, addDivider, offset)
{
	var Lookup = "<!-- ITEM "+idItem+" -->";
	if (HTMLstr.indexOf(Lookup) != -1)
	{
		alert(idParent + " already exist");
		return;
	}
	var MENUitem = "";
	MENUitem += "<!-- ITEM "+idItem+" -->";
	if (n)
	{

		lastMenuIDArray[lastMenuID]=idItem;
		lastMenuXArray[lastMenuID]=offset;
		lastMenuYArray[lastMenuID]=null;
		lastMenuID++;
//		MENUitem += "<ilayer name="+idItem+">";
//		MENUitem += "&nbsp;|\n";
		if (location != null)
			MENUitem += "<a href='"+location+"' class="+menuitemclass+" onmouseover=\"MM_swapImage('"+text+"','','"+imageon+"',1);displaySubMenu('"+idItem+"');window.status='"+statustext+"';return true;\" onclick=\"return false;\" onMouseOut=\"MM_swapImgRestore();window.status='';return true;\">";
		else
		{
			if (altLocation != null)
				MENUitem += "<a href='"+altLocation+"' class="+menuitemclass+" onmouseover=\"MM_swapImage('"+text+"','','"+imageon+"',1);displaySubMenu('"+idItem+"');window.status='"+statustext+"';return true;\" onclick=\"return false;\" onMouseOut=\"MM_swapImgRestore();window.status='';return true;\">";
			else
				MENUitem += "<a href='.' class="+menuitemclass+" onmouseover=\"MM_swapImage('"+text+"','','"+imageon+"',1);displaySubMenu('"+idItem+"');window.status='"+statustext+"';return true;\" onclick=\"return false;\" onMouseOut=\"MM_swapImgRestore();window.status='';return true;\">";
		}
//		MENUitem += vshimstr;
		MENUitem += "<IMG id='"+idItem+"' SRC=\""+imageoff+"\" WIDTH="+width+" HEIGHT="+height+" name=\""+text+"\" border=\"0\">";
		MENUitem += "</a>";
//		MENUitem += "</ilayer>";
	}
	if (ie||ns6)
	{
		MENUitem += "<td align=\"center\" height=\""+height+"\">";
//		MENUitem += "<div id='"+idItem+"'>\n";

//		MENUitem += "<div id='"+idItem+"' style='position:relative; background-color: "+tmp+"; font: "+this.menuFont+";'>\n";
//		MENUitem += "<div id='"+idItem+"' style='position:relative; width: 100%; font: "+this.menuFont+";'>";
		MENUitem += "<a ";
		MENUitem += "class="+menuitemclass+" ";
//		MENUitem += "style='text-decoration: none; font: "+this.menuFont+"; color: "+this.fontColor+"; cursor: hand;' ";
		if (hint != null)
			MENUitem += "title='"+hint+"' ";
		if (location != null)
		{
			MENUitem += "href='"+location+"' ";
			MENUitem += "onmouseover=\"hideAll()\" ";
		}
		else
		{
			if (altLocation != null)
				MENUitem += "href='"+altLocation+"' ";
			else
				MENUitem += "href='.' ";
			MENUitem += "onmouseover=\"MM_swapImage('"+text+"','','"+imageon+"',1);displaySubMenu('"+idItem+"');window.status='"+statustext+"';return true;\" ";
//			MENUitem += "onclick=\"return false;\" "
		}
		MENUitem += " onMouseOut=\"MM_swapImgRestore();window.status='';return true;\"";
		MENUitem += ">";
//		MENUitem += vshimstr2+"\n";
		MENUitem += "<IMG id='"+idItem+"' SRC=\""+imageoff+"\" WIDTH="+width+" HEIGHT="+height+" name=\""+text+"\" border=\"0\">";
		MENUitem += "</a>";
//		MENUitem += "</div>\n";
		if (addDivider) { MENUitem += vshimstr+"\n"; } else { MENUitem += vshimstr2; }
		MENUitem += "</td>\n";
	}
	MENUitem += "<!-- END OF ITEM "+idItem+" -->\n";
	MENUitem += "<!-- MAIN_MENU -->";

	HTMLstr = HTMLstr.replace("<!-- MAIN_MENU -->", MENUitem);
}

function addSubItem(idParent, text, hint, location, addDivider,menuItemHeight)
{
	var MENUitem = "";
	Lookup = "<!-- ITEM "+idParent+" -->";
	if (HTMLstr.indexOf(Lookup) == -1)
	{
		alert(idParent + " not found");
		return;
	}
	Lookup = "<!-- NEXT ITEM OF SUB MENU "+ idParent +" -->";
	if (HTMLstr.indexOf(Lookup) == -1)
	{
		if (n)
		{
			MENUitem += "\n";
			MENUitem += "<layer id='"+idParent+"submenu' visibility=hide bgcolor='"+this.bgColor+"'>\n";
			MENUitem += "<table cellspacing=\"0\" cellpadding=\"0\" border='"+this.subMenuPaneBorder+"' bgcolor='"+this.bgColor+"' width="+this.subMenuPaneWidth+">\n";
			MENUitem += "<!-- NEXT ITEM OF SUB MENU "+ idParent +" -->";
			MENUitem += "</table>\n";
			MENUitem += "</layer>\n";
			MENUitem += "\n";
		}
		if (ie||ns6)
		{
			MENUitem += "\n";
			MENUitem += "<div id='"+idParent+"submenu' onmouseout=operahide() style='position:absolute; visibility: hidden; z-index:100; width: "+this.subMenuPaneWidth+"; font: "+this.menuFont+"; top: -300;'>";
			MENUitem += "<table cellspacing=\"0\" cellpadding=\"0\" border='"+this.subMenuPaneBorder+"' bgcolor='"+this.bgColor+"' width="+this.subMenuPaneWidth+">\n";
			MENUitem += "<!-- NEXT ITEM OF SUB MENU "+ idParent +" -->";
			MENUitem += "</table>\n";
			MENUitem += "</div>\n";
			MENUitem += "\n";
		}
		MENUitem += "<!-- SUB_MENU -->";
		HTMLstr = HTMLstr.replace("<!-- SUB_MENU -->", MENUitem);
	}

	Lookup = "<!-- NEXT ITEM OF SUB MENU "+ idParent +" -->";
	if (n)  MENUitem = "<tr><td width=\"2\"><img src=\""+shimvalue+"\" align=\"left\" width=\"2\" height=\""+menuItemHeight+"\" alt=\"\" border=\"0\"></td><td><a class="+menusubitemclass+" title='"+hint+"' href='"+location+"'>"+text+"</a><br></td></tr>\n";
	if (ie||ns6) MENUitem = "<tr><td width=\"2\"><img src=\""+shimvalue+"\" align=\"left\" width=\"2\" height=\""+menuItemHeight+"\" alt=\"\" border=\"0\"></td><td><a class="+menusubitemclass+" title='"+hint+"' href='"+location+"'>"+text+"</a><br></td></tr>\n";
	if (addDivider) MENUitem += menuItemDivider;
	MENUitem += Lookup;
	HTMLstr = HTMLstr.replace(Lookup, MENUitem);

}

function showMenu()
{
	document.writeln(HTMLstr);
}

////////////////////////////////////////////////////////////////////////////
// Private declaration
function displaySubMenu(idMainMenu)
{
	var menu;
	var submenu;
	var idx;
	var matchidx;
	if (n)
	{

//alert("displaySubMenu" + idMainMenu + "submenu");

		submenu = document.layers[idMainMenu+"submenu"];
		if (lastMenu != null && lastMenu != submenu) hideAll();

//alert("displaySubMenuX " + idMainMenu + ":" + lastMenuX[idMainMenu]);
//		if (lastMenuX[idMainMenu] == null) {
//alert("displaySubMenuX " + idMainMenu + ":" + document.layers[idMainMenu+"submenu"].pageX);
//			lastMenuX[idMainMenu]=document.layers[idMainMenu+"submenu"].pageX;
//		}
//		if (lastMenuY[idMainMenu] == null) {
//alert("displaySubMenuY " + idMainMenu + ":" + document.layers[idMainMenu+"submenu"].pageY);
//			lastMenuY[idMainMenu]=document.layers[idMainMenu+"submenu"].pageY;
//		}


		for (idx = (lastMenuID-1); idx >=0; idx--) {
//			alert("compare " + idMainMenu + " : " + lastMenuIDArray[idx] + " , " + idx);
			if (idMainMenu == lastMenuIDArray[idx]) {
				if (lastMenuYArray[idx]==null) {
//					lastMenuXArray[idx]+=document.layers[idMainMenu+"submenu"].pageX;
					lastMenuYArray[idx]=document.layers[idMainMenu+"submenu"].pageY;
				}
//				alert("match " + idMainMenu + " : " + lastMenuXArray[idx] + " , " + lastMenuXArray[idx]);
				matchidx=idx;
//			} else {
//				alert("no match " + idMainMenu + " : " + lastMenuXArray[idx] + " , " + lastMenuXArray[idx]);
			}
		}

//		alert("displaySubMenu done: " + idMainMenu + " : " + lastMenuXArray[matchidx] + " , " + lastMenuYArray[matchidx] + " , " + matchidx);

		document.layers[idMainMenu+"submenu"].pageX = lastMenuXArray[matchidx];
		document.layers[idMainMenu+"submenu"].pageY = lastMenuYArray[matchidx];

		submenu.left = document.layers[idMainMenu+"submenu"].pageX;
		submenu.left += nudgeLeft;
		submenu.top  = document.layers[idMainMenu+"submenu"].pageY;
		submenu.top  += nudgeTop;
		submenu.visibility = fShow;

		leftX  = document.layers[idMainMenu+"submenu"].left;
		rightX = leftX + document.layers[idMainMenu+"submenu"].clip.width;
		leftY  = document.layers[idMainMenu+"submenu"].top+
			document.layers[idMainMenu+"submenu"].clip.height;
		rightY = leftY;
	} else if (ie||ns6) {
//alert(document.getElementById(idMainMenu+"submenu").id)
		menu = ie? eval(idMainMenu) : document.getElementById(idMainMenu);
		submenu = ie? eval(idMainMenu+"submenu.style") : document.getElementById(idMainMenu+"submenu").style;
		submenu.left = calculateSumOffset(menu, 'offsetLeft');
//		submenu.left += (-0);
//		submenu.top  = calculateSumOffset(menu, 'offsetTop') + 30;
		submenu.top  = menu.style.top+nudgeTop;
		submenu.visibility = fShow;
		if (lastMenu != null && lastMenu != submenu) hideAll();

		leftX  = ie? document.all[idMainMenu+"submenu"].style.posLeft : parseInt(document.getElementById(idMainMenu+"submenu").style.left);
		rightX = ie? leftX + document.all[idMainMenu+"submenu"].offsetWidth : leftX+parseInt(document.getElementById(idMainMenu+"submenu").offsetWidth);

		leftY  = ie? document.all[idMainMenu+"submenu"].style.posTop+
			document.all[idMainMenu+"submenu"].offsetHeight : parseInt(document.getElementById(idMainMenu+"submenu").style.top)+parseInt(document.getElementById(idMainMenu+"submenu").offsetHeight);
		rightY = leftY;
	}
	lastMenu = submenu;
}

function hideAll()
{
	if (lastMenu != null) {lastMenu.visibility = fHide;lastMenu.left = 0;}
}

function calculateSumOffset(idItem, offsetName)
{
	var totalOffset = 0;
	var item = eval('idItem');

	do
	{
		totalOffset += eval('item.'+offsetName);
//alert('item,offset='+item+','+totalOffset);
		item = eval('item.offsetParent');
	} while (item != null);
//alert('**finaloffset='+totalOffset+','+nudgeLeft);

if ((ie && (vnum > 3) && (vminornum > 1)) ||
(n) ||
(ns6 && (vnum > 6.00))) {
	// fixed alignment
	item = eval('idItem');
	totalOffset = eval('item.'+offsetName);
//	alert('finaloffset='+totalOffset+','+nudgeLeft);
}
if (totalOffset < nudgeLeft) {
totalOffset=0;
} else {
totalOffset-=nudgeLeft;
}
//alert('finaloffset='+totalOffset);

	return totalOffset;
}

function updateIt(e)
{
	if (ie&&!opr6)
	{
		var x = window.event.clientX;
		var y = window.event.clientY;

		if (x > rightX || x < leftX) hideAll();
		else if (y > rightY) hideAll();
	}
	if (n||ns6)
	{
		var x = e.pageX;
		var y = e.pageY;

		if (x > rightX || x < leftX) hideAll();
		else if (y > rightY) hideAll();
	}
}

function operahide(){
        if (opr6){
        if (!MainTable.contains(event.toElement))
        hideAll()
}
}

if (ie||ns6)
{
	document.body.onclick=hideAll;
	document.body.onscroll=hideAll;
	document.body.onmousemove=updateIt;
}
if (document.layers)
{
	window.captureEvents(Event.MOUSEMOVE);
	window.captureEvents(Event.CLICK);
	window.onmousemove=updateIt;
	window.onclick=hideAll;
}