// ====================================
// This code can be reused as long as the following notice is maintained
// ====================================
// Copyright 1999 InsideDHTML.com, LLC
// For more information, see www.siteexperts.com
// ====================================
// Extracted and modified by RR 2002 
// ====================================
function doGifOver() {
  if (document.images)
    this.dest.src = this.overValue
  return true
}
function doGifOut() {
  if (document.images)
    this.dest.src = this.dest.osrc
}
function doGifDown() {
  if (document.images)
    this.dest.src = this.downValue
}
function GifOverEffect(src,dest,overValue,downValue) {
  src.onmouseover = doGifOver // Assign onmouseover handler
  src.onmouseout = doGifOut // Assign onmouseout handler
  src.onmousedown = doGifDown // Assign onmousedowm handler
  src.dest = dest // Store the destination element on the src
  src.overValue = overValue // Store the overValue on the src
  src.downValue = downValue // Store the overValue on the src
  if (document.images)
    dest.osrc = dest.src
}
function InitGifOverEffect(src,dest,overValue,downValue) {
  GifOverEffect(src,dest,overValue,downValue) // Setup over effect
  return src.onmouseover() // Make sure first rollover is applied
}

function doGifLoad() {
//Can also setup from script
//OverEffect(document.links[0],window,"Hello World")
}

var images;
function preLoadGifs() {
	images = new Object();
	preLoadGifs1('act');
	preLoadGifs1('hov');
	preLoadGifs1('nav');
	preLoadGifs1('off');
}
function preLoadGifs1(set) {
	images[set] = new Object();
	preLoadGifs2(set, 'Query');
	preLoadGifs2(set, 'Score');
	preLoadGifs2(set, 'Bio');
}
function preLoadGifs2(set, role) {
	if (document.images) {
		images[set][role] = new Image();
		images[set][role].src = 'images/buttons/' + set + role + '.gif';
	}
}
preLoadGifs();

window.onload = doGifLoad;

// ================================================================

// This code can be reused as long as the following notice is maintained

// Copyright 1999 InsideDHTML.com, LLC
// For more information, see www.siteexperts.com

function doOver() {
  // Destination is the window - update status
  if (this.dest==window) {
    window.status = this.overValue
    return true
  }
  // Destination is the input element - update value
  else if ((this.dest.type!=null) && ((this.dest.type=="text") 
    || (this.dest.type=="textarea")))
    this.dest.value = this.overValue
  // Destination is an image - update src
  else if (this.dest.src!=null) 
    this.dest.src = this.overValue
  return true
}

function doOut() {
  // Destination is the window, clear status
  if (this.dest==window)
    window.status=""
  // Destination is the input element, set default value
  else if (this.dest.type!=null)
    this.dest.value=this.dest.defaultValue
  // Destination is an image, reset original image
  else if (this.dest.src)
    this.dest.src = this.dest.osrc
}

function OverEffect(src,dest,overValue) {
  // Assign onmouseover handler
  src.onmouseover = doOver
  // Assign onmouseout handler
  src.onmouseout = doOut
  // Store the destination element on the src
  src.dest = dest
  // Store the overValue on the src
  src.overValue= overValue
  // If an image, start downloading
  if (dest.src!=null) {
    dest.osrc = dest.src
    var i = new Image()
    i.src = src.overValue
  }
}

function InitOverEffect(src,dest,overValue) {
  // Setup over effect
  OverEffect(src,dest,overValue)
  // Make sure first rollover is applied
  return src.onmouseover()
}


