//Logon script for Business
var logonURL = new Array();	//logon URLS business
	logonURL[0] = "JavaScript:void(window.location='https://' + self.location.host + '/IBWS/Redirector.do', '', 'scrollbars=yes,menubar=yes,location=yes,resizable=1,copyhistory=1,width=750,height=550');"
	logonURL[1] = "JavaScript:void(window.open('http://www.onlinecashmanagement.com', '', 'scrollbars=yes,menubar=yes,toolbar=yes,resizable=1,copyhistory=1,width=750,height=550'));"
	logonURL[2] = "JavaScript:void(window.open('https://www.firstinfocenter.com', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550'));"
	logonURL[3] = "JavaScript:showLinkDisclosure('https://www.1sttools.com/loginout/login.asp', 'FirstTools');"
	logonURL[4] = "JavaScript:void(window.open('https://www.fnni-online.com/IBWS/Redirector.do', '', 'scrollbars=yes,menubar=yes,status=yes,toolbar=yes,location=yes,resizable=1,copyhistory=1,width=780,height=550'));"
	logonURL[5] = "JavaScript:void(window.open('https://www.merchantsummary.com/fnmsonline/fnms_ms_login.asp', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550'));"
	logonURL[6] = "JavaScript:void(window.location='https://' + self.location.host + '/fnb/personal/depositproducts/savings/firsthealthsavings/choice.asp', '', 'scrollbars=yes,menubar=yes,location=yes,resizable=1,copyhistory=1,width=750,height=550');"
	logonURL[7] = "JavaScript:void(window.open('/common/js/firstnational/disclosures/intraderonline_disclosure.html', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=515,height=320'));"
	logonURL[8] = "JavaScript:void(window.open('https://www.investmentgoldonline.com/default.asp', '', 'scrollbars=yes,menubar=yes,status=yes,toolbar=yes,location=yes,resizable=1,copyhistory=1,width=750,height=550'));"
	logonURL[9] = "JavaScript:void(window.open('http://www.firstnationalinvestmentsandplanning.com/home/default.asp', '', 'scrollbars=yes,menubar=yes,status=yes,toolbar=yes,location=yes,resizable=1,copyhistory=1,width=750,height=550'));"
	logonURL[10] = "JavaScript:void(window.location='https://' + self.location.host + '/iwsOnline/public/authenticate/logonPage.do', '', 'scrollbars=yes,menubar=yes,location=yes,resizable=1,copyhistory=1,width=750,height=550');"
	logonURL[12] = "JavaScript:void(window.open('https://www.account3000.com/trust/', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550'));"
	logonURL[13] = "JavaScript:void(window.open('/common/js/firstnational/disclosures/treasurylink_disclosure.html', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=515,height=320'));"
	logonURL[14] = "JavaScript:void(window.open('https://receipts.fnbomaha.com/CBXOnline/Scripts/DailyDeposits.asp', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550'));"
	
var enrollURL = new Array();//Enroll URLS business
	enrollURL[0] =  "JavaScript:void(window.location='https://' + self.location.host + '/IBWS/enrollNew.do', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550');"
	enrollURL[4] = "JavaScript:void(window.open('https://www.fnni-online.com/IBWS/enrollNew.do', '', 'scrollbars=yes,menubar=yes,status=yes,toolbar=yes,location=yes,resizable=1,copyhistory=1,width=780,height=550'));"
	enrollURL[5] = "JavaScript:void(window.open('/common/js/firstnational/disclosures/fnmsenroll_disclosure.html', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=515,height=320'));"
	enrollURL[10] = "JavaScript:void(window.location='https://' + self.location.host + '/iwsOnline/public/preauth/accountInfoPage.do', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550');"

var demoURL = new Array();//Demo URLS business
	demoURL[0] = "JavaScript:void(window.location='https://' + self.location.host + '/IBWS/demo.do', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550');"
	demoURL[1] = "JavaScript:void(window.open('http://' + self.location.host + '/common/wcm_demo/startCRM.htm', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550'));"
	demoURL[4] = "JavaScript:void(window.open('https://www.fnni-online.com/IBWS/demo.do', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550'));"
	demoURL[10] = "JavaScript:void(window.location='http://' + self.location.host + '/common/demo/default.htm', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550');"
	demoURL[14] = "JavaScript:void(window.open('https://receipts.fnbomaha.com/demo/welcome_demo.html', '', 'scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=750,height=550'));"

/*var enrollURL = new Array();//Enroll URLS retail
	enrollURL[0] = "JavaScript:void(window.location='https://' + self.location.host + '/IBWS/enrollNew.do"
	enrollURL[1] = "JavaScript:void(window.open('https://www.investmentone.com/applications/e_primevest.asp', '', 'scrollbars=yes,status=yes,toolbar=yes,menubar=yes,resizable=1,copyhistory=1,width=790,height=600'));"
*/
	
if (document.images) {
	democ_on = new Image();		democ_on.src = "/config/html/en/theme/btn_demo_tan.gif";
	democ_off = new Image();	democ_off.src = "/config/html/en/theme/btn_demo_tan_off.gif";
	enrollc_on = new Image();	enrollc_on.src = "/config/html/en/theme/btn_enroll_tan.gif";
	enrollc_off = new Image();	enrollc_off.src = "/config/html/en/theme/btn_enroll_tan_off.gif";
	logonc_on = new Image();	logonc_on.src = "/config/html/en/theme/btn_logon_tan.gif";
	logonc_off = new Image();	logonc_off.src = "/config/html/en/theme/btn_logon_tan_off.gif";
	
	demosb_on = new Image();	demosb_on.src = "/config/html/en/theme/btn_demo_green.gif";
	demosb_off = new Image();	demosb_off.src = "/config/html/en/theme/btn_demo_green_off.gif";
	enrollsb_on = new Image();	enrollsb_on.src = "/config/html/en/theme/btn_enroll_green.gif";
	enrollsb_off = new Image();	enrollsb_off.src = "/config/html/en/theme/btn_enroll_green_off.gif";
	logonsb_on = new Image();	logonsb_on.src = "/config/html/en/theme/btn_logon_green.gif";
	logonsb_off = new Image();	logonsb_off.src = "/config/html/en/theme/btn_logon_green_off.gif";
	
	demop_on = new Image();		demop_on.src = "/config/html/en/theme/btn_demo_blue.gif";
	demop_off = new Image();	demop_off.src = "/config/html/en/theme/btn_demo_blue_off.gif";
	enrollp_on = new Image();	enrollp_on.src = "/config/html/en/theme/btn_enroll_blue.gif";
	enrollp_off = new Image();	enrollp_off.src = "/config/html/en/theme/btn_enroll_blue_off.gif";
	logonp_on = new Image();	logonp_on.src = "/config/html/en/theme/btn_logon_blue.gif";
	logonp_off = new Image();	logonp_off.src = "/config/html/en/theme/btn_logon_blue_off.gif";
}
	
function buttonState(obj, name, customerType) {
	var index = obj.options[obj.selectedIndex].value;
	var suffix = "_on.src";
	var button;

	switch( name ) {
		case "demo" + customerType:
			button = demoURL[index]
			break;
		case "enroll" + customerType:
			button = enrollURL[index]
			break;
		case "logon" + customerType:
			button = logonURL[index]
			break;
	}
	if ( button == null ) {
		suffix =  "_off.src";
	}
	document[name].src = eval(name + suffix);
}

function buttonPressed(obj, name) {
	var index = obj.options[obj.selectedIndex].value;
	var documentlocation;
	
	switch( name ) {
		case "demo":
			documentlocation = demoURL[index]
			break;
		case "enroll":
			documentlocation = enrollURL[index]
			break;
		case "logon":
			documentlocation = logonURL[index]
			break;
	}
	if (documentlocation == null) {
		documentlocation = "#";
	}
	window.location = documentlocation	
}

function popup(me){
window.open(me,"popup")
}

function init() {
	demoVisr(document.form1.select);
	enrollVisr(document.form1.select);
	logonVisr(document.form1.select);
	demoVisb(document.form1.select2);
	enrollVisb(document.form1.select2);
	logonVisb(document.form1.select2);
	demoVisb(document.form1.selectc);
	enrollVisb(document.form1.selectc);
	logonVisb(document.form1.selectc);
	demoVisb(document.form1.selectsb);
	enrollVisb(document.form1.selectsb);
	logonVisb(document.form1.selectsb);
	
}
function submitForm(){
	document.form.submit();
}

//Common Logon Stuff
function popupWin(location, name) {
	open (location,name,"scrollbars=yes,menubar=no,resizable=1,copyhistory=0,height=550,width=750");
}

if ( top.location != self.location ) {
	top.location=self.location;
}

if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion.charAt(0)) < 5)) { 
	document.captureEvents(Event.KEYPRESS);
	document.onkeypress = forceAlphaNumeric;
}