
function changeImage(imgName, imgSrc){
 document.images[imgName].src = imgSrc.src;
}


var isIE = (document.all)?true:false
var isNN = (document.getElementById && !isIE)?true:false
var isMAC = (navigator.userAgent.toLowerCase().indexOf("mac")!=-1)?true:false

var layerRef = (isNN) ? 'document.getElementById("' : 'document.all.';
var styleRef = (isNN) ? '").style' : '.style';
var topRef = (isNN) ? '.top' : '.pixelTop';
var leftRef = (isNN) ? '.left' : '.pixelLeft';
var activeMenu = 0;
var buble = false;


if (isNN) var topPixel = 63;
else var topPixel = 63;
leftPixel = new Array();
leftPixel[0] = 0;
leftPixel[1] = 226;
leftPixel[2] = 357;
leftPixel[3] = 427;



if (isNN)
{
 document.captureEvents(Event.MOUSEMOVE);
 document.onmousemove = checkUp;
}
 else document.onmouseover = killMenu;


function activateSelected(menuLayerRef){
 buble = true;
 activateMenu(menuLayerRef);
 buble = false;
}

function activateMenu(menuLayerRef){
 if (activeMenu != menuLayerRef)
 {
  if (activeMenu) 
   hideMenu("menu" + activeMenu);
  menuID = "menu" + menuLayerRef;
  activeMenu = menuLayerRef;	
  eval(layerRef + menuID + styleRef + topRef + ' = ' + topPixel);
  eval(layerRef + menuID + styleRef + leftRef + ' = ' + leftPixel[menuLayerRef]);
  showMenu(menuID);
 }
 if (!isNN && !buble) window.event.cancelBubble = true;
}

function showMenu(menuID) {
 eval(layerRef + menuID + styleRef + '.visibility = "visible"');
}

function hideMenu(menuID){
 eval(layerRef + menuID + styleRef + '.visibility = "hidden"');
}

function killMenu(){
 if (section > 0) 
  activateSelected(section)
 else
 {
  if (activeMenu)
  {
   menuID = "menu" + activeMenu;
   hideMenu(menuID);
   activeMenu = 0;
  }
 }  
}

function checkUp(e){
 if (isNN && (activeMenu != 0))
 {
  var x = e.pageX;
  var y = e.pageY;
  var x1 = eval('document.getElementById("menu' + activeMenu + '").style.width') + leftPixel;
  var y1 = topPixel[activeMenu]-19;
  var y2 = eval('document.getElementById("menu' + activeMenu + '").style.height') + topPixel;
  if ((y < y1) || (y > y2) || (x < leftPixel) || (x > x1)) setTimeout("killMenu()", 5000);
 }
}

document.write("<div class=screenOnly>");
document.write("<div id=menu1 onmouseover='activateMenu(1);' class=subMenuDiv>");
document.write(" <table cellspacing=0 cellpadding=3><tr>");
document.write(" <tr><td style='height:12px;'></td></tr><tr>");
document.write("  <td nowrap><a href='about.asp' class='menu2'>Overview</a></td>"); 
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='about_jerusalem.asp' class='menu2'>Why Jerusalem</a></td>"); 
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='about_management.asp' class='menu2'>Management</a></td>");
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='about_services.asp' class='menu2'>Services & Activities</a></td>");
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='about_jobs.asp' class='menu2'>Job Board</a></td>");
document.write(" </tr><tr><td style='height:10px;'></td></tr></table>");
document.write("</div>");

document.write("<div id=menu2 onmouseover='activateMenu(2);' class=subMenuDiv>");
document.write(" <table cellspacing=0 cellpadding=3><tr>");
document.write(" <tr><td style='height:12px;'></td></tr><tr>");
document.write("  <td nowrap><a href='database_lifesciences.asp' class='menu2'>Life Sciences Companies</a></td>"); 
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='database_arm.asp' class='menu2'>Academic, Research & Medical Institutions</a></td>"); 
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='database_support.asp' class='menu2'>Support Infrastructure</a></td>");
document.write(" </tr><tr><td style='height:10px;'></td></tr></table>");
document.write("</div>");

document.write("<div id=menu3 onmouseover='activateMenu(3);' class=subMenuDiv>");
document.write(" <table cellspacing=0 cellpadding=3><tr>");
document.write(" <tr><td style='height:12px;'></td></tr><tr>");
document.write("  <td nowrap><a href='media_news.asp' class='menu2'>In the News</a></td>"); 
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='media_events.asp' class='menu2'>Calendar of Events</a></td>"); 
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='media_newsletters.asp' class='menu2'>Newsletters</a></td>"); 
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='media_publications.asp' class='menu2'>Publications</a></td>"); 
document.write("  <td class=sep2 nowrap>|</td>"); 
document.write("  <td nowrap><a href='media_links.asp' class='menu2'>Relevant Links</a></td>"); 
document.write(" </tr><tr><td style='height:10px;'></td></tr></table>");
document.write("</div>");
document.write("</div>");
