	//Project #741 - Javascript removal. Functions from LinkScripts.inc and PopupScripts.inc are placed here.
	
	function Calc(SCalcType)
		{
			location.href = "http://" + gsApplAllstate + "/includes/extLinksRedirect.asp?extLink=" + SCalcType;
		}
               
        function RecordDisplay(sAdId) {
                document.write('<IMG SRC=' + GetURL("", "d", sAdId) + ' height=1 width=1>');
                return true;
        }
        
        function RecordDisplayExt(sAdId, sAddInfo) {
                document.write('<IMG SRC=' + GetURLExt("", "d", sAdId, sAddInfo) + ' height=1 width=1>');
                return true;
        }
	
	function PopupWindow(sURL)
		{
		window.open(   sURL,
				'Allstate','width=436,height=442,toolbar=0,location=0,directories=0,status=1,menuBar=0,scrollBars=1,resizeable=0' );	

		}

	function PopupWindowLarge(sURL)
		{
		window.open(   sURL,
				'Allstate',
				'width=436,height=442,toolbar=0,location=0,directories=0,status=1,menuBar=0,scrollBars=1,resizeable=0' );	

		}
		

	function Link(sURL)
	{
		window.location.href = 'PageRender.asp?page=' + sURL;
	}

	function LinkToFolder(sURL)
	{
		window.location.href = '' + sURL + '/';
	}
	
	function FooterLinkToFile(sdomain,sURL)
	{
		
		window.location.href = 'http://' + sdomain + sURL + '';
	}
	
	function LinkToFile(sURL)
	{
		window.location.href = '' + sURL + '';
	}
	
	function LinkToFolderFile(sFolder,sFile)
	{
		window.location.href = '' + sFolder + '/' + 'PageRender.asp?page=' + sFile;
	}
	
	
	function AdWindow(url) 
	{
		
	    agent = navigator.userAgent;
	    windowName = "AllstateTVAds";
		
	    params  = "";
	    params += "toolbar=1,";
	    params += "location=0,";
	    params += "directories=0,";
	    params += "status=0,";
	    params += "menubar=0,";
	    params += "scrollbars=0,";
	    params += "resizable=0,";
	    params += "width=420,";
	    params += "height=350";
		
		if ((agent.indexOf("AOL") != -1) && ((agent.indexOf("Windows 98") != -1) || (agent.indexOf("Windows 95") != -1)))
		{
			window.open(url, windowName , params);
		} 
		else
		{
			var win = open(url, windowName , params);
			if (win)
			{
				win.focus();
			}
		}
	}