
var Disclaimer =
{
    destination: null,
    declineURL: null,
    
    Accept: function()
    {
        $("speed-bump").style.display = "none";
        if(this.destination != null)
        {
            window.location = this.destination;
        }
    },
    
    AcceptScholarChoice: function()
    {
        $("speed-bumpSC").style.display = "none";
        
        if(this.destination != null)
        {
          var newWindow = window.open(this.destination, '_blank');
          newWindow.focus();
        }
    },
    
    Decline: function()
    {
       
       $("speed-bump").style.display = "none";
        if(this.declineURL != null)
        {             
            window.location = this.declineURL;
        }
         
    },
    
    Show: function(destination,declineURL)
    {
 
        this.destination = destination;
        this.declineURL = declineURL;
        var layer = $("speed-bump");
        var bump = $$("#speed-bump .window")[0];
        $$("#speed-bump .shade")[0].setOpacity(0.5);
        layer.style.height = $(document.body).getSize().size.y + "px";
        bump.style.top = Window.getScrollTop() + 145 + "px";
        layer.style.display = "block";
    },
    
    ShowScholarChoice: function(destination,declineURL)
    {
        this.destination = destination;
        this.declineURL = declineURL;
        var layer = $("speed-bumpSC");
        var bump = $$("#speed-bumpSC .window")[0];
        $$("#speed-bumpSC .shade")[0].setOpacity(0.5);
        layer.style.height = $(document.body).getSize().size.y + "px";
        bump.style.top = Window.getScrollTop() + 145 + "px";
        layer.style.display = "block";
    }        
};