
    var safeExit = false;
    var suppressExitPop = false;
    
    if (document.referrer.substring(0,18) == 'http://www.google.')
    {
        suppressExitPop = true;
    }
    
    function QueueRedirect()
    {
        // double delay allows the browser to do whatever action the user requested
        setTimeout('Redirect()', 100);
    }
    
    function Redirect()
    {
        if (redirectUrl != null)
        {
            window.location = redirectUrl;
        }
    }
    
    function ExitPop()
    {
        if (suppressExitPop == true)
            return;
            
        if (safeExit) {
            safeExit = false;
            return;
        }
        else
        {
            safeExit = true;
            setTimeout('QueueRedirect()', 100);
            return (exitPopText);
        }
    }
    
    window.onbeforeunload = ExitPop;
    
    
    