sfHover = function() {
	// The topnav LI elements
	var sfEls = document.getElementById("globalnav").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"), "");
		}
	}
				
}


// - - - - - - - - - - - - - - - - - - - - - - - -  //
// - - - - - - -  Print Window functions - - -     //
// - - - - - - - - - - - - - - - - - - - - - - -  //
function printWindow(){
  window.print();
}
function createPrintlink() {
	this_ID = document.getElementById("t-printpage");
	//if (listitem) {
		//printlink = listitem.getElementsByTagName('a');
	if (this_ID) {
		this_ID.onclick = function () { printWindow();};
	}
	//}
}


// - - - - - - - - - - - - - - - - - - - - - - - -  //
// - - - - Target=_blank Links (rel=external) - - - //
// - - - - - - - - - - - - - - - - - - - - - - - -  //
function externalLinks() {
	if (document.getElementsByTagName) {
		var anchors = document.getElementsByTagName( "a" );
		for (var i = 0; i < anchors.length; i++) {
			var anchor = anchors[i];
			if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
				anchor.target = "_blank";
			}
		}
	}
}  

// - - - - - - - - - - - - - - - - - - - - - - - -  //
// - - - - insert the Flash with Javascript - - - - //
// - - - - - - - - - - - - - - - - - - - - - - - -  //
function insertFlashEng(base_url) {
document.write('<object id="movie" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="222" height="175">');
      document.write('<param name="allowScriptAccess" value="sameDomain" />');
      document.write('<param name="movie" id="movie" value="' + base_url + '/_flash/why_exhibit-eng.swf" />');
	  document.write('<param name="wmode" value="transparent" />');
      document.write('<param name="quality" value="high" />');
      document.write('<param name="bgcolor" value="#B6C8D6" />');
      document.write('<embed src="' + base_url + '/_flash/why_exhibit-eng.swf"  bgcolor="#B6C8D6" quality="high" swLiveConnect="true" id="movie" name="movie" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="222" height="175" wmode="transparent" />');
document.write('</object>');
}

function insertFlashDe(base_url) {
document.write('<object id="movie" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="222" height="175">');
      document.write('<param name="allowScriptAccess" value="sameDomain" />');
      document.write('<param name="movie" id="movie" value="' + base_url + '/_flash/why_exhibit-de.swf" />');
	  document.write('<param name="wmode" value="transparent" />');
      document.write('<param name="quality" value="high" />');
      document.write('<param name="bgcolor" value="#B6C8D6" />');
      document.write('<embed src="' + base_url + '/_flash/why_exhibit-de.swf"  bgcolor="#B6C8D6" quality="high" swLiveConnect="true" id="movie" name="movie" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="222" height="175" wmode="transparent" />');
document.write('</object>');
} 


function popProfile(url) {
	newwindow=window.open(url,'profile','height=650,width=600,top=15,left=15,scrollbars=yes');
	newwindow.focus();
}

// DO STUFF ONLOAD
window.onload=function(){
 createPrintlink();
 externalLinks();
}


if (window.attachEvent) window.attachEvent("onload", sfHover);