<!--


// **********
// **********
// **********
// **********
// **********

//var parent.main.openMenu = new Array('','');
if (ns || ns6) document.captureEvents(Event.MOUSEUP);
document.onmouseup = trapEvent;


// **********
// **********
// **********
// **********
// **********




/**********
** This version of shwMenu() is similar to the one found in pop2.js, and it is dealing with
** the coordinates to place the menu. The X is 30 px left of the click, and the Y is the amount
** the page has scrolled. Once a menu has been displayed, the parent.main.openMenu[0] variable is passed the
** div element ID (newM) coded in the menu links. If parent.main.openMenu[0] has a value, then a menu is open
** and the clsMenu() function is called to close any open menus (the '1' parameter is sent to
** close parent and child menus).
**********/

function shwMenu(e, newM) {

if (!e) e = window.event;
if (ie) {
	xpos = (e.clientX + document.body.scrollLeft) - 30;
	if (xpos + 150 > document.body.clientWidth + document.body.scrollLeft) xpos = xpos - (xpos + 150 - (document.body.clientWidth + document.body.scrollLeft));
	ypos = parent.main.document.body.scrollTop;
}
else {
	xpos = (e.pageX) - 30;
	if (xpos + 140 > window.innerWidth) xpos = xpos - (xpos + 150 - window.innerWidth);
	ypos = parent.main.window.pageYOffset;
}

if (parent.main.openMenu[0] != newM) {
	if (ie) {
		if (parent.main.openMenu[0] != '') clsMenu(1);
		parent.main.openMenu[0] = newM;
		parent.main.document.all[newM].style.left = xpos;
		parent.main.document.all[newM].style.top = ypos;
		parent.main.document.all[newM].style.visibility = 'visible';
	}
	else if (ns6) {
		if (parent.main.openMenu[0] != '') clsMenu(1);
		parent.main.openMenu[0] = newM;
		parent.main.document.getElementById(newM).style.left = xpos;
		parent.main.document.getElementById(newM).style.top = ypos;
		parent.main.document.getElementById(newM).style.visibility = 'visible';
	}
	else if (ns) {
		if (parent.main.openMenu[0] != '') clsMenu(1);
		parent.main.openMenu[0] = newM;
		parent.main.document.layers[newM].left = xpos;
		parent.main.document.layers[newM].top = ypos;
		parent.main.document.layers[newM].visibility = 'show';
	}
}

} // end



/**********
** clsMenu() does the dirty work of checking how many menus are open (out of two in this case)
** and, well, hides them.
**********/

function clsMenu(nm) {

for (i = nm; i >= 0; i--) {

	if (ns6) {if (parent.main.openMenu[i] != '') parent.main.document.getElementById(parent.main.openMenu[i]).style.visibility = 'hidden';}
	else if (ns) {if (parent.main.openMenu[i] != '') parent.main.document.layers[parent.main.openMenu[i]].visibility = 'hide';}
	else if (ie) {if (parent.main.openMenu[i] != '') parent.main.document.all[parent.main.openMenu[i]].style.visibility = 'hidden';}
	parent.main.openMenu[i] = '';
}

} // end

// **********
// **********
// **********
// **********
// **********

function trapEvent(e) {

if (ie) tmp = event.srcElement.tagName;
else if (ns || ns6) tmp = e.target.tagName;

if (tmp != 'A' && parent.main.openMenu[0] != '') clsMenu(1);

} // end



function newWin(f) {

window.open(f, 'Search', 'width=700,height=450,scrollbars,resizable,menubar=no,status=no,toolbar=no');

} // end pdfWin() function

// -->
