



/* http://www.pageresource.com/dhtml/ryan/part3-1.html */
function dynamicContent(layerID,txt)
{
	if(document.getElementById)
	{
		document.getElementById(layerID).innerHTML=txt;
	}
	else if(document.all)
	{
		document.all[layerID].innerHTML=txt;
	}
	else if(document.layers)
	{
		with(document.layers[layerID].document)
		{
			open();
			write(txt);
			close();
		}
	}
}
      
function setDescriptor(content)
{
	return dynamicContent('descriptor',content);
}

function resetDescriptor()
{
	return dynamicContent('descriptor','&nbsp;');
}

/* http://www.htmldog.com/articles/suckerfish/dropdowns/ */
sfHover = function() 
{
	var sfEls;
	
	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);
	
sfHover1 = function() 
{
	var sfEls;
	
	sfEls = document.getElementById("common-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", sfHover1);
/* works for Mac IE 5 but menu is out of sync
else if (document.all&&document.getElementById) 
	window.onload=sfHover;
	*/
	
	
	
//http://www.sitepoint.com/article/standards-compliant-world
function externalLinks() 
{
 if (!document.getElementsByTagName) return;
 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";
 }
}
window.onload = externalLinks;