<!--//--><![CDATA[//><!--

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>

function WM_preloadImages() {
/*
WM_preloadImages()
Loads images into the browser's cache for later use.
Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)
Author: Nadav Savio
Author Email: nadav@wired.com
Usage: WM_preloadImages('image 1 URL', 'image 2 URL', 'image 3 URL', ...);
*/

  // Don't bother if there's no document.images
  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImages = new Array();
    // Loop through all the arguments.
    var argLength = WM_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each arg, create a new image.
      document.WM.loadedImages[arg] = new Image();
      // Then set the source of that image to the current argument.
      document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
    }
  }
}

function preloadNavImages() {
  WM_preloadImages(
    'http://www.canaan.com/images/tagline.gif',
    'http://www.canaan.com/images/nav-about.gif',
    'http://www.canaan.com/images/bg-subnav-about.png',
    'http://www.canaan.com/images/nav-about-hotspot.gif',
    'http://www.canaan.com/images/nav-team.gif',
    'http://www.canaan.com/images/bg-subnav-team.png',
    'http://www.canaan.com/images/nav-team-hotspot.gif',
    'http://www.canaan.com/images/nav-focus.gif',
    'http://www.canaan.com/images/bg-subnav-focus.png',
    'http://www.canaan.com/images/nav-focus-hotspot.gif',
    'http://www.canaan.com/images/nav-companies.gif',
    'http://www.canaan.com/images/bg-subnav-companies.png',
    'http://www.canaan.com/images/nav-companies-hotspot.gif',
    'http://www.canaan.com/images/nav-news.gif',
    'http://www.canaan.com/images/bg-subnav-news.png',
    'http://www.canaan.com/images/nav-news-hotspot.gif',
    'http://www.canaan.com/images/nav-contact.gif'
  );
}