// Last updated:  11.20.08
// CRITICAL!! - using new main_nav.html REQUIRES vars in this script to be changed !!

var ultimateshow=new Array();

//ultimateshow[x]=["path to image", "OPTIONAL link for image", "OPTIONAL link target", "OPTIONAL alt"]

ultimateshow[0]=['http://www.investorsunited.com/images/iu_banner_ads/pp_banners1_33a_ani1.gif', 'http://www.investorsunited.com/pocketpack.shtml', '_new', 'Creative Financing Pocket Pack']
ultimateshow[1]=['http://www.investorsunited.com/images/iu_banner_ads/banner_sell.gif', 'http://www.charlesparrish.com/', '_new', 'Charles Parrish - Auction Brokers']
ultimateshow[2]=['http://www.investorsunited.com/images/iu_banner_ads/banner_freeclass.gif', 'http://www.investorsunited.com/free_class.shtml', '_new', 'Investors United - Free Class']
ultimateshow[3]=['http://www.investorsunited.com/images/iu_banner_ads/banner_exchange.gif', 'http://www.mdrealestateclub.com/', '_new', 'MD Real Estate Exchange']
ultimateshow[4]=['http://www.investorsunited.com/images/iu_banner_ads/realInvestor.gif', 'http://www.investorsunited.com/news.shtml#newsletter', '_new', 'Free Newsletter']
ultimateshow[5]=['http://www.investorsunited.com/images/iu_banner_ads/gsa_banner_ad10a.gif', 'http://www.goodwichstoller.com/', '_new', 'Goodwich, Stoller & Associates']
ultimateshow[6]=['http://www.investorsunited.com/images/iu_banner_ads/HT_ad04_ani3.gif', '', '_new', 'Highland Title Co., Inc.']

/* ultimateshow[6]=['http://www.investorsunited.com/images/iu_banner_ads/TDRwebbanner01.gif', 'http://www.mddailyrecord.com/', '_new', 'The Daily Record'] */

//configure the below 3 variables to set the dimension/background color of the slideshow

var slidewidthAA="468px"; //set to width of LARGEST image in your slideshow
var slideheightAA="60px"; //set to height of LARGEST iamge in your slideshow
var slidecyclesAA="continous"; //number of cycles before slideshow stops (ieAA: "2" or "continous")
var randomorderAA="yes"; //randomizeAA the order in which images are displayed? "yes" or "no"
var preloadimagesAA="no"; //preload images? "yes" or "no"
var slidebgcolorAA='white';

//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelayAA=15000;

////Do not edit pass this line////////////////

var ieAA=document.all;
var domAA=document.getElementById;
var curcycleAA=0;

if (preloadimagesAA=="yes"){
	for (i=0;i<ultimateshow.length;i++){
		var cacheimage=new Image();
		cacheimage.src=ultimateshow[i][0];
	}
}

var currentslideAA=0;

function randomizeAA(targetarray){
	ultimateshowCopy=new Array();
	var the_one;
	var z=0;
	while (z<targetarray.length){
		the_one=Math.floor(Math.randomAA()*targetarray.length);
		if (targetarray[the_one]!="_selected!"){
			ultimateshowCopy[z]=targetarray[the_one];
			targetarray[the_one]="_selected!";
			z++;
		}
	}
}

if (randomorderAA=="yes")
	randomizeAA(ultimateshow);
else
	ultimateshowCopy=ultimateshow;

function rotateimagesAA(){
	curcycleAA=(currentslideAA==0) ? curcycleAA+1 : curcycleAA;
	ultcontainer='<center>';
	if (ultimateshowCopy[currentslideAA][1]!="")
		ultcontainer+='<a href="'+ultimateshowCopy[currentslideAA][1]+'" target="'+ultimateshowCopy[currentslideAA][2]+'">';
		ultcontainer+='<img src="'+ultimateshowCopy[currentslideAA][0]+'" alt="'+ultimateshowCopy[currentslideAA][3]+'" border="0" title="'+ultimateshowCopy[currentslideAA][3]+'" />';
	if (ultimateshowCopy[currentslideAA][1]!="")
		ultcontainer+='</a>';
		ultcontainer+='</center>';
	if (ieAA||domAA)
		crossrotateobjAA.innerHTML=ultcontainer;

	if (currentslideAA==ultimateshow.length-1) 
		currentslideAA=0;
	else 
		currentslideAA++;

	if (curcycleAA==parseInt(slidecyclesAA) && currentslideAA==0)
		return;
		setTimeout("rotateimagesAA()",slidedelayAA);
}

if (ieAA||domAA)
	document.write('<div id="slidedomAA" style="width:'+slidewidthAA+';height:'+slideheightAA+'; background-color:'+slidebgcolorAA+'"></div>');

function start_sliderAA(){
	crossrotateobjAA=domAA ? document.getElementById("slidedomAA") : document.all.slidedomAA;
	rotateimagesAA();
}

if (ieAA||domAA)
	window.onload=start_sliderAA;
