<!--
	//BRANDING AREA ROTATOR
	// this array consists of the id attributes of the divs we wish to alternate between
	divs_to_fade = new Array('branding_0', 'branding_1', 'branding_2', 'branding_3'); 
		
	// the starting index in the above array. It should be set to the value of the div which doesn't have the CSS Display property set to "none"
	x = 0;
	
	// the number of milliseconds between swaps.  Default is five seconds.
	wait = 8000;
	
	// change button state
	function changeState(sID) {
		var curScreen = (sID);
		var lastScreen = document.frmLastScreen.lastScreen.value;
		if (curScreen >= 4) { 
			curScreen = 0
		}
		//alert(curScreen);
		document.frmLastScreen.lastScreen.value = curScreen;
		document.getElementById('btnbrand' + curScreen).style.backgroundImage = "url(images/btn_brand_" + curScreen + "_alt.gif)";
		document.getElementById('btnbrand' + lastScreen).style.backgroundImage = "url(images/btn_brand_" + lastScreen + ".gif)";
}
	// 'play' function
	function getBackNext() {
		var cur = x;
		x++;
		changeState(x);  /** DEV **/
		if (x == 4) { /* PHYSICAL NUMBER OF SCREENS */
			x = 0;  /* (x == 'LAST SCREEN') THEN FORWARD TO 1ST */
			new Effect.Move(divs_to_fade[cur], { x: 720, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
		} else {
			new Effect.Move(divs_to_fade[cur], { x: -720, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
		}
		new Effect.Move(divs_to_fade[x], { x: 0, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
		startPage();
}
	// go to specific screen
	function getDiv(divID) {
		var cur = x;
		changeState(divID);  /** DEV **/
		if (cur != divID) {
			if (divID > cur) {
				document.getElementById(divs_to_fade[divID]).style.left = "720px";
				new Effect.Move(divs_to_fade[cur], { x: -720, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
			} else {
				document.getElementById(divs_to_fade[divID]).style.left = "-720px";
				new Effect.Move(divs_to_fade[cur], { x: 720, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
			}
			new Effect.Move(divs_to_fade[divID], { x: 0, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
		}
		x = divID;
}
	// the function that performs the fade
	function swapFade() {
		var cur = x;
		x++;
		changeState(x);  /** DEV **/
		if (x == 4) {  /* PHYSICAL NUMBER OF SCREENS */
			x = 0;
			new Effect.Move(divs_to_fade[0], { x: 0, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
			new Effect.Move(divs_to_fade[1], { x: 720, y: 0, mode: 'absolute', transition: Effect.Transitions.full });
			new Effect.Move(divs_to_fade[2], { x: 720, y: 0, mode: 'absolute', transition: Effect.Transitions.full });
			new Effect.Move(divs_to_fade[3], { x: 720, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
			clearInterval(timerID);
		} else {
			new Effect.Move(divs_to_fade[cur], { x: -720, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
			new Effect.Move(divs_to_fade[x], { x: 0, y: 0, mode: 'absolute', transition: Effect.Transitions.sinoidal });
		}
}
	// the onload event handler that starts the fading.
	function startPage() {
		$('txtabetter').setOpacity(0);
		$('txtinbanking').setOpacity(0);
		new Effect.Move('txtchoice', { x: 50, y: 109, mode: 'absolute', transition: Effect.Transitions.spring, duration: 3.0 });
		new Effect.Opacity('txtabetter', { from: 0, to: 1, duration: 3.0 });
		new Effect.Opacity('txtinbanking', { from: 0, to: 1, duration: 3.0 });
		timerID = setInterval('swapFade()', wait);
}
	// reset branding area on page onload 
	function pgReset() {
		$('txtinbanking').setStyle({opacity: 0});
		$('txtinbanking').setStyle({opacity: 0});
		document.frmLastScreen.lastScreen.value = 0;
}
//-->
<!--
  menuHover = function(nav) {
    var sfEls = document.getElementById(nav).getElementsByTagName("li");
    for (var i=0; i<sfEls.length; i++) {
      sfEls[i].onmouseover=function() {
        this.className+=" sfhover";
      }
      sfEls[i].onmouseout=function() {
        this.className=this.className.replace(new RegExp("\\s?sfhover\\b"), "");
      }
    }

    var listItem = document.getElementById(nav).getElementsByTagName('ul');
    for(var i=0;i<listItem.length;i++) {
      listItem[i].onmouseover=function() {
        var changeStyle = this.parentNode.getElementsByTagName('a');
        changeStyle[0].className+=" active";
      }

      listItem[i].onmouseout=function() {
        var changeStyle = this.parentNode.getElementsByTagName('a');
        changeStyle[0].className=this.className.replace(new RegExp("\\s?active\\b"), "");
      }
    }
  }

  function addEvent( obj, type, fn ) {
    if ( obj.attachEvent ) {
      obj['e'+type+fn] = fn;
      obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
      obj.attachEvent( 'on'+type, obj[type+fn] );
    } else
      obj.addEventListener( type, fn, false );
    }
  function removeEvent( obj, type, fn ) {
    if ( obj.detachEvent ) {
    obj.detachEvent( 'on'+type, obj[type+fn] );
    obj[type+fn] = null;
    } else
      obj.removeEventListener( type, fn, false );
    }

  addEvent(window, 'load', function () { menuHover('menu'); });
//-->
<!--
	//OPEN POP-UP W/URL
	function PopWin(NewLocation, LocationLink, WVal, HVal) {
	window.open(NewLocation + "?url=" + LocationLink, "NewWindow", "width=" + WVal 
	+ ",height=" + HVal + ",scrollbars=yes,status=no,toolbar=no");	
}
//-->
<!--
	//OPEN POP-UP
	function PopWinAlt(NewLocation, WVal, HVal) {
	window.open(NewLocation, "NewWindow", "width=" + WVal 
	+ ",height=" + HVal + ",scrollbars=yes,status=no,toolbar=no");	
}
//-->
<!--
	//GO TO NEW LOCATION IN PARENT WINDOW
	function GoTo(NewLocation) {
	self.opener.open(NewLocation);
	parent.close();	
	}
//-->
<!--
	function changeBG(img) {
		var newImage = "uploads/" + img;
		document.getElementById('bodysub').style.backgroundImage = "url(" + newImage + ")";
	}
//-->
