// 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=800,height=940');
		popupWindow.focus();
	}

	function MM_openBrWindow(theURL, winName, features) { //v2.0
	    window.open(theURL, winName, features);
	}
  
  
  
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
  
	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=650');
		popupWindow.focus();
	}
	
	function LoadTop()
    {
		if (parent.frames[1])
			parent.location = self.location.href;
    }
    
	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();
    }   
    
    
    			function LoadMovie() 
			{
				var movieWindow;
				gameWindow = window.open('movie/film.htm','movieWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,width=644,height=740');
				gameWindow.focus();
			} 
			
   function LoadImage(fullFile) 
	{
		var imgWindow;
		imgWindow = window.open('imgDetail.asp?imgFile=' + fullFile,'imgWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,width=1027,height=781');
		imgWindow.focus();
	} 
    
 	function LoadIntoFrameStructure()
    {
		// Check if current page loaded at top level
			if (self.location == top.location)
				top.location = "http://www.hcporter.com";
	}
    
  	function LoadIntoSectionFrameStructure(target)
    {
		// Check if referrer is HCPorter 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)
					top.location = "http://www.hcporter.com/reload.asp?target=" + target;
			}
    }

