//Suckerfish Menus for IE
sfHover = function() {
	var sfEls = document.getElementById("gNavDrop").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(" sfhover\\b"), "");
		}
	}
}

var strPrevNavID = ""

function showMenu(id,obj) {
	var d = document.getElementById(id);
	
	if (strPrevNavID != id) {
		if (document.getElementById(strPrevNavID)) {
				document.getElementById(strPrevNavID).style.display='none';
			}
	}
	
	if (d) {
		if (d.style.display=='block'){
			d.style.display='none';
			strPrevNavID = "";
		}else{
			d.style.display='block';
			strPrevNavID = id;
		}
	}
}

function PopUp(id, baseFolder, galleryId){
	if(id!=""){
		var strURL = "/photo.asp?id=" + id + "&galleryId=" + galleryId
		var objPhotoWindow = window.open(strURL,'photo','height=500,width=550,left=10,top=10,directories=0,fullscreen=0,location=0,menubar=0,scrollbars=1,resizable=0,status=0,toolbar=0');
	}

}


function strTrim(strText) {
		for (i=0; i<strText.length; ++i) {
			if (strText.charAt(i) != ' ') break;
		}
		if (i >= strText.length) return ('');
		if (i > 0) strText = strText.substring(i, strText.length);
		for (j=strText.length-1; j > i; --j) {
			if (strText.charAt(j) != ' ') break;
		}
		if (j < strText.length -1)
			strText = strText.substring(0, j+1);
		return strText;

}
function ValidEmail(s){
    var i = 1;
    var sLength = s.length;
    while ((i < sLength) && (s.charAt(i) != "@"))
    { i++
    }
    if ((i >= sLength) || (s.charAt(i) != "@")) return false;
    else i += 2;
    while ((i < sLength) && (s.charAt(i) != "."))
    { i++
    }
    if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;
    else return true;
} 


function MM_findObj(n, d) { //v4.01
		  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
		  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
		  if(!x && d.getElementById) x=d.getElementById(n); return x;
		}

		function MM_validateForm() { //v4.0
		  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
		  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
		    if (val) { nm=val.name; if ((val=val.value)!="") {
		      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
			if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
		      } else if (test!='R') { num = parseFloat(val);
			if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
			if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
			  min=test.substring(8,p); max=test.substring(p+1);
			  if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
		    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
		  } if (errors) alert('The following error(s) occurred:\n'+errors);
		  document.MM_returnValue = (errors == '');
		}

function checkSearch(query) {
	if(!query) {
		alert('Please enter a search term');
		return false;
	}
}

function DisplayPassword(){
	var obj = xDOM("forgotPassword",0);
	if(obj.style.height == "0px"){
		obj.style.height = "120px";
		//setTimeout("setPassFocus()",10);
	}else{
		obj.style.height = "0px";
	}	
}

function DisplayActivation(){
	var obj = xDOM("ReActivate",0);
	if(obj.style.height == "0px"){
		obj.style.height = "120px";
		//setTimeout("setPassFocus()",10);
	}else{
		obj.style.height = "0px";
	}	
}
function setPassFocus(strObj){
	var objInput = xDOM("forgotForm",0);
	objInput.email.focus();	
}

function CheckPaymentType(objSelect,strValue){
	if (strValue != ""){
		var strSelectValue = strValue
	}else{
		var strSelectValue = objSelect[objSelect.selectedIndex].value;
	}
	
	var objCC = xDOM("CCDetails",0);
	if(strSelectValue.substring(0,1) == '1'){
		objCC.style.display = "block";
	}else{
		objCC.style.display = "none";	
		
	}
}

var strPrevId = ""
var objPrevAnswer = ""
var objPrevQuestion = ""
function toggle(id) {
		
		var objAnswerLayer = xDOM('a' + id,0);
		var objQuestionLayer = xDOM('q' + id,0);
		
		if(strPrevId != ""){
			objPrevAnswer = xDOM('a' + strPrevId,0);
			objPrevQuestion = xDOM('q' + strPrevId,0);
		}
		
		if(objPrevAnswer != "" & id == strPrevId){
			objPrevAnswer.style.display = "none";
			objPrevQuestion.className = 'question';
			objQuestionLayer.blur();
			objPrevAnswer = "";
			strPrevId = "";
		} else if(objPrevAnswer != "" & id != strPrevId){
			objPrevAnswer.style.display = "none";
			objPrevQuestion.className = 'question';
			objAnswerLayer.style.display = "block";
			objQuestionLayer.className = 'questionOn';
			objQuestionLayer.blur();
			objPrevAnswer = objAnswerLayer;
			strPrevId = id;
		} else {
			objAnswerLayer.style.display = "block";
			objQuestionLayer.className = 'questionOn';
			objQuestionLayer.blur();
			objPrevAnswer = objAnswerLayer;
			strPrevId = id;
		}
		
	}

// Cross Browser DOM Functions used to create objects and get top / left coords
// copyright Stephen Chapman, 4th Jan 2005
// you may copy this code but please keep the copyright notice as well
var aDOM = 0, ieDOM = 0, nsDOM = 0
var stdDOM = document.getElementById;
if (stdDOM) aDOM = 1; else {
  ieDOM = document.all;
  if (ieDOM) aDOM = 1; else {
    var nsDOM = (
      (navigator.appName.indexOf('Netscape') != -1)
      && (parseInt(navigator.appVersion) ==4));
    if (nsDOM) aDOM = 1;
  }
}
function xDOM(objectId, withStyle) {
var st = ''; if (withStyle) st = '.style';
if (stdDOM) return (eval('document.getElementById(objectId)'+st));
if (ieDOM) return (eval('document.all[objectId]'+st));
if (nsDOM) return (document.layers[objectId]);
}


function CheckActivation(objForm){

	if(ValidEmail(objForm.username.value)){
		return true
	}else{
		alert("Please enter a valid email address")	
		return false
	}
}

function ValidateUser(objForm){
	var strAlert = "";
	strAlert = "______________________________________\n\nPlease\n\n";
	var isAlert = false;
	var strFirstName = strTrim(objForm.firstName.value);
	var strLastName = strTrim(objForm.lastName.value);
	var strEmail = strTrim(objForm.email.value);
	var strPassword = strTrim(objForm.password.value);
	var strConfirmPassword = strTrim(objForm.confirmpassword.value);
	
	if (strFirstName==""){
		strAlert += "- Enter your first name\n";
		isAlert = true;
	}
	if (strLastName==""){
		strAlert += "- Enter your last name\n";
		isAlert = true;
	}			
			
	if(strEmail == ""){
		strAlert += "- Enter your email address\n";
		isAlert = true;
	}else if(!ValidEmail(strEmail)){
		strAlert += "- Enter a valid email address\n";
		isAlert = true;
	}		
	if(strPassword == "") {
		strAlert += "- Enter a password\n";
		isAlert = true;
	}else if(strPassword.length < 6){
		strAlert += "- Ensure your password is at least 6 characters\n";
		isAlert = true;
	}else if(strPassword != strConfirmPassword){
		strAlert += "- Ensure your password and confirm password match\n";
		isAlert = true;
	}			
	
	
	if (isAlert == true){
		strAlert += "\n\n______________________________________";
		alert (strAlert);
		return false;
	}else{
		return true;
	}
}

function CheckPayment(objForm){
	var strAlert = "";
	strAlert = "______________________________________\n\nPlease\n\n";
	var isAlert = false;

	var paymentMethod = objForm.paymentType.options[objForm.paymentType.selectedIndex].value;	
	var intCreditCard = strTrim(objForm.ccnumber.value)
	var intCreditCardName = strTrim(objForm.nameoncard.value)
	if(paymentMethod==""){
		strAlert += "- Please select a payment method.\n";
		isAlert = true;		
	}else if(paymentMethod.substring(0,1) == '1'){ // Its a credit card
		if (intCreditCardName==""){
			strAlert += "- Please enter the name on your Credit Card\n";
			isAlert = true;
		}
		if (intCreditCard==""){
			strAlert += "- Please enter a valid Credit Card number\n";
			isAlert = true;
		}		
	}
	if (isAlert == true){
		strAlert += "\n\n______________________________________";
		alert (strAlert);
		return false;
	}else{
		return true;
	}	
	
}

function CheckLogin(objForm){
	var strAlert = "";
	strAlert = "______________________________________\n\nPlease\n\n";
	var isAlert = false;

	var username = strTrim(objForm.username.value)
	var password = strTrim(objForm.password.value)

	if (username==""){
		strAlert += "- Please enter your username (email address)\n";
		isAlert = true;
	}		

	if (password==""){
		strAlert += "- Please enter your password\n";
		isAlert = true;
	}			
	if (isAlert == true){
		strAlert += "\n\n______________________________________";
		alert (strAlert);
		return false;
	}else{
		return true;
	}
}

// Credit Card Validation Javascript
// copyright 12th May 2003, by Stephen Chapman, Felgall Pty Ltd

// You have permission to copy and use this javascript provided that
// the content of the script is not changed in any way.

function validateCreditCard(s) {
	var v = "0123456789";
	var w = "";
	for (var i=0; i < s.length; i++) {
	x = s.charAt(i);
	if (v.indexOf(x,0) != -1)
	w += x;
	}
	var j = w.length / 2;
	if (j < 6.5 || j > 8 || j == 7) return false;
	var k = Math.floor(j);
	var m = Math.ceil(j) - k;
	var c = 0;
	for (var i=0; i<k; i++) {
	a = w.charAt(i*2+m) * 2;
	c += a > 9 ? Math.floor(a/10 + a%10) : a;
	}
	for (var i=0; i<k+m; i++) c += w.charAt(i*2+1-m) * 1;
	return (c%10 == 0);
}

function ValidateVerveForm(objForm){
var strAlert = "";
var strfirstname = objForm.firstname.value;
var strlastname = objForm.lastname.value;
var stremail = objForm.email.value;
var strnotes = objForm.notes.value;

if (strfirstname == "" ){
	strAlert += "Please enter your first name.\n";
}

if (strlastname == "" ){
	strAlert += "Please enter your last name.\n";
}

var REemail = new RegExp(/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*([,;]\s*\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)*/);

if (!ValidEmail(stremail) || !stremail.match(REemail)){
	strAlert += "Please enter your email address.\n";
}

if (strnotes == ""  || strnotes.length <= 3){
	strAlert += "Please enter a comment.\n";
}

if (strAlert != ""){
	strAlert = "______________________________________\n\nThere was a problem...\n\n" + strAlert + "\n\n______________________________________";
	alert (strAlert);
	return false;
}else{
	return true;
}

}

//FORU functions

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=lib_bwcheck()

/**********************************************************************************   
ScrollText 
*   Copyright (C) 2001 Thomas Brattli
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by Thomas Brattli
*
*   Script date: 09/23/2001 (keep this date to check versions) 
*********************************************************************************/

/*****************
You set the width and height of the divs inside the style tag, you only have to
change the divScrollTextCont, Remember to set the clip the same as the width and height.
You can remove the divUp and divDown layers if you want. 
This script should also work if you make the divScrollTextCont position:relative.
Then you should be able to place this inside a table or something. Just remember
that Netscape crash very easily with relative positioned divs and tables.

Updated with a fix for error if moving over layer before pageload.

****************/


//If you want it to move faster you can set this lower, it's the timeout:
var speed = 30

//Sets variables to keep track of what's happening
var loop, timer

//Object constructor
function makeObj(obj,nest){
    nest=(!nest) ? "":'document.'+nest+'.'
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
  	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
	this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
	this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
	this.up=goUp;this.down=goDown;
	this.moveIt=moveIt; this.x=0; this.y=0;
    this.obj = obj + "Object"

    eval(this.obj + "=this")
    return this
}

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

function moveIt(x,y){
	this.x = x
	this.y = y
	this.css.left = this.x+px
	this.css.top = this.y+px
}

//Makes the object go up
function goDown(move){
	if (this.y>-this.scrollHeight+oCont.clipHeight){
		this.moveIt(0,this.y-move)
			if (loop) setTimeout(this.obj+".down("+move+")",speed)
	}
}
//Makes the object go down
function goUp(move){
	if (this.y<0){
		this.moveIt(0,this.y-move)
		if (loop) setTimeout(this.obj+".up("+move+")",speed)
	}
}

//Calls the scrolling functions. Also checks whether the page is loaded or not.
function scroll(speed){
	if (scrolltextLoaded){
		loop = true;
		if (speed>0) oScroll.down(speed)
		else oScroll.up(speed)
	}
}

//Stops the scrolling (called on mouseout)
function noScroll(){
	loop = false
	if (timer) clearTimeout(timer)
}
//Makes the object
var scrolltextLoaded = false
function scrolltextInit(){
	oCont = new makeObj('divScrollTextCont')
	oScroll = new makeObj('divText','divScrollTextCont')
	oScroll.moveIt(0,0)
	oCont.css.visibility = "visible"
	scrolltextLoaded = true
}
//Call the init on page load if the browser is ok...

function ScrollUP(){
	scroll(10);
}
function ScrollDOWN(){
	scroll(-10);
	//setTimeout("noScroll()",250);
}
function ScrollStop(){
	noScroll()
}

// Toggle Panel for Homepage Matches
var strPrevMatchesPanel
var strPrevMatchesTabImgOffSrc
var objPrevPanel = ""
var objPrevMenu = ""
var objPrevMenuImg = ""
function toggleHomeMatches(id) {
		
		var objNewPanel = xDOM('items_' + id,0);
		var objNewMenu = xDOM('menu_' + id,0);
		var objMenu = xDOM('homeFixturesTabMenu',0);
		
		if(strPrevMatchesPanel != ""){
			objPrevPanel = xDOM('items_' + strPrevMatchesPanel,0);
			objPrevMenu = xDOM('menu_' + strPrevMatchesPanel,0);
		}
		if(objPrevPanel != "" & id == strPrevMatchesPanel){
			objPrevPanel.style.display = "block";
			objPrevMenu.blur();
			objPrevPanel = id;
			strPrevMatchesPanel = id;
		} else if(objPrevPanel != "" & id != strPrevMatchesPanel){
			objPrevPanel.style.display = "none";
			objMenu.className = 'tabMenu ' + id;
			objNewPanel.style.display = "block";
			objMenu.blur();
			objPrevPanel = objNewPanel;
			strPrevMatchesPanel = id;
		} 
		scrolltextInit();  //initialize scrolling div
	}

// Toggle Match for Homepage Feature Match
var strPrevFeature = ""
var strPrevClassname = ""
var objPrevFeature = ""
var objPrevItem = ""

function toggleFeatureMatch(id,prevclass) {
		
		var objNewFeature = xDOM('featureMatch_' + id,0);
		var objNewItem = xDOM('matchItem_' + id,0);
		
		if(strPrevFeature != ""){
			objPrevFeature = xDOM('featureMatch_' + strPrevFeature,0);
			objPrevItem = xDOM('matchItem_' + strPrevFeature,0);
		}
		if(objPrevFeature != "" & id == strPrevFeature){
			objPrevFeature.style.display = "block";
			objPrevItem.blur();
			objPrevFeature = id;
			strPrevFeature = id;
		} else if(objPrevFeature != "" & id != strPrevFeature){
			objPrevFeature.style.display = "none";
			objPrevItem.className = strPrevClassname;
			objNewFeature.style.display = "block";
			objNewItem.className = 'active ' + prevclass;
			objNewItem.blur();
			objPrevFeature = objNewFeature;
			strPrevFeature = id;
			strPrevClassname = prevclass;
		} 
}
	
function changeDisplay(matchArr){
	swapImage(matchArr[0], matchArr[1]);
	
	var homeScoreDiv = document.getElementById('hometeamscore');
	if(matchArr[2] == '')matchArr[2]='&#160;';
	if(homeScoreDiv)homeScoreDiv.innerHTML = matchArr[2];
	
	var awayScoreDiv = document.getElementById('awayteamscore');
	if(matchArr[3] == '')matchArr[3]='&#160;';
	if(awayScoreDiv)awayScoreDiv.innerHTML = matchArr[3];
	
	var gamesVenueDiv = document.getElementById('gamesvenue');
	if(matchArr[4] == '')matchArr[4]='&#160;';
	if(gamesVenueDiv){
		gamesVenueDiv.innerHTML = unescape(matchArr[4]);
		/*if(matchArr[4] == "&#160;"){
			gamesVenueDiv.style.fontSize = "0px";
			gamesVenueDiv.style.height = "0px";
		} else {
			gamesVenueDiv.style.fontSize = "11px";
			gamesVenueDiv.style.height = "5px";
		}*/
	}
	
	var gamesDateDiv = document.getElementById('gamesdate');
	if(gamesDateDiv)gamesDateDiv.innerHTML = matchArr[5];
	
	//var gamesIconDiv = document.getElementById('gamesicon');
	//if(gamesIconDiv)gamesIconDiv.innerHTML = matchArr[6]+matchArr[7]+matchArr[8]+matchArr[9]+matchArr[10];
	
	var linkHref = document.getElementById('matchurl1');
	if(linkHref)linkHref.href = matchArr[6];
	var linkHref2 = document.getElementById('matchurl2');
	if(linkHref2)linkHref2.href = matchArr[6];
	var linkHref3 = document.getElementById('matchurl3');
	if(linkHref3)linkHref3.href = matchArr[6];
	
	
}

function swapImage(homelogo, awaylogo) {
	if(document.getElementById("hometeamlogo")){
		document.getElementById("hometeamlogo").src=homelogo;
	}
	if(document.getElementById("awayteamlogo")){
		document.getElementById("awayteamlogo").src=awaylogo;
	}
}

// ROTATING NEWS BANNER //
// Scripts for the Rotating News stuff....
var intSecondBetweenItems = 5
var intPreviousItem = 0
function DisplayContent(strID){	
	if(intPreviousItem!=0)SwapButton(intPreviousItem,""); 			///aru/css/images/HomeNewsNumberGrey.gif
	SwapButton(strID,"/images/foru/HomeNewsNumberActive.gif");	///aru/css/images/HomeNewsNumberGreen.gif
	displayObj = getObj("newsContent");
	displayObj.innerHTML = ""
	displayObj.innerHTML = unescape(arrHomeNews[strID].strHtml)	
	if(intTotalItems == parseInt(strID)){
		intNextNewsID = 1	
	}else{
		intNextNewsID = parseInt(strID) + 1	
	}		
	intPreviousItem = strID
}

function cycleNewsItems(strID){
	if(blnCycleNews){
		DisplayContent(strID)
		setTimeout("cycleNewsItems(intNextNewsID)", intSecondBetweenItems*1000)
	}
}

function DisplayNewsItem(strID){
	blnCycleNews = false
	DisplayContent(strID);
}

function PauseNews(){
	blnCycleNews = false
}
function restartNews(){
	if(!blnCycleNews){
		blnCycleNews = true
		cycleNewsItems(intNextNewsID);
	}
}	

function GoBackOne(){
	blnCycleNews = false
	intNextNewsID = intNextNewsID - 2
	if(intNextNewsID < 1){
		intNextNewsID = intNextNewsID + intTotalItems	
	}	
	DisplayContent(intNextNewsID);	
}
function GoForwardOne(){
	blnCycleNews = false
	DisplayContent(intNextNewsID);
}	
function initNews(){
	cycleNewsItems(1)
}

function SwapButton(strID,strImageAndPath){
	objButton = getObj("news_" + strID)
	if(strImageAndPath==""){
		objButton.style.background='none'
	}else{
		objButton.style.background='url('+ strImageAndPath +') no-repeat'
	}
}

function getObj(id){
	if(document.getElementById){
		return document.getElementById(id);
	}else{
		return document.all[id];
	} 
}

function InitFadeImages(){

	var fadeBox = document.getElementById('ForuHomeGraphic');
	// set up the actual images
	for(var i=0;i<slides.length;i++) {
		// hooray for the DOM
		var slide = document.createElement('img'); // a new image
		slide.src = slides[i]; // should show this image
		slide.border = '0';
		slide.style.display = 'none';
		slide.style.position = 'absolute'; // important so images stay on top of each other
		slide.style.opacity = '0'; // init to transparent (CSS2)
		slide.style.filter = 'alpha(opacity:0)'; // init to transparent (MSIE)
		fadeBox.appendChild(slide); // put the image in the box
		slides[i] = slide; // reassign to same array for convenience
		// if it's the first image, let's show it now to avoid waiting
		if(i==0) { 
			fade(i,1); // fade it in!
		}
	}	
}



function fade(whoid,dir) {

	var slide = slides[whoid]; // get the slide element at index whoid
	var completed; // so we know when the fade is done
	var opac = parseFloat(slide.style.opacity,10); // get a reference value
	// increment if fading in, decrement if fading out
	if(dir > 0) { 
		slide.style.display = 'block';
		opac += .1; // more opaque
		if(opac >= 1) {
			// fade is at max! fade done!
			completed = true;
		}
	} else {
		opac -= .1; // less opaque
		if(opac <= 0) {
			// fade is at min! fade done!
			slide.style.display = 'none';
			completed = true;
		}
	}
	slide.style.opacity = opac; // set opacity (CSS2)
	slide.style.filter = 'alpha(opacity:'+(opac*100)+')'; // set opacity (MSIE)
	if(!completed) {
		// as long as the fade is not complete, keep doing this in 1/10 increments within fadeTimer seconds
		setTimeout("fade("+whoid+","+dir+")",70);
	}
}

function RotateBanner(intArrayCount,i){
	if(slides.length > 1 && i > 1 && parseInt(i) % 2 == 0){
		var s1 = intArrayCount-1==-1?slides.length - 1:intArrayCount-1; // Out
		var s2 = intArrayCount; // either the next or the first;
		fade(s1,0); // fade the old slide out!
		fade(s2,1); // fade the new slide in!		
		var intArrayNumber = s2+1==slides.length?0:s2+1;

	}else{
		var intArrayNumber = intArrayCount;
	}
	var intArrayNumber;
	setTimeout("RotateBanner(" + intArrayNumber + "," + parseInt(i + 1) +")",3000);
}