function popUp(URL)
{
	eval("window.open('" + URL + "','windowName', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=600,height=600');");
}

function sizedPopUp(URL, width, height)
{
eval("window.open('" + URL + "', 'window2', 'width=" + width + ", height=" + height + ", location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes');");
}

/* 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);
/* 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;