document.onclick = function(e) 
{
	if ((document.domain=="www.independentstudy.ku.edu")|(document.domain=="www.distancelearning.ku.edu")|(document.domain=="www.distanceeducation.ku.edu"))
	{
		var siteroot="";
	}
	else
	{
		var siteroot="/is";
	}
//------------------------------------------------------------------------------------------------------Determines the target of the event based on what the user clicks, with the scope always as the outer <a href>.
	if (e)
	{
		var target=e.target;
		if (e.target=='[object HTMLImageElement]')
		{
			target=e.target.parentNode;
		}
	}
	else
	{
		if (window.event.srcElement=='[object]')
		{
			target=window.event.srcElement.parentNode;
		}
		else
		{
			var target=window.event.srcElement;
		}
	}

//------------------------------------------------------------------------------------------------------IMAGES
	if (target && target.getAttribute('popuptype') )
	{ 
		var popuptype='?popuptype='+target.getAttribute('popuptype');
		var popupvalue = '&popupvalue='+target.getAttribute('popupvalue');
		switch (target.getAttribute('popuptype'))
		{
			case 'external':
				var external = window.open(target.href,'new','width=800,height=600,' + 'scrollbars=yes,resizable=yes,status=yes,' + 'toolbar=yes,menubar=yes,location=yes'); 
			break;
			case 'image':
				var pathname=siteroot+'/includes/content/popup_window.php'+popuptype+popupvalue;
				var external = window.open(pathname,'new','width=650,height=600,'+'scrollbars=yes,resizable=yes,status=yes,'+'toolbar=no,menubar=no,location=no');
			break;
			case 'info':
				var pathname=siteroot+'/includes/content/popup_window.php'+popuptype+popupvalue;
				var external = window.open(pathname,'new','width=600,height=640,'+'scrollbars=yes,resizable=yes,status=yes,'+'toolbar=no,menubar=no,location=no');
			break;
			case 'bio':
				var pathname=siteroot+'/includes/content/popup_window.php'+popuptype+popupvalue;
				var external = window.open(pathname,'new','width=800px,height=640,'+'scrollbars=yes,resizable=yes,status=yes,'+'toolbar=no,menubar=no,location=no');
			break;
			case 'coursedescription':
				var pathname=siteroot+'/includes/content/popup_window.php'+popuptype+popupvalue;
				var external = window.open(pathname,'new','width=500,height=400,'+'scrollbars=yes,resizable=yes,status=yes,'+'toolbar=no,menubar=no,location=no');
			break;
			default:
			break;
		}
		return external.closed; 
	} 

}
function MM_openBrWindow(theURL,winName,features) {

	window.open(theURL,winName,features);
}	