function exitPop() {

this.popup = null;
this.overdiv = null;

this.popOut = function(msgtxt, url, modal) {
        this.overdiv = document.createElement("div");
        this.overdiv.className = "overdiv";

        this.popup = document.createElement("div");
        this.popup.className = "popup";
        
        if(msgtxt == null)
        {
         msgtxt ="You are now leaving the Golf Savings Bank Website. Golf's privacy policy and customer information protection procedures do not apply to the information you are attempting to access, and Golf has no responsibility for its content. Links leading outside Golf's website do not constitute an endorsement of any kind by the bank or its employees.";
        }
        
        if(msgtxt == "mb")
        {
          msgtxt = "You are entering a secured site for Golf Savings Bank and supported by MortgageBot to ensure encryption and protection of data. Before you continue, please take a moment to read the <a href=\"../company_security.htm\" target=\"_blank\" class=\"link2\">Privacy Statement & Disclosures</a> of Golf Savings Bank";
        }
        
        this.popup.Code = this;
                var content = document.createElement("div");
                content.className="pcontent";
                this.popup.appendChild(content);
                
                var msg = document.createElement("div");
                msg.className = "msg";
                msg.innerHTML = msgtxt;
                
        content.appendChild(msg);
        
        var imgdiv = document.createElement("div");
        imgdiv.className="pimg";
        
        content.appendChild(imgdiv);
       
       if(modal)
       {
                
        var okbtn = document.createElement("button");
        okbtn.onclick = function()
        {
           window.open(url);
           this.parentNode.parentNode.Code.popIn();
        }
        okbtn.innerHTML = "OK";
        content.appendChild(okbtn);
        
         var cancelbtn = document.createElement("button");
          cancelbtn.onclick = function() {
               this.parentNode.parentNode.Code.popIn();
          }
            cancelbtn.innerHTML = "Cancel";
         content.appendChild(cancelbtn);
        
        }
        else
        {
           var closebtn = document.createElement("button");
           closebtn.onclick = function() {
              this.parentNode.parentNode.Code.popIn();
           }
                closebtn.innerHTML = "Close";
        content.appendChild(closebtn);
        window.open(url);
        }
                
        document.body.appendChild(this.overdiv);
        document.body.appendChild(this.popup);
}
this.popIn = function() {
        if (this.popup != null) {
                document.body.removeChild(this.popup);
                this.popup = null;
        }
        if (this.overdiv != null) {
                document.body.removeChild(this.overdiv);
                this.overdiv = null;
        }

}
}
