var logoandbanner = 1;
var ftu = 1;

// Begin Logo Image
function makeLogo (){
var logo = "<img src='images/logo1.gif' border='0' alt='Logo'>"
return logo
}
//end Logo


//Begin of footer on all htm pages
function makeFooter(){
var footer = "<DIV Class='footer'>"
footer += "<center><a href='#'><img src='images/privacy.gif' onClick=\"window.alert('This function has been disabled in demonstration mode.')\" Border='0' alt='Privacy'></a>"
footer += "<a href='#'><img src='images/big3.gif' onClick=\"window.alert('This function has been disabled in demonstration mode.')\" Border='0' alt='Big3'></a>"
footer += "<a href='#'><img src='images/security.gif' onClick=\"window.alert('This function has been disabled in demonstration mode.')\" Border='0' alt='Security'></a>"
footer += "</DIV></center><p><font face=Sans-Serif size=1>Copyright&nbsp;</font>"
footer += "<font face=Sans-Serif size=1>&#169;&nbsp;</font>"
footer += "<font face=Sans-Serif size=1>Information&nbsp;Technology,&nbsp;Inc.&nbsp;2007</font>"
footer +="</p>"
return footer
}
 //End of footer
 
var check = 1; //A value of One(1) equals on

//Rendered Documents - PDF Statement Type Displayed to customers
// Statement with Checks = 0
// Statement Only No Checks = 1
var doctype = 1; 

//Help Tip Permissions

var logtip = 0;
//var enrolltip = 0;
var firsttimetip = 0;
var acctlisttip = 0;
var exptranstip = 0;
var exptransprevtip = 0;
var exptransconftip = 0;
//var focusprodtip = 0;
//var focusprodreqtip = 0;
var ddainqtip = 0;
var savinqtip = 0;
var codinqtip = 0;
var lasinqtip = 0;
var ddlinqtip = 0;
var sdbinqtip = 0;
var cardinqtip = 0;
var trandeptip = 0;
var tranloantip = 0;
var tranmenutip = 0;
var tranexptip = 0;
var paylisttip = 0;
var newpaytip = 0;
var chgpaytip = 0;
//var delpaytip = 0;
//var payprevtip = 0;
//var payconftip = 0;
var tranlisttip = 0;
var newtrantip = 0;
var chgtrantip = 0;
//var deltrantip = 0;
//var tranprevtip = 0;
var tranconftip = 0;
var doclisttip = 0;
var stoplisttip = 0;
var newstoptip = 0;
//var stopprevtip = 0;
var stopconftip = 0;
var chgpasstip = 0;
var chgemailtip = 0;
var chgnicktip = 0;
//var chgusertip = 0;
var msgrevntlisttip = 0;
var msgrmsglisttip = 0;
var msgrmsgtip = 0;
//var msgrtemptypetip = 0;
var msgrevntaddtip = 0;
var msgrevntaddconftip = 0;
//var msgrevntchgtip = 0;
var tipalign = "<center>"; //align for tips
var tipalignend = "</center>"; //align for tips

 //Export Formats Options
function exportformats(){
var blank = "";
	blank += "<option selected>Select Export Format...</option>"
	blank += "<option>Comma Separated File [.CSV]</option>"
	blank += "<option>Microsoft Money [.OFX]</option>"
	blank += "<option>Intuit Quicken [.QIF]</option>"
	blank += "<option>Intuit Quickbooks [.IIF]</option>"
	blank += "<option>Intuit Quicken [.QFX]</option>"
	blank += "<option>Intuit Quickbooks [.QBO]</option>"
	return blank
}

 



//Login Help tip
function log(){
var blank = "";
if (logtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Login Tip'></a>"
    	return blank }
else {return ""}
}

//Enrollment Help tip
function enroll(){
var blank = "";
if (enrolltip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Enrollment Tip'></a>"
    	return blank }
else {return ""}
}

//1st Time Log In
function firsttime(){
var blank = "";
if (firsttimetip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='First Time Log In Tip'></a>"
    	return blank }
else {return ""}
}

//Account List
function acctlist(){
var blank = "";
if (acctlisttip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Account List Tip'></a>"
    	return blank }
else {return ""}
}

//Express Transfer
function exptrans(){
var blank = "";
if (exptranstip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Express Transfer Tip'></a>"
    	return blank }
else {return ""}
}

//Express Transfer Preview
function exptransprev(){
var blank = "";
if (exptransprevtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Express Transfer Preview Tip'></a>"
    	return blank }
else {return ""}
}

//Express Transfer Confirm
function exptransconf(){
var blank = "";
if (exptransconftip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Express Transfer Confirm Tip'></a>"
    	return blank }
else {return ""}
}

//Focus Product
function focusprod(){
var blank = "";
if (focusprodtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Focus Product Tip'></a>"
    	return blank }
else {return ""}
}

//Focus Product Required
function focusprodreq(){
var blank = "";
if (focusprodreqtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Focus Product Required Tip'></a>"
    	return blank }
else {return ""}
}

//DDA Inquiry
function ddainq(){
var blank = "";
if (ddainqtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='DDA Inquiry Tip'></a>"
    	return blank }
else {return ""}
}

//SAV Inquiry
function savinq(){
var blank = "";
if (savinqtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='SAV Inquiry Tip'></a>"
    	return blank }
else {return ""}
}

//COD Inquiry
function codinq(){
var blank = "";
if (codinqtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='COD Inquiry Tip'></a>"
    	return blank }
else {return ""}
}

//LAS Inquiry
function lasinq(){
var blank = "";
if (lasinqtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='LAS Inquiry Tip'></a>"
    	return blank }
else {return ""}
}

//DDL Inquiry
function ddlinq(){
var blank = "";
if (ddlinqtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='DDL Inquiry Tip'></a>"
    	return blank }
else {return ""}
}

//SDB Inquiry
function sdbinq(){
var blank = "";
if (sdbinqtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Safety Deposit Box Tip'></a>"
    	return blank }
else {return ""}
}

//Card Inquiry
function cardinq(){
var blank = "";
if (cardinqtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Card Inquiry Tip'></a>"
    	return blank }
else {return ""}
}

//Transactions (Deposits)
function trandep(){
var blank = "";
if (trandeptip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Depost Transactions Tip'></a>"
    	return blank }
else {return ""}
}

//Transactions (Loans)
function tranloan(){
var blank = "";
if (tranloantip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Loan Transactions Tip'></a>"
    	return blank }
else {return ""}
}

//Transaction Menu
function tranmenu(){
var blank = "";
if (tranmenutip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Transaction Menu Tip'></a>"
    	return blank }
else {return ""}
}

//Transactions Export
function tranexp(){
var blank = "";
if (tranexptip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Transactions Export Tip'></a>"
    	return blank }
else {return ""}
}

//Payment List
function paylist(){
var blank = "";
if (paylisttip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Payment List Tip'></a>"
    	return blank }
else {return ""}
}

//New Payment
function newpay(){
var blank = "";
if (newpaytip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='New Payment Tip'></a>"
    	return blank }
else {return ""}
}

//Change Payment
function chgpay(){
var blank = "";
if (chgpaytip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Change Payment Tip'></a>"
    	return blank }
else {return ""}
}

//Delete Payment
function delpay(){
var blank = "";
if (delpaytip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Delete Payment Tip'></a>"
    	return blank }
else {return ""}
}

//Payment Preview
function payprev(){
var blank = "";
if (payprevtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Payment Preview Tip'></a>"
    	return blank }
else {return ""}
}

//Payment Confirmation
function payconf(){
var blank = "";
if (payconftip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Payment Confirmation Tip'></a>"
    	return blank }
else {return ""}
}

//Transfer List
function tranlist(){
var blank = "";
if (tranlisttip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Transfer List Tip'></a>"
    	return blank }
else {return ""}
}

//New Transfer
function newtran(){
var blank = "";
if (newtrantip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='New Transfer Tip'></a>"
    	return blank }
else {return ""}
}

//Change Transfer
function chgtran(){
var blank = "";
if (chgtrantip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Change Transfer Tip'></a>"
    	return blank }
else {return ""}
}

//Delete Transfer
function deltran(){
var blank = "";
if (deltrantip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Delete Transfer Tip'></a>"
    	return blank }
else {return ""}
}

//Transfer Preview
function tranprev(){
var blank = "";
if (tranprevtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Transfer Preview Tip'></a>"
    	return blank }
else {return ""}
}

//Transfer Confirmation
function tranconf(){
var blank = "";
if (tranconftip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Transfer Confirmation Tip'></a>"
    	return blank }
else {return ""}
}

//Document List
function doclist(){
var blank = "";
if (doclisttip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Document List Tip'></a>"
    	return blank }
else {return ""}
}

//Stop Payment List
function stoplist(){
var blank = "";
if (stoplisttip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Stop Payment List Tip'></a>"
    	return blank }
else {return ""}
}

//New Stop Payment
function newstop(){
var blank = "";
if (newstoptip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='New Stop Payment Tip'></a>"
    	return blank }
else {return ""}
}

//Stop Payment Preview
function stopprev(){
var blank = "";
if (stopprevtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Stop Payment Preview Tip'></a>"
    	return blank }
else {return ""}
}

//Stop Payment Confirm
function stopconf(){
var blank = "";
if (stopconftip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Stop Payment Confirm Tip'></a>"
    	return blank }
else {return ""}
}

//Change Password
function chgpass(){
var blank = "";
if (chgpasstip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Change Password Tip'></a>"
    	return blank }
else {return ""}
}

//Change Email
function chgemail(){
var blank = "";
if (chgemailtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Change Email Tip'></a>"
    	return blank }
else {return ""}
}

//Change NickName
function chgnick(){
var blank = "";
if (chgnicktip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Change NickName Tip'></a>"
    	return blank }
else {return ""}
}

//Change Usercode
function chguser(){
var blank = "";
if (chgusertip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Change Usercode Tip'></a>"
    	return blank }
else {return ""}
}

//Messenger Event List
function msgrevntlist(){
var blank = "";
if (msgrevntlisttip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Messenger Event List Tip'></a>"
    	return blank }
else {return ""}
}

//Messenger Message List
function msgrmsglist(){
var blank = "";
if (msgrmsglisttip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Messenger Message List Tip'></a>"
    	return blank }
else {return ""}
}

//Messenger Message
function msgrmsg(){
var blank = "";
if (msgrmsgtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Messenger Message Tip'></a>"
    	return blank }
else {return ""}
}

//Messenger Template Type
function msgrtemptype(){
var blank = "";
if (msgrtemptypetip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Messenger Template Type Tip'></a>"
    	return blank }
else {return ""}
}

//Messenger Event Add
function msgrevntadd(){
var blank = "";
if (msgrevntaddtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Messenger Event Add Tip'></a>"
    	return blank }
else {return ""}
}

//Messenger Event Add Confirm
function msgrevntaddconf(){
var blank = "";
if (msgrevntaddconftip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Messenger Event Add Confirm Tip'></a>"
    	return blank }
else {return ""}
}

//Messenger Event Change
function msgrevntchg(){
var blank = "";
if (msgrevntchgtip == 1){
	blank = "<a href='http://www.itiwnet.com' target='_blank'><img src='images/home.gif' Border='0' alt='Messenger Event Change Tip'></a>"
    	return blank }
else {return ""}
}


function pdfdoc(){
if (doctype == 0){
	window.document.all.a1.style.display='';
	window.document.all.b1.style.display='';
	window.document.all.c1.style.display='';
	window.document.all.a2.style.display='none';
	window.document.all.b2.style.display='none';
	window.document.all.c2.style.display='none';
	}
else {
	window.document.all.a1.style.display='none';
	window.document.all.b1.style.display='none';
	window.document.all.c1.style.display='none';
	window.document.all.a2.style.display='';
	window.document.all.b2.style.display='';
	window.document.all.c2.style.display='';
	}
	}
	
function check1(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('5455.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>5455</a>"
	return blank }
else {return "5455"}
}

function check2(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('5447.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>5447</a>"
	return blank }
else {return "5447"}
}

function check3(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('5468.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>5468</a>"
	return blank }
else {return "5468"}
}

function check4(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('5471.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>5471</a>"
	return blank }
else {return "5471"}
}

function check5(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('5448.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>5448</a>"
	return blank }
else {return "5448"}
}

function check6(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('5464.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>5464</a>"
	return blank }
else {return "5464"}
}

function check7(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('5457.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>5457</a>"
	return blank }
else {return "5457"}
}

function check8(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('5440.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>5440</a>"
	return blank }
else {return "5440"}
}

function check9(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('5472.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>5472</a>"
	return blank }
else {return "5472"}
}

function deposit1(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('dep1f.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>DEPOSIT</a>"
	return blank }
else {return "DEPOSIT"}
}

function deposit2(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('dep2f.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>DEPOSIT</a>"
	return blank }
else {return "DEPOSIT"}
}

function deposit3(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('dep3f.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>DEPOSIT</a>"
	return blank }
else {return "DEPOSIT"}
}

function deposit4(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('dep4f.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>DEPOSIT</a>"
	return blank }
else {return "DEPOSIT"}
}

function savimg1(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('savimg1.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>DEPOSIT</a>"
	return blank }
else {return "DEPOSIT"}
}

function loanimg1(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('loanimg1.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>Regular Payment</a>"
	return blank }
else {return "Regular Payment"}
}

function loanimg2(){
var blank = "";
if (check == 1) {
	blank ="<A href='#' onclick=window.open('loanimg2.html','','titlebar=no,toolbar=no,scrollbars=no,resizable=yes,menubar=yes,status=no');>Principal Only Payment</a>"
	return blank }
else {return "Principal Only Payment"}
}



 //All Scripting For Dating

function MakeArray(n) {
	this.length = n
	return this
}
monthNumbers = new MakeArray(12)
monthNumbers[1] = "1"
monthNumbers[2] = "2"
monthNumbers[3] = "3"
monthNumbers[4] = "4"
monthNumbers [5] = "5"
monthNumbers[6] = "6"
monthNumbers[7] = "7"
monthNumbers[8] = "8"
monthNumbers[9] = "9"
monthNumbers[10] = "10"
monthNumbers[11] = "11"
monthNumbers[12] = "12"

//Previous month in the form 4/5/2001
function numberMonthString(oneDate) {
	var numberMonth = monthNumbers[oneDate.getMonth( )]
	var thisYear = oneDate.getYear( )
	return numberMonth + "/" + oneDate.getDate( ) + "/" + thisYear
}

//Current month in the form 5/5/2001
function thisMonthString(oneDate) {
	var thisMonth = monthNumbers[oneDate.getMonth( ) + 1]
	var thisYear = oneDate.getYear( )
	return "0" + thisMonth + "/" + oneDate.getDate( ) + "/" + thisYear
}

//Previous day in the form 5/4/2001
function dayOneString(oneDate) {
	var thisMonth = monthNumbers[oneDate.getMonth( ) + 1]
	var thisYear = oneDate.getYear( )
	var day = oneDate.getDate( )
	if (day == 1) day = 2 
	return thisMonth + "/" + [day - 1] + "/" + thisYear
}

//Begin Present Date in the form of  "Friday, May 5, 2001"

function MakeArray(n) {
	this.length = n
	return this
}
monthNames = new MakeArray(12)
monthNames[1] = "January"
monthNames[2] = "February"
monthNames[3] = "March"
monthNames[4] = "April"
monthNames [5] = "May"
monthNames[6] = "June"
monthNames[7] = "July"
monthNames[8] = "August"
monthNames[9] = "September"
monthNames[10] = "October"
monthNames[11] = "November"
monthNames[12] = "December"

function nameMonthString(oneDate)  {
	var nameMonth = monthNames[oneDate.getMonth( ) + 1]
	var theYear = oneDate.getYear( )
	if (200>theYear){var theYear=theYear + 1900};
	return nameMonth + " " + oneDate.getDate( ) + ", " + theYear
}

function nameMonthString2(oneDate) {
	var nameMonth = monthNames[oneDate.getMonth( ) + 1]
	var thisYear = oneDate.getYear( )
	var day = oneDate.getDate( )
	if (day == 1) day = 2 
	return nameMonth + " " + [day - 1] + ", " + thisYear
}
	
//Begin Current Month
{
currentmonth = new Date();
currentyear = currentmonth.getYear();
nextyear = currentmonth.getYear() + 1;
if (nextyear < 1000) nextyear+=1900
if (currentyear < 2000) currentyear = 1900 + currentyear;
currentmonth = currentmonth.getMonth( ) + 1;
if (currentmonth == 0) currentmonth = 12;
if (currentmonth == 12) currentyear = currentyear - 1;
if (currentmonth < 10) currentmonth = "0" + currentmonth;
}
// End Current Month
//Begin Previous Month
{
monthminus1 = new Date();
year1 = monthminus1.getYear();
if (year1 < 2000) year1 = 1900 + year1;
month1 = monthminus1.getMonth( );
if (month1 == 0) month1 = 12;
if (month1 == 12) year1 = year1 - 1;
if (month1 < 10) month1 = "0" + month1;
}
// End Previous Month
//Begin Month - 2
{
monthminus2 = new Date();
year2 = monthminus2.getYear();
if (year2 < 2000) year2 = 1900 + year2;
month2 = monthminus2.getMonth( ) - 1;
if (month2 < 1) month2 = month2 + 12;
if (month2 == 12) year2 = year2 - 1;
if (month2 == 11) year2 = year2 - 1;
if (month2 < 10) month2 = "0" + month2;
}
// End Month - 2
//Begin Month - 3
{
monthminus3 = new Date();
year3 = monthminus3.getYear();
if (year3 < 2000) year3 = 1900 + year3;
month3 = monthminus3.getMonth( ) - 2;
if (month3 < 1) month3 = month3 + 12;
if (month3 == 12) year3 = year3 - 1;
if (month3 == 11) year3 = year3 - 1;
if (month3 == 10) year3 = year3 - 1;
if (month3 < 10) month3 = "0" + month3;
}
// End Month - 3
//Begin Month - 4
{
monthminus4 = new Date();
year4 = monthminus4.getYear();
if (year4 < 2000) year4 = 1900 + year4;
month4 = monthminus4.getMonth( ) - 3;
if (month4 < 1) month4 = month4 + 12;
if (month4 == 12) year4 = year4 - 1;
if (month4 == 11) year4 = year4 - 1;
if (month4 == 10) year4 = year4 - 1;
if (month4 == 9) year4 = year4 - 1;
if (month4 < 10) month4 = "0" + month4;
}
// End Month - 4
//Begin Month - 5
{
monthminus5 = new Date();
year5 = monthminus5.getYear();
if (year5 < 2000) year5 = 1900 + year5;
month5 = monthminus5.getMonth( ) - 4;
if (month5 < 1) month5 = month5 + 12;
if (month5 == 12) year5 = year5 - 1;
if (month5 == 11) year5 = year5 - 1;
if (month5 == 10) year5 = year5 - 1;
if (month5 == 9) year5 = year5 - 1;
if (month5 == 8) year5 = year5 - 1;
if (month5 < 10) month5 = "0" + month5;
}
// End Month - 5
//Begin Month - 6
{
monthminus6 = new Date();
year6 = monthminus6.getYear();
if (year6 < 2000) year6 = 1900 + year6;
month6 = monthminus6.getMonth( ) - 5;
if (month6 < 1) month6 = month6 + 12;
if (month6 == 12) year6 = year6 - 1;
if (month6 == 11) year6 = year6 - 1;
if (month6 == 10) year6 = year6 - 1;
if (month6 == 9) year6 = year6 - 1;
if (month6 == 8) year6 = year6 - 1;
if (month6 == 7) year6 = year6 - 1;
if (month6 < 10) month6 = "0" + month6;
}
// End Month - 6
//Begin Month - 7
{
monthminus7 = new Date();
year7 = monthminus7.getYear();
if (year7 < 2000) year7 = 1900 + year7;
month7 = monthminus7.getMonth( ) - 6;
if (month7 < 1) month7 = month7 + 12;
if (month7 == 12) year7 = year7 - 1;
if (month7 == 11) year7 = year7 - 1;
if (month7 == 10) year7 = year7 - 1;
if (month7 == 9) year7 = year7 - 1;
if (month7 == 8) year7 = year7 - 1;
if (month7 == 7) year7 = year7 - 1;
if (month7 == 6) year7 = year7 - 1;
if (month7 < 10) month7 = "0" + month7;
}
// End Month - 7
//Begin Month - 8
{
monthminus8 = new Date();
year8 = monthminus8.getYear();
if (year8 < 2000) year8 = 1900 + year8;
month8 = monthminus8.getMonth( ) - 7;
if (month8 < 1) month8 = month8 + 12;
if (month8 == 12) year8 = year8 - 1;
if (month8 == 11) year8 = year8 - 1;
if (month8 == 10) year8 = year8 - 1;
if (month8 == 9) year8 = year8 - 1;
if (month8 == 8) year8 = year8 - 1;
if (month8 == 7) year8 = year8 - 1;
if (month8 == 6) year8 = year8 - 1;
if (month8 == 5) year8 = year8 - 1;
if (month8 < 10) month8 = "0" + month8;
}
// End Month - 8
//Begin Month - 9
{
monthminus9 = new Date();
year9 = monthminus9.getYear();
if (year9 < 2000) year9 = 1900 + year9;
month9 = monthminus9.getMonth( ) - 8;
if (month9 < 1) month9 = month9 + 12;
if (month9 == 12) year9 = year9 - 1;
if (month9 == 11) year9 = year9 - 1;
if (month9 == 10) year9 = year9 - 1;
if (month9 == 9) year9 = year9 - 1;
if (month9 == 8) year9 = year9 - 1;
if (month9 == 7) year9 = year9 - 1;
if (month9 == 6) year9 = year9 - 1;
if (month9 == 5) year9 = year9 - 1;
if (month9 == 4) year9 = year9 - 1;
if (month9 < 10) month9 = "0" + month9;
}
// End Month - 9
//Begin Month - 10
{
monthminus10 = new Date();
year10 = monthminus10.getYear();
if (year10 < 2000) year10 = 1900 + year10;
month10 = monthminus10.getMonth( ) - 9;
if (month10 < 1) month10 = month10 + 12;
if (month10 == 12) year10 = year10 - 1;
if (month10 == 11) year10 = year10 - 1;
if (month10 == 10) year10 = year10 - 1;
if (month10 == 9) year10 = year10 - 1;
if (month10 == 8) year10 = year10 - 1;
if (month10 == 7) year10 = year10 - 1;
if (month10 == 6) year10 = year10 - 1;
if (month10 == 5) year10 = year10 - 1;
if (month10 == 4) year10 = year10 - 1;
if (month10 == 3) year10 = year10 - 1;
if (month10 < 10) month10 = "0" + month10;
}
// End Month - 10
//Begin Month - 11
{
monthminus11 = new Date();
year11 = monthminus11.getYear();
if (year11 < 2000) year11 = 1900 + year11;
month11 = monthminus11.getMonth( ) - 10;
if (month11 < 1) month11 = month11 + 12;
if (month11 == 12) year11 = year11 - 1;
if (month11 == 11) year11 = year11 - 1;
if (month11 == 10) year11 = year11 - 1;
if (month11 == 9) year11 = year11 - 1;
if (month11 == 8) year11 = year11 - 1;
if (month11 == 7) year11 = year11 - 1;
if (month11 == 6) year11 = year11 - 1;
if (month11 == 5) year11 = year11 - 1;
if (month11 == 4) year11 = year11 - 1;
if (month11 == 3) year11 = year11 - 1;
if (month11 == 2) year11 = year11 - 1;
if (month11 < 10) month11 = "0" + month11;
}
// End Month - 11
//Begin Month - 12
{
monthminus12 = new Date();
year12 = monthminus12.getYear() - 1;
if (year12 < 2000) year12 = 1900 + year12;
month12 = monthminus11.getMonth( ) + 1;
if (month12 == 13) month12 = 1;
if (month12 < 10) month12 = "0" + month12;
}
// End Month - 12
// Begin COD Next Interest Date 1 Month
{
maturitydate = new Date();
maturityyear = maturitydate.getYear();
if (maturityyear < 2000) maturityyear = 1900 + maturityyear;
codmonth = maturitydate.getMonth( ) + 2;
if (codmonth == 0) codmonth = 12;
if (codmonth > 12) codmonth = codmonth - 12;
if (codmonth == 1) maturityyear = maturityyear + 1;
if (codmonth < 10) codmonth = "0" + codmonth;
}
// End COD Next Interest Date
// Begin COD Maturity Date 12 Months
{
maturitydate2 = new Date();
maturityyear2 = maturitydate2.getYear();
if (maturityyear2 < 2000) maturityyear2 = 1900 + (maturityyear2) + 1;
codmonth2 = maturitydate2.getMonth( ) - 5;
if (codmonth2 == 0) codmonth2 = 12;
if (codmonth2 < 1) codmonth2 = codmonth2 + 12;
if (codmonth2 > 12) codmonth2 = codmonth2 - 12;
if (codmonth2 < 10) codmonth2 = "0" + codmonth2;
}
// End COD Maturity Date
// Previous Day
function MakeArray(n) {
	this.length = n
	return this
}
monthNumbers = new MakeArray(12)
monthNumbers[1] = "1"
monthNumbers[2] = "2"
monthNumbers[3] = "3"
monthNumbers[4] = "4"
monthNumbers [5] = "5"
monthNumbers[6] = "6"
monthNumbers[7] = "7"
monthNumbers[8] = "8"
monthNumbers[9] = "9"
monthNumbers[10] = "10"
monthNumbers[11] = "11"
monthNumbers[12] = "12"

function dayOneString(oneDate) {
	var thisMonth = monthNumbers[oneDate.getMonth( ) + 1]
	var thisYear = oneDate.getYear( )
	if (thisYear < 1000) thisYear+=1900
	var day = oneDate.getDate( )
	if (day == 1) day = 2 
	if (thisMonth < 10){
	return "0" + thisMonth + "/" + [day - 1] + "/" + thisYear }
	else {return thisMonth + "/" + [day - 1] + "/" + thisYear }
}
//Current month in the form 5/5/2001
function thisMonthString(oneDate) {
	var thisMonth = monthNumbers[oneDate.getMonth( ) + 1]
	var thisYear = oneDate.getYear( )
	if (thisYear < 1000) thisYear+=1900
 	if (thisMonth < 10){
	return "0" + thisMonth + "/" + oneDate.getDate( ) + "/" + thisYear }
	else {return thisMonth + "/" + oneDate.getDate( ) + "/" + thisYear }
}


Currtime = new Date();
var Hours;
var Mins;
var Time;
Hours = Currtime.getHours();
if (Hours >= 12) {
Time = " P.M.";
}
else {
Time = " A.M.";
}
if (Hours > 12) {
Hours -= 12;
}
if (Hours == 0) {
Hours = 12;
}
Mins = Currtime.getMinutes();
if (Mins < 10) {
Mins = "0" + Mins;
}

function MM_openBrWindow(theURL,winName,features) { 
		window.open(theURL,winName,features);
		}
		
//Bill Payment Date variables for todays date	
		{
		var day = new Date( )
		var todayms = day.getTime( )
		var otherday = todayms
		var last1 =  new Date(otherday)
		var pastday = last1.getDate( )
		var month = (last1.getMonth( ) + 1)
		if (month < 10) month = "0" + month;
		var year = last1.getYear( )
		if (year < 1000) year+=1900
		var min = last1.getMinutes( )
		if (min < 10) min= "0" + min;
		var hours = last1.getHours( )
		if (hours < 10) hours = "0" + hours;
		var sec = last1.getSeconds( )
		if (sec < 10) sec = "0" + sec;
		var ms = last1.getMilliseconds( )
		var day2 = last1.getDate( )
		if (day2 < 10 ) day2 = "0" + day2;
		var ampm = "PM"
		if (hours < 12) ampm = "AM";
		var bpmdate = (month + "/" + day2 + "/" + year)
		var bpmfulldate = (month + "/" + day2 + "/" + year + " " + hours + ":" + min + ":" + sec + " " + ampm)
		}
//End Bill Payment Date Variables

//Next day for transfer list
		{
		var day = new Date( )
		var todayms = day.getTime( )
		var otherday = todayms - (60 * 60 * 24 * 1 * 1000)
		var last1 =  new Date(otherday)
		var pastday = (last1.getDate( ) + 2)
		var pastmonth = (last1.getMonth( ) + 1)
		var pastyear = last1.getYear( )
		if (pastyear < 1000) pastyear+=1900
		}
		var tomorrow = (pastmonth + "/" + pastday + "/" + pastyear)
		var yesterday = ((pastmonth - 1) + "/" + pastday + "/" + pastyear)
//End next day variable

//Bill Payment Date flood into input field
function dateflood(){

 window.document.Payment.txtDate.value=(month + "/" + day2 + "/" + year);
}
//End Bill Payment Date Flood date into input field
// Also add onload=" return dateflood()"





