	//Array for rotating through the main tabs on the homepage
	var mainTabs = new Array('analysis','blogs','audioVideo','tools','rates');
	//Array for rotating through the news tabs on the homepage
	var newsTabs = new Array('headlineNews','marketNews','earnings','masipos');
	//Defines the delay for moving to the next tab on the homepage; 1000 milliseconds = 1 second
	var rotationTime = 3500;
	//Initialize counter for keeping track of which tab we have highlighted
	var tabShowCounter = 1;
	//Initialize timeout var
	var t;

	//Preload rollover images
	
	//Main tabs
	tab_analysis = new Image;
	tab_analysis_on = new Image;

	tab_blogs = new Image;
	tab_blogs_on = new Image;
	
	tab_audioVideo = new Image;
	tab_audioVideo_on = new Image;
	
	tab_tools = new Image;
	tab_tools_on = new Image;
	
	tab_rates = new Image;
	tab_rates_on = new Image;
	
	tab_analysis.src = "images/home-v2/tabs_analysis.gif"
	tab_analysis_on.src = "images/home-v2/tabs_analysis_on.gif"

	tab_blogs.src = "images/home-v2/tabs_blogs.gif"
	tab_blogs_on.src = "images/home-v2/tabs_blogs_on.gif"
	
	tab_audioVideo.src = "images/home-v2/tabs_audioVideo.gif"
	tab_audioVideo_on.src = "images/home-v2/tabs_audioVideo_on.gif"
	
	tab_tools.src = "images/home-v2/tabs_tools.gif"
	tab_tools_on.src = "images/home-v2/tabs_tools_on.gif"
	
	tab_rates.src = "images/home-v2/tabs_rates.gif"
	tab_rates_on.src = "images/home-v2/tabs_rates_on.gif"
	
	//News tabs
	newstab_headlineNews = new Image;
	newstab_headlineNews_on = new Image;
	
	newstab_marketNews = new Image;
	newstab_marketNews_on = new Image;
	
	newstab_earnings = new Image;
	newstab_earnings_on = new Image;
	
	newstab_masipos = new Image;
	newstab_masipos_on = new Image;
	
	newstab_headlineNews.src = "images/home-v2/newstabs_headlineNews.gif"
	newstab_headlineNews_on.src = "images/home-v2/newstabs_headlineNews_on.gif"
	
	newstab_marketNews.src = "images/home-v2/newstabs_marketNews.gif"
	newstab_marketNews_on.src = "images/home-v2/newstabs_marketNews_on.gif"
	
	newstab_earnings.src = "images/home-v2/newstabs_earnings.gif"
	newstab_earnings_on.src = "images/home-v2/newstabs_earnings_on.gif"
	
	newstab_masipos.src = "images/home-v2/newstabs_masipos.gif"
	newstab_masipos_on.src = "images/home-v2/newstabs_masipos_on.gif"	
	
	//Handles the click on one of the main tabs
	function selectMainTab(tab) {
		clearTimeout(t);
		for (var i=0; i<mainTabs.length; i++) {
			if (mainTabs[i] != tab) {
				swapClass(mainTabs[i]+"Content",'showTab','hideTab');
				filter('tab_'+mainTabs[i], 'tab_'+mainTabs[i]);
			} else {
				swapClass(mainTabs[i]+"Content",'hideTab','showTab');
				filter('tab_'+mainTabs[i], 'tab_'+mainTabs[i]+'_on');
			}
		}
	}
	//Handles the rotation of the mainTabs to the next item
	function advanceMainTab() {
		selectMainTab(mainTabs[tabShowCounter]);
		if (tabShowCounter < (mainTabs.length)) {
			tabShowCounter++;
			t = setTimeout("advanceMainTab()",rotationTime);
		} else {
			selectMainTab(mainTabs[0]);
		}
	}
	//Handles the click of one of the news tabs
	function selectNewsTab(tab) {
		for (var i=0; i<newsTabs.length; i++) {
			if (newsTabs[i] != tab) {
				swapClass(newsTabs[i]+"Content",'showTab','hideTab');
				filter('newstab_'+newsTabs[i], 'newstab_'+newsTabs[i]);
			} else {
				swapClass(newsTabs[i]+"Content",'hideTab','showTab');
				filter('newstab_'+newsTabs[i], 'newstab_'+newsTabs[i]+'_on');
			}
		}
	}
	
	// Aug 14, 2007 - document.ready functions changed to normal "onload" function; very intermmitent bug
	// showing up in IE (I only got it so show up once in 100 tries) related to javascript that changes
	// page structure executing before the page has completely loaded, causing an "IE cannot open this site...
	// operation aborted" error.  document.ready might be executing "too fast" for IE, onload should be able
	// to do what it needs to do safely.

	//jQuery document.ready, for initializing faster than onLoad
	// *** For more on jQuery --> http://jquery.com/
	/* $(document).ready(function(){
		selectMainTab(mainTabs[0]);
		selectNewsTab(newsTabs[0]);
		t = setTimeout("advanceMainTab()",rotationTime);
	}); */
	
	function homepageOnload() {
		selectMainTab(mainTabs[0]);
		selectNewsTab(newsTabs[0]);
		t = setTimeout("advanceMainTab()",rotationTime);

		//Initialize jquery helpers
		//apply jquery tooltip plugin to the AP/CP news feeds links
		$('#newsTabsContent a').Tooltip({showURL: false, track: true});
		//add 'onChange' handler to the Rates dropdowns to change the browser URL on select
		$('#ratesContent select').change( function() {
			if ($(this).val() != "") {
				document.location.href=$(this).val();
			}
		} );
		//add 'onChange' handler to the RSS dropdowns to change the browser URL on select
		$('#rssFeeds select').change( function() {
			if ($(this).val() != "") {
				document.location.href=$(this).val();
			}
		} );
		//add 'onChange' handler to the Newsletters dropdown to change the browser URL on select
		$('#newsletters select').change( function() {
			if ($(this).val() != "") {
				document.location.href=$(this).val();
			}
		} );
	}
	
	//Initialize jquery helpers
	/* $(function() {
		//apply jquery tooltip plugin to the AP/CP news feeds links
		$('#newsTabsContent a').Tooltip({showURL: false, track: true});
		//add 'onChange' handler to the Rates dropdowns to change the browser URL on select
		$('#ratesContent select').change( function() {
			if ($(this).val() != "") {
				document.location.href=$(this).val();
			}
		} );
		//add 'onChange' handler to the RSS dropdowns to change the browser URL on select
		$('#rssFeeds select').change( function() {
			if ($(this).val() != "") {
				document.location.href=$(this).val();
			}
		} );
		//add 'onChange' handler to the Newsletters dropdown to change the browser URL on select
		$('#newsletters select').change( function() {
			if ($(this).val() != "") {
				document.location.href=$(this).val();
			}
		} );
	}); */