
// Nav Rollovers
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		nav_03_over = newImage("images/nav_03-over.jpg");
		nav_05_over = newImage("images/nav_05-over.jpg");
		nav_07_over = newImage("images/nav_07-over.jpg");
		preloadFlag = true;
	}
}

// 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()
}


function doLoad() {
//Can also setup from script
//OverEffect(document.links[0],window,"Hello World")
}

//window.onload = doLoad
