confirmation
function epage() {
	//var answer = confirm("By clicking the 'ok' button below, you will be re-directed to a website powered by FIS, a company used Centennial Bank. FIS  will collect your opt in or opt out data and communicate your election back to us. FIS has it's own privacy and security policies.")
	//if (answer){
		window.location = "http://www.my100bank.com/regulation-e";
	//}
	//else{
	//	var a=0
	//}
}

function confirmation() {
	var answer = confirm("By clicking the 'ok' button below, you will be re-directed to a website powered by FIS, a company used Centennial Bank. FIS  will collect your opt in or opt out data and communicate your election back to us. FIS has it's own privacy and security policies.")
	if (answer){
		window.location = "http://survey.my-msi.com/fsbhome";
	}
	else{
		var a=0
	}
}





var wmessage = "Centennial Bank has no control over information at any site hyperlinked\n";
  wmessage += "to from this Site. Centennial Bank makes no representation concerning\n";
  wmessage += "and is not responsible for the quality, content, nature, or reliability\n";
  wmessage += "of any hyperlinked site and is providing this hyperlink to you only as a\n";
  wmessage += "convenience. The inclusion of any hyperlink does not imply any endorsement,\n";
  wmessage += "investigation, verification or monitoring by Centennial Bank of any\n";
  wmessage += "information in any hyperlinked site. In no event shall Centennial Bank\n";
  wmessage += "be responsible for your use of a hyperlinked site.";
  
var wmessage = "By clicking the OK Button, you will be re-directed to a new website.  The\n";
  wmessage += "site to which you will be connected has its own security and privacy policies\n";
  wmessage += "and may provide less security than the current site.  Centennial Bank has no\n";
  wmessage += "control over, and takes no responsibility for the content or performance of any\n";
  wmessage += "linked site.";
  
var emessage = "Because there is a small risk that information transmitted via Internet email\n";
  emessage += "could fall into the wrong hands; we suggest that confidential information,\n";
  emessage += "such as account numbers or social security numbers, not be transmitted\n";
  emessage += "via email.  Instead please feel free to contact us at your nearest bank\n";
  emessage += "branch.";
  
function popup(src, name, width, height) {
  window.open(src,name,"menubar=no,width="+width+",height="+height+",toolbar=no");
}

function activateTab(id) {
  var tabCount = 3;
  
  for($i = 1; $i <= tabCount; $i++) {
    $('tab'+$i).removeClassName("active");
  }
  
  for($i = 1; $i <= tabCount; $i++) {
    $('table'+$i).hide();
  }
  
  $('tab'+id).addClassName("active");
  $('table'+id).show();
  
}

function openExternal(url) {
  //var url = obj.getAttribute("href");  
  
  if(confirm(wmessage)) {
    window.open(url);
  }
}

function openLink(url) {
  //var url = obj.getAttribute("href");  
  
  window.location = url;
}

function openEmail(url) {
  //var url = obj.getAttribute("href");  
  
  if(confirm(emessage)) {
    window.open(url);
  }
}

function externalLinks() {
  var alerted = false;
  if (!document.getElementsByTagName) return;
  var anchors = document.getElementsByTagName("a");
  //alert(document.getElementById("billpay-link").getAttribute("href"));
  for (var i=0; i<anchors.length; i++) {
    var anchor = anchors[i];
    if(!alerted && i==47) {
      //alert(anchor.getAttribute("href") + '-' + anchor.getAttribute("className"));
      //alerted = true;
    }
    if (anchor.getAttribute("href") && (anchor.getAttribute("class") == "external" || anchor.getAttribute("className") == "external" )) {
      //anchor.target = "_blank";      
      //anchor.onclick = new Function("openExternal('"+anchor.getAttribute("href")+"'); return false;");
      //anchor.href = "#";
    }
    
    if (anchor.getAttribute("href") && (anchor.getAttribute("class") == "mailto" || anchor.getAttribute("className") == "mailto")) {
      //anchor.target = "_blank";
      anchor.onclick = new Function("openEmail('"+anchor.getAttribute("href")+"'); return false;");
      //anchor.href = "#";
    }
		
		// var href = anchor.getAttribute("href");
		// var ext = href.substr(href.length-4, 4);
		
		// if(ext == '.pdf') {
			// if(href.substr(0,4) != 'http') {
				// href = 'http://www.my100bank.com' + href;
			// }
			// anchor.href = '/doc?file=' + href;
			// anchor.target = "_blank";
		// }
  }
}

// function dropdownLinks() {
//   var alerted = false;
//   if (!document.getElementsByTagName) return;
//   var anchors = document.getElementsByTagName("li");
//   //alert(anchors.length);
//   for (var i=0; i<anchors.length; i++) {
//     var anchor = anchors[i];
//     if(i==10) {
//       //alert(anchor.id);
//     }
//     if (anchor.getAttribute("id") == "/sign-up-for-online-billpay?dropdown=true") {
//       //anchor.target = "_blank";      
//       anchor.onclick = new Function("openExternal('/sign-up-for-online-billpay?dropdown=true'); return false;");
//       //anchor.href = "#";
//     }
//   }
// }

function startup() {
  externalLinks();
}
window.onload = startup;

jQuery(document).ready(function($){
  $('.external').click(function(e){
    e.preventDefault();
    openExternal($(this).attr('href'));    
    return false;
  });
});







