/* show/hide layer functions */

function show(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='visible';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'visible';
    else if (document.all)
        document.all[object].style.visibility = 'visible';
}

function hide(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='hidden';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'hidden';
    else if (document.all)
         document.all[object].style.visibility = 'hidden';
}

/* image rollover functions */

function roll(id, newSrc) {
    var theImage = findImage(document, id, 0);
    if (theImage) theImage.src = newSrc;
}

function findImage(doc, name, j) {
    var theImage = false;
    if (doc.images) theImage = doc.images[name];
    if (theImage) return theImage;
    if (doc.layers) {
        for (j = 0; j < doc.layers.length; j++) {
            theImage = findImage(doc.layers[j].document, name, 0);
            if (theImage) return (theImage);
        }
    }
    return (false);
}

thisMenu = null;
bits = location.href.split('/');
// 'http:'/''/'olympus'/'e1/'thisMenu'/'default.asp'
if (bits.length >= 5)
  thisMenu = bits[4];

function menuRoll(dirName, src) {
  // passes the dir name of this page
  if (dirName != thisMenu)
    roll(dirName, src);
}

function setThisMenu() {
  roll(thisMenu, '/e1/images/globalnav/' + thisMenu + 'On.gif')
}

/*
//   THIS IS THE SCRIPT FOR THE RANDOM Flash Banners
var theImages = new Array() 
		
theImages[0] = '1.swf'
theImages[1] = '2.swf'
theImages[2] = '3.swf'
theImages[3] = '4.swf'
theImages[4] = '5.swf'
theImages[5] = '6.swf'
theImages[6] = '7.swf'

var p = theImages.length;
var whichImage = Math.round(Math.random()*(p-1));
function randomFlash(){
	return(theImages[whichImage]);
}
function randomImage(){
	return(whichImage+1+'.jpg');
}

 outputFlash('flash/1.swf', '750', '96'); 
function outputFlash(swffile, width, height){
	document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+width+'" height="'+height+'" id=ShockwaveFlash1>');
	document.write ('<param name=movie value="'+swffile+'">');
	document.write ('<param name=quality value=high>');
	document.write ('<embed src="'+swffile+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">');
	document.write ('</embed></object>');
}
*/