
///////////////////////////////////////////
// Content swapping script
// Shows 'Welcome' and 'Featured Clips' tabs
///////////////////////////////////////////

// show correct content
function showContent(showDiv) {
	var divNameArray= new Array("welcome","clips");
	for(i=0; i<divNameArray.length; i++){ 
		if(divNameArray[i] == showDiv){ 
			document.getElementById(showDiv).style.display="block"; 
		}else{ 
			document.getElementById(divNameArray[i]).style.display="none"; 
		} 
	}
	// swap background image, set hyperlink styles
	tabName = "homeTabs";
	if(showDiv == "welcome"){
		newBackground = "url(/images/homepage/tab_welcome_active.gif)";
		document.getElementById(tabName).style.backgroundImage=newBackground;
		activeLinkName = "welcomeLink";
		inactiveLinkName = "clipsLink";
		document.getElementById(activeLinkName).className='active';
		document.getElementById(inactiveLinkName).className='inactive';
	} else {
		newBackground = "url(/images/homepage/tab_clips_active.gif)";
		document.getElementById(tabName).style.backgroundImage=newBackground;
		linkName = "clipsLink";
		inactiveLinkName = "welcomeLink";
		document.getElementById(linkName).className='active';
		document.getElementById(inactiveLinkName).className='inactive';		
	}
	// display correct hyperlink styles
}



///////////////////////////////////////////
// Content swapping script
// Rotates Featured Clip Photo and Description
///////////////////////////////////////////

// show correct content
function showFeaturedClip(showClip,totalClips) {
	for(i=0; i<=totalClips; i++){ 
		showDiv = 'featuredClip' + i;
		showThumb = 'thumb_' + i;
		if(i==showClip){
			document.getElementById(showDiv).className="show";
			document.getElementById(showThumb).className="shadow selected_thumb";
		}else{
			document.getElementById(showDiv).className="hide";
			document.getElementById(showThumb).className="shadow";
		} 
	}
}
