<!--//
var thisUrl = location.href;
thisUrl = thisUrl.toLowerCase();
servername = thisUrl.substr(thisUrl.indexOf('//')+2,thisUrl.indexOf('/',thisUrl.indexOf('//')+2)-(thisUrl.indexOf('//')+2));
if (servername == '') servername = "localhost";
var App_IE4 = document.all ? 1:0;
var App_NS4 = document.layers ? 1:0;
var App_NS6 = document.getElementById&&!document.all ? 1:0;
var App_BrowserOK = (App_IE4||App_NS6) ? 1:0;

function init() {
	initRollover();
}
function initRollover() {
	if (!document.getElementById) return;
	var imgOriginSrc;
	var imgTemp = new Array();
	var imgarr = document.getElementsByTagName('img');
	for (var i = 0; i < imgarr.length; i++) {
		if (imgarr[i].getAttribute('hsrc')) {
			imgTemp[i] = new Image();
			imgTemp[i].src = imgarr[i].getAttribute('hsrc');
			imgarr[i].onmouseover = function() {
				imgOriginSrc = this.getAttribute('src');
				this.setAttribute('src',this.getAttribute('hsrc'));
			}
			imgarr[i].onmouseout = function() {
				this.setAttribute('src',imgOriginSrc);
			}
		}
		if (imgarr[i].getAttribute('asrc')&&imgarr[i].getAttribute('asrc')) {
			imgTemp[i] = new Image();
			imgTemp[i].src = imgarr[i].getAttribute('asrc');		
			imgarr[i].onmouseover = function() {
				imgOriginSrc = this.getAttribute('src');
				imgControl = document.getElementById(this.getAttribute('img'));				
				imgCurrent = document.getElementById(imgControl.getAttribute('img'));				
				imgCurrent.setAttribute('src',imgCurrent.getAttribute('isrc'));
				this.setAttribute('src',this.getAttribute('asrc'));
				imgControl.setAttribute('src',this.getAttribute('imgsrc'));
				imgControl.setAttribute('img',this.id);
			}
		}
	}
}
function appPopup(pUrl,pName,w,h,scroll) {
	var settings = 'height='+h+',width='+w+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',scrollbars='+scroll+',resizable=yes';
	var win=window.open(pUrl,pName,settings);
	if(parseInt(navigator.appVersion)>=4) win.window.focus();
}
function agentLoginHome(){
	//var name2 = document.forms[0].username.value;
	document.forms[0].username.value = document.forms[0].username2_text.value;
	document.forms[0].p.value = document.forms[0].password2_text.value;
	var name = document.forms[0].username.value;
	var pwd = document.forms[0].p.value;
	if(name!=''&&pwd!=''){
		document.forms[0].action = 'https://secure.financepro.net/financepro/default.aspx';	          
		document.forms[0].__VIEWSTATE.name = '';
		document.forms[0].submit();
	}else{
	    alert('Username and password must be specified!');
	    document.forms[0].username.value = '';
	    document.forms[0].username2_text.value = '';
	    document.forms[0].password2_text.value = '';
	    document.forms[0].p.value = '';		
	}
}
function agentLogin(){
	//var name2 = document.forms[0].username.value;
	document.forms[0].username.value = document.forms[0].ctl00_Logins1_username2_text.value;
	document.forms[0].p.value = document.forms[0].ctl00_Logins1_password2_text.value;
	var name = document.forms[0].username.value;
	var pwd = document.forms[0].p.value;
	if(name!=''&&pwd!=''){
		document.forms[0].action = 'https://secure.financepro.net/financepro/default.aspx';	          
		document.forms[0].__VIEWSTATE.name = '';
		document.forms[0].submit();
	}else{
	    alert('Username and password must be specified!');
	    document.forms[0].username.value = '';
	    document.forms[0].p.value = '';
		
	}
}
function insuredLogin(){
	
	document.forms[0].acctnumber.value = document.forms[0].ctl00_Logins1_acctnumber2_text.value;
	document.forms[0].zipcode.value = document.forms[0].ctl00_Logins1_zipcode2_text.value;
	var acct = document.forms[0].acctnumber.value;
	var zip = document.forms[0].zipcode.value;
	if(acct!=''&&zip!=''){
		document.forms[0].action = 'https://secure.financepro.net/financepro/default.aspx';
		//document.forms[0].action = 'https://secure.financepro.net/financepro/status/default.aspx';
		//document.forms[0].action = 'https://secure.financepro.net/financepro/status/logon.asp';
		document.forms[0].company.value = 'pronote';
		document.forms[0].__VIEWSTATE.name = '';
		document.forms[0].submit();
	}else{
	    alert('Account number and zipcode must be specified!');
	    document.forms[0].zipcode.value = '';
	    document.forms[0].acctnumber.value = '';
		
	}    
}
function insuredLoginHome(){
	
	document.forms[0].acctnumber.value = document.forms[0].acctnumber2_text.value;
	document.forms[0].zipcode.value = document.forms[0].zipcode2_text.value;
	var acct = document.forms[0].acctnumber.value;
	var zip = document.forms[0].zipcode.value;
	if(acct!=''&&zip!=''){
		document.forms[0].action = 'https://secure.financepro.net/financepro/default.aspx';
		//document.forms[0].action = 'https://secure.financepro.net/financepro/status/default.aspx';
		//document.forms[0].action = 'https://secure.financepro.net/financepro/status/logon.asp';
		document.forms[0].company.value = 'pronote';
		document.forms[0].__VIEWSTATE.name = '';
		document.forms[0].submit();
	}else{
	    alert('Account number and zipcode must be specified!');
	    document.forms[0].zipcode.value = '';
	    document.forms[0].acctnumber.value = '';
	    document.forms[0].acctnumber2_text.value = '';
	    document.forms[0].zipcode2_text.value = '';
	    
		
	}    
}
function launchPayment(){
	document.forms[0].action = 'https://epay.amegybank.com/SOPP/Payment.aspx';
	document.forms[0].name = 'Form2';
	document.forms[0].__VIEWSTATE.name = '';
	document.forms[0].merch.value = 'PRON1000';
	document.forms[0].ref.value = 'auto_sequence';
	document.forms[0].submit();
}
function launchDDebit(){
	appPopup('../data/download/pronote.ddrequest.pdf','download',800,600,1);
}
onload=init;
//-->