//BEGIN LOGON SCRIPT FOR First National Merchants Solutions
var busURL = new Array();	//logon URLS business
var busURLtarg = new Array();	//Target info
	busURL[0] = "https://www.transactionsummary.com/tsysonline"
	busURL[2] = "http://www.tsysinfocenter.com"
	busURL[3] = "https://www.tsysbilling.com"



var busDemo = new Array();	//Demo URLS business
var busDemoTarg = new Array();
	busDemo[0] = "http://www.tsysmerchantsolutions.com/ms/html/en/products/reporting_options/fnms_online.html"
	
	
var busEnroll = new Array();//Enroll URLS business
var busEnrollTarg = new Array();
	busEnroll[0] =  "https://www.tsysbilling.com/BSS/tools/FNMSEnrollmentLoad.do"
	


if (document.images) {
	demoBon = new Image();		demoBon.src = "/mark/images/nav/demo_off.gif";
	demoBoff = new Image();		demoBoff.src = "/mark/images/nav/demo_dim.gif";
	enrollBon = new Image();	enrollBon.src = "/mark/images/nav/enroll_off.gif";
	enrollBoff = new Image();	enrollBoff.src = "/mark/images/nav/enroll_dim.gif";
	logonBon = new Image();		logonBon.src = "/mark/images/nav/login_off.gif";
	logonBoff = new Image();	logonBoff.src = "/mark/images/nav/login_dim.gif";
	
	
	demoRon = new Image();		demoRon.src = "/mark/images/nav/demo_off.gif";
	demoRoff = new Image();		demoRoff.src = "/mark/images/nav/demo_dim.gif";
	enrollRon = new Image();	enrollRon.src = "/mark/images/nav/enroll_off.gif";
	enrollRoff = new Image();	enrollRoff.src = "/mark/images/nav/enroll_dim.gif";
	logonRon = new Image();		logonRon.src = "/mark/images/nav/login_off.gif";
	logonRoff = new Image();	logonRoff.src = "/mark/images/nav/login_dim.gif";
	}
function imgOff(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "off.src");
	}
}
function imgOn(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "on.src");
	}
}
function demob(me) {
demoVal = document.form1.select2.options[document.form1.select2.selectedIndex].value;
	if (busDemo[demoVal] == null){
	window.location="#";
	} else {
		if (busDemoTarg[demoVal] == "_blank")
			popup(busDemo[demoVal]);
		else
			//location.href=(busDemo[demoVal]);
			me.href=busDemo[demoVal];
	};
}
function enrollb(me) {
enrollVal = document.form1.select2.options[document.form1.select2.selectedIndex].value;
	if (busEnroll[enrollVal] == null){
	window.location="#";
	} else {
		if (busEnrollTarg[enrollVal] == "_blank")
			popup(busEnroll[enrollVal]);
		else
			//location.href=(busEnroll[enrollVal]);
			me.href=busEnroll[enrollVal];
	}
}
function logonb(me) {
loginVal = document.form1.select2.options[document.form1.select2.selectedIndex].value;
	if (busURL[loginVal] == null){
	window.location="#";
	}else{
		if (busURLtarg[loginVal] == "_blank") {
			popup(busURL[loginVal]);
		} else {
			//location.href=(busURL[loginVal]);
			me.href=busURL[loginVal];
		}
	}
}
//////////

function demoVisb(me) {
dvb = me.options[me.selectedIndex].value;
if (busDemo[dvb] == null) {
	imgOff('demoB');
	}else {
	imgOn('demoB');
	}; 
}
function enrollVisb(me) {
evb = me.options[me.selectedIndex].value;
if (busEnroll[evb] == null) {
	imgOff('enrollB');
	}else{
	imgOn('enrollB');
	};
};
function logonVisb(me) {
lvb = me.options[me.selectedIndex].value;
if (busURL[lvb] == null) {
	imgOff('logonB');
	}else{
	imgOn('logonB');
	}; 
};
///////////////

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);
}
function submitForm(){
	document.form.submit();
}
//syncronizes dropdown select with displayed buttons
demoVisb(document.form1.select2);enrollVisb(document.form1.select2);logonVisb(document.form1.select2);

function enrollPop (location) {
	open (location,"", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=700,height=580");
}

function spawnFICdemo()
{
	open ("/mark/misc/FlashDemo/FIC_flashDemo.htm","", "scrollbars=yes,menubar=no,resizable=1,copyhistory=1,width=614,height=452");
}
function demoPop (location) {
	open (location,"", "scrollbars=no,menubar=no,resizable=1,copyhistory=1,width=770,height=575");
}
