window.onerror = function(){ return true; }


if(window.event + "" == "undefined") event = null;
function showMenu(){return false};
function mout(){return false};
function dummyObject() {this.mout=mout};
oM = new dummyObject();




var imgdir = "diFiles/skins/default/images/";


function wcInternalPopup(url, height, width){
    var wide=width;
    var tall=height;
    var halfwide = (wide/2);
    var halftall = (tall/2);
    var pWidth = ( ((parseInt(screen.width) / 2)) - halfwide);
    var pHeight = (((parseInt(screen.height) / 2)) - halftall);
    var features = 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+wide+',height='+tall+',top='+pHeight+',left='+pWidth;
    window.open(url,'internalpopup',features);
} 

function wcPopup(url, height, width, disclaimer){
    var wide=width;
    var tall=height;
    var halfwide = (wide/2);
    var halftall = (tall/2);
    var pWidth = ( ((parseInt(screen.width) / 2)) - halfwide);
    var pHeight = (((parseInt(screen.height) / 2)) - halftall);
    var features = 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width='+wide+',height='+tall+',top='+pHeight+',left='+pWidth;
    window.open(url,'externalpopup',features);
} 


function openPage(page)
{
bWindow = window.open(page,'newWin');
	bWindow = null;
	return;
}



/************************************************************************************************************
* This function is used in the onclick of the a tag to display the external site warning. 
* @param msg - Integer specifying the which message to display.
* @param lk - The a link object
* Usage: <a href="http://wwww.mysite.com" onclick="return displayThirdPartyAlert(1,this);">My Site</a>
**************************************************************************************************************/
function displayThirdPartyAlert(msg,lk){
	var description = lk.innerHTML;
	if(description.indexOf('alt="') != -1){
		var x = description.indexOf('alt="')+5;
		var temp = description.substring(x);
		description = temp.substring(0,temp.indexOf("\""));
	}
	showWarning(lk.href, description, lk.target, msg)
	return false;
}

/************************************************************************************************************
* This function is used in the href of the a tag to display the external site warning. 
* @param lk - The url of the site to be opened
* @param desc - The description of the site to be opened, i.e. the name of the site.
* @param target - Allows for the window to opened in a new window
* @param msg - Integer specifying the which message to display.
* Usage: <a href="javascript:('http://wwww.mysite.com');">My Site</a>
**************************************************************************************************************/
function showWarning(lk, desc, target, msg){
	desc = (desc) ? desc : "Third Party Site";
	target = (target) ? target : "";
	msg = (msg) ? msg : 0;
	
	var messages = new Array(6);
	messages[0] = '<h3>Third Party Site Disclaimer</h3><br/>You are leaving Harbor National Bank\'s website. Links that may be accessed via <strong>' +desc+ '</strong> are for the convenience of informational purposes only. Any products and services accessed through <strong>'+ lk +'</strong> are not provided or guaranteed by Harbor National Bank. The site you are about to visit may have a privacy policy that is different than Harbor National Bank\'s. Please review their privacy policy. Harbor National Bank does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[1] = '<h3>Third Party Site Disclaimer</h3><br/>You are leaving Harbor National Bank\'s website. Links that may be accessed via <strong>' +desc+ '</strong> are for the convenience of informational purposes only. Any products and services accessed through <strong>'+ lk +'</strong> are not provided or guaranteed by Harbor National Bank. The site you are about to visit may have a privacy policy that is different than Harbor National Bank\'s. Please review their privacy policy. Harbor National Bank does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[2] = '<h3>Non-Secure Email Disclaimer</h3><br/>As a convenience to you and to provide additional means of communications between you and Harbor National Bank, you can use electronic mail (e-mail) to contact the bank regarding general inquiries and general access and maintenance issues. However communication via e-mail is not considered secure, and you agree that you will not use e-mail to transmit sensitive and/or confidential information such as account numbers, user IDs, or PINs, or to request or authorize any financial transaction.';
	
	messages[3] = '<h3>Third Party Site Disclaimer</h3><br/>You are leaving Harbor National Bank\'s website. Links that may be accessed via <strong>' +desc+ '</strong> are for the convenience of informational purposes only. Any products and services accessed through <strong>'+ lk +'</strong> are not provided or guaranteed by Harbor National Bank. The site you are about to visit may have a privacy policy that is different than Harbor National Bank\'s. Please review their privacy policy. Harbor National Bank does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[4] = '<h3>Third Party Site Disclaimer</h3><br/>You are leaving Harbor National Bank\'s website. Links that may be accessed via <strong>' +desc+ '</strong> are for the convenience of informational purposes only. Any products and services accessed through <strong>'+ lk +'</strong> are not provided or guaranteed by Harbor National Bank. The site you are about to visit may have a privacy policy that is different than Harbor National Bank\'s. Please review their privacy policy. Harbor National Bank does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[5] = '<h3>Third Party Site Disclaimer</h3><br/>You are leaving Harbor National Bank\'s website. Links that may be accessed via <strong>' +desc+ '</strong> are for the convenience of informational purposes only. Any products and services accessed through <strong>'+ lk +'</strong> are not provided or guaranteed by Harbor National Bank. The site you are about to visit may have a privacy policy that is different than Harbor National Bank\'s. Please review their privacy policy. Harbor National Bank does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';

	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="'+lk+'" target="'+target+'" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&#160;&#160;<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 openIB(){
    showMessage();
}

function show_warning(url){
var content = new Array();
var index = 0;
content[index++] = "<h3>Third Party Site Disclaimer</h3><br/>You are leaving Harbor National Bank\'s website. Links that may be accessed via Third Party Site are for the convenience of informational purposes only. Any products and services accessed through this site are not provided or guaranteed by Harbor National Bank. The site you are about to visit may have a privacy policy that is different than Harbor National Bank\'s. Please review their privacy policy. Harbor National Bank does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href=\""+url+"\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Continue</a>  <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 openMFADemo(mfa_file)
{
    var mfa_url_string = "http://www.harborbankgroup.com/mstinc/MFA/mfa_main_" + mfa_file + ".html";
    wcInternalPopup(mfa_url_string, 485, 800);
}

function writeDate (){

	var myDate = new Date();
	var month = myDate.getMonth();
	var date = myDate.getDate();
	var year = "";

	if (document.all)
		{
		year = myDate.getYear();
		}
	else
		{
		year =myDate.getYear() + 1900;
		}	

	var months = new Array ("January", "February","March", "April", "May", "June", "July", "August", "September", "October", "November", "December");


	alert (days[day] + ", " + months[month] + " " + date + ",  " + year);
	var finalDate = (months[month] + " " + date + ",  " + year);

	document.write (finalDate);

	}

function email_warning(url){
    url = "mailto:"+url;
   //content creation
   var content = new Array();
          var index = 0;
   content[index++] = '<h3>E-mail Disclaimer</h3><br />WARNING: E-mail is an unsecure method of communication.  Any information contained in your message could be viewed by a third party.  Sensitive information such as passwords or social security numbers should be omitted from e-mail messages.';
   content[index++] = '<br /><br /><br />';
   content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="window.open(\''+url+'\');document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&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);
}
  
document.write('<div id="ex_dis" style="background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; text-align: left; position:absolute; top:125px; left:300px; border: 1px solid #7494bd; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');

//end of file