var timeoutID = -1;

function high(whichMenu) {
if(timeoutID != -1)
clearTimeout(timeoutID);
theobject=whichMenu;
highlightit(theobject);
}

function low(whichMenu) {
if(timeoutID != -1)
clearTimeout(timeoutID);
theobject=whichMenu;
lowlightit(theobject);
}



function lowlightit(currentMenu){
timeoutID=setTimeout("lowlightit(theobject)",50);

if (currentMenu.style.MozOpacity<1)
//currentMenu.style.MozOpacity=parseFloat(currentMenu.style.MozOpacity)+0.1;
currentMenu.style.MozOpacity=1;

else if (currentMenu.filters&&currentMenu.filters.alpha.opacity<100)
//currentMenu.filters.alpha.opacity+=10;
currentMenu.filters.alpha.opacity=100;

else if (window.highlighting)
clearInterval(lowlighting);
}



function highlightit(currentMenu){
timeoutID=setTimeout("highlightit(theobject)",50);

if (currentMenu.style.MozOpacity>0.5)
currentMenu.style.MozOpacity=parseFloat(currentMenu.style.MozOpacity)-0.1;

else if (currentMenu.filters&&currentMenu.filters.alpha.opacity>50)
currentMenu.filters.alpha.opacity-=10;

else if (window.highlighting)
clearInterval(highlighting);
}

function newWindow(mypage,myname,w,h,features) {
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

