function loadimg(image){
	document.getElementById('im').src='pic/'+image;
}
// Get's the URL and parses it
function getURL() {
  var url = document.location.href;
  return parseURL(url);
}

// Strips a URL to just the filename
function parseURL (url) {
  var fileName = url.split("/");
  fileName = (fileName[fileName.length-1]);
  return fileName;
}

// Searches through the doc looking for links
// Only checks the navigation ID
// Changes class of the current link to /currentlink
function highlightCurrentLink() {

  var currentLocation = getURL();
  var nav = document.getElementById("menu");

  //alert ("currentLocation" + currentLocation);
  links = nav.getElementsByTagName("a");

  for (i=0; i<links.length; i++) {
    linkHref = links[i].getAttribute("href")
	linkHref = parseURL(linkHref);
//	alert("linkHref: " + linkHref);
//	alert("currentlinkHref: " + currentLocation);
    if (linkHref==currentLocation) {
//	  alert("link found");
	  // Set class for different browsers
      links[i].setAttribute('style','color:#fdf2ba;'); //firefox
      links[i].style.cssText='color:#fdf2ba;'; //IE
   }
 }
}
function addLoadEvent(func) { 
	var oldonload = window.onload; 
	if (typeof window.onload != 'function'){ 
		window.onload = func;
	} else { 
		window.onload = function() {
			oldonload();
			func();
		}
	}
}
addLoadEvent(highlightCurrentLink);

function greyflash(title,url) {
	GB_showCenter (title, url, 500,500)
}

