//this is for adding the background image on bottom section of tabs content
tabsNameArray = new Array("jan","feb","march","april","may","june");
var image;
var hiddenFieldName;
var bottomDivName;
var bottomDivImage;
rExp = /_top/;
function showTabsBottomImage(){
	for (x=0; x < tabsNameArray.length; x++)
	{
		hiddenFieldName = tabsNameArray[x]+'Image';
		bottomDivName = tabsNameArray[x]+'Bottom';
		if (document.getElementById(hiddenFieldName) && document.getElementById(bottomDivName)) {
    		image = new String(document.getElementById(hiddenFieldName).value);
    		bottomDivImage = "url("+image.replace(rExp,'_btm')+")";
    		document.getElementById(bottomDivName).style.backgroundImage = bottomDivImage;
		}
	}
}

// this is for slide show of tabs images 
var arrIndex = 0;
var slideShowSpeed = 5000;
tabsArray = new Array("janDiv","febDiv","marchDiv","aprilDiv","mayDiv","juneDiv");
function loadTabContent(tabName) {    
    for (x=0; x<tabsArray.length; x++) {        
        if (tabName == tabsArray[x]) {
            if (document.getElementById(tabsArray[x])) {
                document.getElementById(tabsArray[x]).style.display="block";
                arrIndex = x;           	
            }
           	
           	if (tabsArray[x] && document.getElementById(tabsArray[x]+'Link')) {
            	document.getElementById(tabsArray[x]+'Link').className = "nav_active";
            }            
        }
        else {
            if (document.getElementById(tabsArray[x])) {
                document.getElementById(tabsArray[x]).style.display = "none";            
            }
            
            if (tabsArray[x] && document.getElementById(tabsArray[x]+'Link')) {
                document.getElementById(tabsArray[x]+'Link').className = "nav";
            }
        }
    }
}
    
function tabSlideShow() {
    if (arrIndex >= tabsArray.length) {
        arrIndex = 0;
    }
    loadTabContent(tabsArray[arrIndex]);
    arrIndex++;
    timeout = setTimeout('tabSlideShow()', slideShowSpeed);
}
