//******** Used to rotate promotional banners each time a page is loaded ****************//
//******** Originally built 1/29/2009 by Brian Nipper ***********//
//******** For use with AWSM sites ****************//

//*********** Begin Code For The Array Of Promo items *****************//
//2 Deminsional arry. 1st deminsion HTML Block. 2nd deminsion Affiliations either RJA, RJFS
var promoItems = new Array();
promoItems["assetAllocation"] = new Array("<div style=\"MARGIN: 0px 0px 5px\" align=center src_cetemp=\"/AdvisorSitesFiles/content/images/assetallocation_off.gif\"><img id=promo style=\"MARGIN-LEFT: 0px\" src=\"/AdvisorSitesFiles/content/images/assetallocation_off.gif\" useMap=#promo_Map border=0></div><map name=promo_Map><area onmouseover=\"document.getElementById('promo').src = '/AdvisorSitesFiles/content/images/assetallocation_on.gif';\" onmouseout=\"document.getElementById('promo').src = '/AdvisorSitesFiles/content/images/assetallocation_off.gif';\" shape=RECT target=_blank alt=\"Asset Allocation Committee Quarterly\" coords=28,125,117,158 href=\"http://www.raymondjames.com/branches/library/awsm/promo/assetallocation.htm\"></map>","RJA,RJFS");
promoItems["bondWeekly"] = new Array("<div style=\"MARGIN: 0px 0px 5px\" align=center src_cetemp=\"/AdvisorSitesFiles/content/images/munibond_off.gif\"><img id=muni style=\"MARGIN-LEFT: 0px\" src=\"/AdvisorSitesFiles/content/images/munibond_off.gif\" useMap=#promo_munibond_Map border=0></div><map name=promo_munibond_Map><area onmouseover=\"document.getElementById('muni').src = '/AdvisorSitesFiles/content/images/munibond_on.gif';\" onmouseout=\"document.getElementById('muni').src = '/AdvisorSitesFiles/content/images/munibond_off.gif';\" shape=RECT target=_blank alt=\"Municipal Bond Investor Weekly\" coords=28,125,117,158 href=\"http://www.raymondjames.com/branches/library/awsm/promo/muni.htm\"></map>","RJA,RJFS");
promoItems["rjResponds"] = new Array("<p align=center><a href=\"http://www.raymondjames.com/Branches/library/market_conditions2.htm\" target=_blank><img src=\"/AdvisorSitesFiles/content/images/market_conditions.gif\" border=0></a></p>","RJA,RJFS");
promoItems["smartMoney"] = new Array("<div style=\"MARGIN: 0px 0px 5px\" align=center src_cetemp=\"/AdvisorSitesFiles/content/images/rj_smartmoney_on.gif\"><img id=promo style=\"MARGIN-LEFT: 0px\" src=\"/AdvisorSitesFiles/content/images/rj_smartmoney_on.gif\" width=154 useMap=#promo_Map border=0></div><map name=promo_Map><area onmouseover=\"document.getElementById('promo').src = '/AdvisorSitesFiles/content/images/rj_smartmoney_off.gif';\" onmouseout=\"document.getElementById('promo').src = '/AdvisorSitesFiles/content/images/rj_smartmoney_on.gif';\" shape=RECT target=_blank alt=\"SmartMoney Ranks Raymond James No. 1\" coords=28,125,117,158 href=\"http://www.raymondjames.com/branches/library/awsm/promo/smartmoney.htm\"></map>","RJA,RJFS");
promoItems["timeAd"] = new Array("<p align=center><a href=\"http://www.raymondjames.com/pdfs/time_advertorial_2008_10_20.pdf\" target=_blank><img id=time_ad onmouseover=\"this.src = 'http://www.raymondjames.com/images/build07/sdbr/time_ad_2008_10_20_.gif';\" title=\"\" onmouseout=\"this.src = 'http://www.raymondjames.com/images/build07/sdbr/time_ad_2008_10_20.gif';\" height=127 alt=\"Featured in TIME October 20\" src=\"http://www.raymondjames.com/images/build07/sdbr/time_ad_2008_10_20.gif\" width=177 border=0></a></p>","RJA,RJFS");
//*********** End Code For The Array Of Promo items *****************//

//*********** Begin Code To Add Corresponding items from original Array to temp Array *****************//
//Rebuild Array based on type of site.
var tempArr = new Array();
var item;
//Loop through each item in the array
for(item in promoItems)
{
	//Each time the 2nd deminsion of the element in the array contains the Affiliation add it to the tempArray.
	if(promoItems[item][1].indexOf(strCheckVal) > -1)
	{ tempArr.push(promoItems[item]); }
}
//*********** End Code To Add Corresponding items from original Array to temp Array *****************//


//*********** Begin Code To generate a random number based on the number of elemnts within the temp array. *****************//
if(typeof tempArr == "object")
{ var randNum = Math.round(Math.random() * tempArr.length); }

if(randNum == tempArr.length)
{ randNum = randNum - 1 }
//*********** End Code To generate a random number based on the number of elemnts within the temp array. *****************//

//*********** Begin Code To Write out the radomly selected item from the temp array. *****************//
document.write(tempArr[randNum][0]);
//*********** End Code To Write out the radomly selected item from the temp array. *****************//