if(window.event + "" == "undefined") event = null;
function showMenu(){return false};
function mout(){return false};
function dummyObject() {this.mout=mout};
oM = new dummyObject();

// CALL TO CORRECT DIRECTORY BELOW
var imgdir = "../images/";
var sitedir = "";
var securedir = "";
var homedir = "../";
if(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}
else if(window.absolutepage)
{
imgdir="http://www.prosperitybankva.com/images/"
sitedir="http://www.prosperitybankva.com/site/"
securedir="http://www.prosperitybankva.com/site/"
homedir="http://www.prosperitybankva.com/"
}
else if(window.securepage)
{
imgdir="https://www.prosperitybankva.com/images/"
sitedir="http://www.prosperitybankva.com/site/"
securedir="https://www.prosperitybankva.com/site/"
homedir="http://www.prosperitybankva.com/"
}
// CALL TO CORRECT DIRECTORY ABOVE

// ROLLOVER CODE BELOW
function makeNavImage(name,width,height){
this.name_on="nav-" + name +"-on.gif";
this.name_off="nav-" + name +"-off.gif";
this.width=width;
this.height=height;
this.newimage_on = new Image(width,height);
this.newimage_on.src = imgdir + this.name_on;
this.newimage_off = new Image(width,height);
this.newimage_off.src = imgdir + this.name_off;
}

var nav_widths=178;
var nav_heights=23;

var navitems = new Array();
navitems["personal"] = new makeNavImage("personal",159,18);
navitems["business"] = new makeNavImage("business",159,18);
navitems["online"] = new makeNavImage("online",159,18);
navitems["mortgages"] = new makeNavImage("mortgages",159,18);
navitems["investments"] = new makeNavImage("investments",159,18);
navitems["insurance"] = new makeNavImage("insurance",159,18);
navitems["creditcards"] = new makeNavImage("creditcards",159,18);
navitems["infocenter"] = new makeNavImage("infocenter",159,18);
navitems["healthsavings"] = new makeNavImage("healthsavings",159,18);
navitems["sir"] = new makeNavImage("sir",159,30);
navitems["security"] = new makeNavImage("security",159,18);
navitems["fraud"] = new makeNavImage("fraud",159,18);
navitems["home"] = new makeNavImage("home",42,17);
navitems["about"] = new makeNavImage("about",56,17);
navitems["contact"] = new makeNavImage("contact",66,17);
navitems["sitemap"] = new makeNavImage("sitemap",55,17);
navitems["terms"] = new makeNavImage("terms",74,30);
navitems["privacy"] = new makeNavImage("privacy",76,30);
navitems["one"] = new makeNavImage("1",23,34);
navitems["two"] = new makeNavImage("2",23,30);
navitems["three"] = new makeNavImage("3",23,32);
navitems["collegewatch"] = new makeNavImage("collegewatch", 159, 30);

function img_act(imgName){
document[imgName].src = navitems[imgName].newimage_on.src;
}

function img_inact(imgName){
window.status = "";
document[imgName].src = navitems[imgName].newimage_off.src;
}
// ROLLOVER CODE ABOVE

// OTHER FUNCTIONS BELOW
function openWin(url,name,width,height,options){
var n = name;
var w = width;
var h = height;
var o = options;
n = (n==null)?"_blank":n;
w = (isNaN(w) || w==null)?700:w;
h = (isNaN(h) || h==null)?600:h;
o = (o==null)?"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1":(o.indexOf(",")!=0)?","+o:o;

var posX = Math.ceil((parseInt(screen.width) - w) / 2);
var posY = Math.ceil((parseInt(screen.height) - h) / 2);
aWindow = window.open(url,n,"width=" + w + ",height=" + h + ",left=" + posX + ",top=" + posY + o);
}

function open_apps(nameofapp){
self.location.href = "https://www.www.prosperitybankva.com.com/Forms/OnlineForm.cgi?onweb=true&form=" + nameofapp;
}

function openIB(page){
if (page=="demo") self.location.href = homedir+"index.html?demo";
else self.location.href = homedir+"index.html";
//if (page=="demo") openWin("https://www.www.prosperitybankva.com.com/onlineserv/HB/demo.html");
//else openWin("https://www.prosperitybankva.com/onlineserv/HB/")
}

function showWarning(url){
var content = new Array();
var index = 0;
content[index++] = "<div align='center'><h3 style='margin-top: 2px;'>Third Party Site Disclaimer</h3>By accessing the noted link you will be leaving your Prosperity Bank &amp; Trust Company's website and entering a website hosted by another party. Prosperity Bank &amp; Trust Company has not approved this as a reliable partner site.  Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of Prosperity Bank &amp; Trust Company's website. We encourage you to read and evaluate the privacy and security policies of the site you are entering, which may be different than those of Prosperity Bank &amp; Trust Company's.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href='javascript:window.location=\""+url+"\";'>Continue</a>&nbsp;&nbsp;&nbsp;<a href=\"javascript:void('0');\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Decline</a></div></div>";	
document.getElementById("ex_dis").innerHTML = content.join("");
document.getElementById("ex_dis").style.display = "block";
scrollTo(0, 0);
}


function showMail(url){
var content = new Array();
var index = 0;
content[index++] = "<div align='center'><h3 align='center'>Please Note</h3>This is <strong>NOT</strong> secure e-mail, do not send personal/financial information. ";
content[index++] = "<br /><br />";
content[index++] = "<div align=\"center\"><a href='"+url+"' onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Continue</a>&nbsp;&nbsp;&nbsp;<a href=\"javascript:void('0');\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Decline</a></div></div>";	
document.getElementById("ex_dis").innerHTML = content.join("");
document.getElementById("ex_dis").style.display = "block";
scrollTo(0, 0);
}


function showCalc(calc)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 275)
var pHeight = (((parseInt(screen.height) / 2)) -240)
window.open(calc,"hello","width=550,height=480,left=" + pWidth + ",top=" + pHeight + ",resizable=1,scrollbars=1");

}


function showMap(name,map){
var content = new Array();
var index = 0;
content[index++] = "<h3 align='center'>"+name+"</h3><img src='../images/" + map +"' /><br /><br />";
content[index++] = "<div align=\"center\"><a href=\"javascript:void('0');\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Close</a></div>";	
document.getElementById("ex_dis").innerHTML = content.join("");
document.getElementById("ex_dis").style.display = "block";
scrollTo(0, 0);
}

 function showMFAPopup(){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<span class="pageheader">ENHANCED LOGIN SECURITY</span><br /><br /><a href="'+sitedir+'faq-mfa-personal.html" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Personal Internet Banking</a><br /><br /><a href="'+sitedir+'faq-mfa-business.html" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Business Internet Banking</a>';
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">close</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.display = "block";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}


document.write('<div id="ex_dis" style="background-color: #FFF; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #174674; text-align: left; position:absolute; top:125px; left:300px; border: medium solid #57746E; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');
// OTHER FUNCTIONS ABOVE

// OTHER FUNCTIONS ABOVE