function whichItem()
{
	var e = event.srcElement
	while (e.tagName != "TD")
		e = e.parentElement
	return e
}

function msover()
{
	var e = whichItem()
	e.style.backgroundColor = 'gainsboro'
	e.style.borderColor = 'gray'
}


function msout()
{
	var e = whichItem()
	e.style.backgroundColor = 'white'
	e.style.borderColor = 'white'
}

// slide Show Code

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this

Pic[0] = 'images/slide1.jpg'
Pic[1] = 'images/slide3.jpg'
Pic[2] = 'images/slide4.jpg'

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length


var preLoad = new Array()

for (i = 0; i < p; i++)
{
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow()
{

   if (document.all)
   {
		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
		document.images.SlideShow.filters.blendTrans.Apply()      
   }

   document.images.SlideShow.src = preLoad[j].src

   if (document.all)
   {
      document.images.SlideShow.filters.blendTrans.Play()
   }

   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)

}

// =============================================
// Drop Down Menu Code
// =============================================
var timeOn = null;

function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
} // getStyleObject

function changeObjectVisibility(objectId, newVisibility) {
	// wait before hidding the object
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.visibility = newVisibility;
	return true;
    } else {
	// we couldn't find the object, so we can't change its visibility
	return false;
    }
} // changeObjectVisibility

function menuOver()
{
	clearTimeout(timeOn);
}

function menuOut(objectID, timeout)
{
	timeOn = setTimeout("changeObjectVisibility('"+ objectID + "','hidden');",timeout);
}

function moveObject(objectId, newXCoordinate, newYCoordinate) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.left = newXCoordinate;
	styleObject.top = newYCoordinate;
	return true;
    } else {
	// we couldn't find the object, so we can't very well move it
	return false;
    }
} // moveObject


