function do_onMouseOver(el) {
el.originalClass = el.className;
el.className += "Hover";
}

function do_onMouseOut(el) {
el.className = el.originalClass;
}

function MM_jumpMenu(targ,selObj,restore) {
eval("window.open('"+selObj.options[selObj.selectedIndex].value+"')");
if (restore) selObj.selectedIndex=0;
}


/******************************************************************************/

var appMenuItems = Array()
var delayedImgID = Array(), delayedImgSrc = Array()
var openMenu = null, timerID = null
var mouseX = 0, mouseY = 0

/************** insert HTML *************************************************/

function insertHTML(text) {
	document.open()
	document.write(text)
	document.close()
	}

/************** menu template ***********************************************/

var menufwkTop =
  '<table cellpadding=0 cellspacing=0 border=0>' +
  '  <tr>' +
  '    <td bgcolor="#009999" rowspan=3><tpix height=1 width=1></td>' +
  '    <td bgcolor="#009999"><tpix height=1 width=1></td>' +
  '    <td bgcolor="#009999" rowspan=3><tpix height=1 width=1></td>' +
  '    <td><tpix height=1 width=1></td>' +
  '  </tr>' +
  '  <tr>' +
  '    <td>' +
  '      <table cellpadding=0 cellspacing=0 border=0>' +
  '        <tr>' +
  '          <td bgcolor="#ffffff"><tpix height=1 width=4></td>' +
  '          <td bgcolor="#ffffff"><tpix height=7 width=1></td>' +
  '          <td bgcolor="#ffffff"><tpix height=1 width=10></td>' +
  '        </tr>' +
  '        <tr>' +
  '          <td bgcolor="#ffffff"><tpix height=1 width=4></td>' +
  '          <td bgcolor="#ffffff" class="menu">'

var menufwkBot =
  '          </td>' +
  '          <td bgcolor="#ffffff"><tpix height=1 width=4></td>' +
  '        </tr>' +
  '        <tr>' +
  '          <td bgcolor="#ffffff"><tpix height=1 width=4></td>' +
  '          <td bgcolor="#ffffff"><tpix height=7 width=1></td>' +
  '          <td bgcolor="#ffffff"><tpix height=1 width=4></td>' +
  '        </tr>' +
  '      </table>' +
  '    </td>' +
  '    <td bgcolor="#333333"><tpix height=1 width=1></td>' +
  '  </tr>' +
  '  <tr>' +
  '    <td bgcolor="#009999"><tpix height=1 width=1></td>' +
  '    <td bgcolor="#333333" rowspan=2><tpix height=1 width=1></td>' +
  '  </tr>' +
  '  <tr>' +
  '    <td><tpix height=2 width=1></td>' +
  '    <td bgcolor="#333333" colspan=2><tpix height=2 width=1></td>' +
  '  </tr>' +
  '</table>'

/************** showMenu ****************************************************/

function showMenu(entries) {
	// assign default arguments: x, y, isRelative, mask
	var argv = showMenu.arguments
	var argc = argv.length
	var x = (argc > 1) ? argv[1] : 0
	var y = (argc > 2) ? argv[2] : 0
	var isRelative = (argc > 3) ? argv[3] : false
	var mask = (argc > 4) ? argv[4] : ''
	// assemble menuEntries string
	var menuEntries = ''
	for (var i = 0; entries && i < entries.length; i++) {
		var nameurl = entries[i].split('¤')
		if (nameurl[0] == 'autoexec') {
			window.location = nameurl[1]
			return
			}
		if (mask.charAt(i) != '0')
			menuEntries += '<a href="' + nameurl[1] + '" onclick="showMenu(null)">' + nameurl[0] + '</a><br>'
		  else
			menuEntries += nameurl[0].fontcolor('ffffff') + '<br>'
		}
	// apply parameters to menuentires
	for (var i = 5; i < argc; i++) {
		var splitpos = argv[i].indexOf('=')
		if (splitpos != -1) {
			re = new RegExp(argv[i].slice(0, splitpos), 'g')
			menuEntries = menuEntries.replace(re, argv[i].slice(splitpos+1))
			}
		}
	// calculate correct position
	if (isRelative) {
		x += mouseX
		y += mouseY
		}
	  else
		x += getMargin('x')
	// add menu framework
	var menuContent = menufwkTop + menuEntries + menufwkBot
	menuContent = menuContent.replace(/tpix/g, 'img src="' + imagePath + 'p.gif" alt=""')
	// display menu
	var newMenu = menuEntries
	if (entries && newMenu != openMenu) {
		setLayer('menu', menuContent)
		showLayer('menu', x, y)
		openMenu = newMenu
		}
	  else {
		hideLayer('menu')
		openMenu = null
		}
	}

function delayedClosemenu(activate) {
	// if activate==true activate timer that closes open menu in 10ms
	// if activate==false deactivate that timer
	if (activate)
		timerID = setTimeout(showMenu,10,null)
	  else {
		if (timerID)
			clearTimeout(timerID)
		timerID = null
		}
	}

/************** delayed images **********************************************/

function insertDelayedImg(src, width, height, alt) {
	var align = insertDelayedImg.arguments.length > 4 ? insertDelayedImg.arguments[4] : null
	var nr = delayedImgID.length
	var id = 'dimg' + nr
	var imgSrc = '<img name="' + id + '" border="0" src="' + imagePath + 't.gif"'
	if (width) imgSrc += ' width="' + width + '"'
	if (height) imgSrc += ' height="' + height + '"'
	if (align) imgSrc += ' align="' + align + '"'
	imgSrc += ' alt="' + alt + '">'
	insertHTML(imgSrc)
	delayedImgID[nr] = id
	delayedImgSrc[nr] = src
	}

function showDelayedImages() {
	for (var i = 0; i < delayedImgID.length; i++)
		document.images[delayedImgID[i]].src = delayedImgSrc[i]
	}


function JSFX_FloatDiv(id, sx, sy)
{
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;

	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	var px = document.layers ? "" : "px";
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};

	el.floatIt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.floatIt()", 40);
	}
	return el;
}

var findfirst=true; function findclick(ob) {if (findfirst) {ob.value=""; findfirst=false;}}
