﻿// JScript File



function Close()
{
    $find('mdlPopup').hide();
               
}

function Navigate(mdlNav)
{
    window.location = mdlNav;           
}

function pageLoad(sender, args){
        if(!args.get_isPartialLoad()){
            //  add our handler to the document's
            //  keydown event
            $addHandler(document, "keydown", onKeyDown);
            
        }
    }

function onKeyDown(e){
    if(e && e.keyCode == Sys.UI.Key.esc){
        // if the key pressed is the escape key, dismiss the dialog
        $find('mdlPopup').hide();
    }
}


function confirmationWindow(url, win, w, h)
{
    var ModalText = "We are providing this link to a site outside the control of Panhandle State Bank or its locally operated divisions to alert you to products, information and/or services offered by third parties. Provided links are meant to supplement PSB products, services or information or provide other information we believe may be of interest to you. Although we will only provide links to sites we believe are reputable, we do not make any representations concerning the linked sites' contents or availability. Please note that linked sites may have different privacy and information security policies than PSB. You should review each site's privacy and information security policies carefully before you enter confidential information onto a site.";
    var result = confirm(ModalText);
    
    if(result)
    {
     var myWin = window.open(url,win,'width=' + w  + ', height=' + h + ',resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes');
     myWin.focus();
    }
    else
    {

    }

}

function popWindow(url, win, w, h)
{
     var myWin = window.open(url,win,'width=' + w  + ', height=' + h + ',resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes');
     myWin.focus();
}