// Contains misc. javascript functions used throughout web site

	function ShowPDFPopup(URL) 
	{
		var popupWindow;
		popupWindow = window.open(URL,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width=550,height=400');
		popupWindow.focus();
	}
	
	function ShowstaffPDFPopup(URL) 
	{
		var popupWindow;
		popupWindow = window.open(URL,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width=216,height=400');
		popupWindow.focus();
	}
	
	function ShowLinkPopup(URL) 
	{
		var popupWindow;
		popupWindow = window.open(URL,'popupWindow','toolbar=yes,location=yes,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width=750,height=620');
		popupWindow.focus();
	}
	
	function ShowFullBrowserPopup(URL) 
	{
		var popupWindow;
		popupWindow = window.open(URL,'popupWindow','toolbar=yes,location=yes,directories=no,status=no,menubar=yes,resizable=yes,scrollbars=yes,width=750,height=620');
		popupWindow.focus();
	}
	
	function LoadTop()
    {
		if (parent.frames[1])
			parent.location = self.location.href;
    }
    
 	function LoadIntoFrameStructure(target)
    {
		// Check if referrer is CUS search engine; if not (aka is outside search engine), proceed
			var str = document.referrer;
			if (str.indexOf("search.atomz.com") == -1)
			{
				// Check if current page loaded at top level OR if its parent loaded at top level (index.asp - 2-framed)
					if (self.location == top.location || window.parent.location == top.location)
					top.location = "http://www.cus.wayne.edu/select.asp?target=" + target;
			}
    }
    
	function openNewWindow(URL, name) 
    {
		var popupWindow;
        window.open(URL,name,'toolbar=yes,location=yes,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width=600,height=600');
		popupWindow.focus();
    }   