// 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 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 LoadPremiere() 
			{
				var AnimeWindow;
				AnimeWindow = window.open('images/splashpage/PremiereSlideShow.swf','slideshowWindow', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,width=610,height=410');
				gameWindow.focus();
				AnimeWindow.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;
			}
    }
