// JavaScript Document



var zxcTO;

function Scroll(id,dis,pos){
 var obj=document.getElementById(id)
 obj.scrollTop=obj.scrollTop+dis;
 if (pos){obj.scrollTop=pos; }
 else {zxcTO=setTimeout( function(){ Scroll(id,dis); },10); }
}









//declare variables
var current_place = "";
var imageCount_brand = 17; //This tells the computer how many images there are to cycle through
var currentBrandNum = 1;
function changeBrandImageNext(){
var img = document.getElementById("branding_imgs");
 if(currentBrandNum == 17){
	 currentBrandNum = 1;
 }else{
	 currentBrandNum = currentBrandNum+1;
 }
img.src="images/branding/branding_" + currentBrandNum + ".gif";
setTimeout("changeBrandImageNext()",10000);							//  <-- Auto Play feature: adjust number for delay between changes. Every 1000 = 1 second   // 
}
function changeBrandImagePrev(){
var img = document.getElementById("branding_imgs");
 if(currentBrandNum == 1){
	 currentBrandNum = 1;
 }else{
	 currentBrandNum = currentBrandNum-1;
 }
img.src="images/branding/branding_" + currentBrandNum + ".gif";
}



var imageCount_broad = 3; //This tells the computer how many images there are to cycle through
var currentBroadNum = 1;
function changeBroadImageNext(){
var mov = document.getElementById("broadcast_movs");
 if(currentBroadNum == 3){
	 currentBroadNum = 1;
 }else{
	 currentBroadNum = currentBroadNum+1;
 }
 mov.innerHTML='<object width="250" height="159" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" value="images/broadcast/broadcast_'+currentBroadNum+'.mov"><param name="autoplay" value="true"><param name="controller" value="false"><embed src="images/broadcast/broadcast_'+currentBroadNum+'.mov" width="250" height="159" autoplay="true" controller="false"	pluginspage="http://www.apple.com/quicktime/download/"></embed></object>';
}
function changeBroadImagePrev(){
var mov = document.getElementById("broadcast_movs");
 if(currentBroadNum == 1){
	 currentBroadNum = 1;
 }else{
	 currentBroadNum = currentBroadNum-1;
 }
 mov.innerHTML='<object width="250" height="159" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" value="images/broadcast/broadcast_'+currentBroadNum+'.mov"><param name="autoplay" value="true"><param name="controller" value="false"><embed src="images/broadcast/broadcast_'+currentBroadNum+'.mov" width="250" height="159" autoplay="true" controller="false"	pluginspage="http://www.apple.com/quicktime/download/"></embed></object>';
}



var imageCount_social = 3; //This tells the computer how many images there are to cycle through
var currentSocialNum = 1;
function changeSocialImageNext(){
var img = document.getElementById("social_imgs");
 if(currentSocialNum == 3){
	 currentSocialNum = 1;
 }else{
	 currentSocialNum = currentSocialNum+1;
 }
img.src="images/social/social_" + currentSocialNum + ".gif";
setTimeout("changeSocialImageNext()",12000);							//  <-- Auto Play feature: adjust number for delay between changes. Every 1000 = 1 second   // 
}
function changeSocialImagePrev(){
var img = document.getElementById("social_imgs");
 if(currentSocialNum == 1){
	 currentSocialNum = 1;
 }else{
	 currentSocialNum = currentSocialNum-1;
 }
img.src="images/social/social_" + currentSocialNum + ".gif";
}




function starter(){
	show_branding();
	alert("hey");
}




function show_about(){
	document.getElementById('about_content').style.display = "block";
	document.getElementById('about_link').style.fontWeight = "bold";
	current_place = "about";
}

function show_rec(){
	document.getElementById('rec_content').style.display = "block";
	document.getElementById('recognition_link').style.fontWeight = "bold";
	current_place = "rec";
}

function hide_about(){
	document.getElementById('about_content').style.display = "none";
	document.getElementById('about_link').style.fontWeight = "normal";
}

function hide_rec(){
	document.getElementById('rec_content').style.display = "none";
	document.getElementById('recognition_link').style.fontWeight = "normal";
}


function hide_all_subgal(){
	document.getElementById('branding_container').style.display = "none";
	document.getElementById('social_container').style.display = "none";
	document.getElementById('broad_container').style.display = "none";
	document.getElementById('branding_link').style.fontWeight = "normal";
	//document.getElementById('branding_link').style.color = "#999999";
	document.getElementById('social_link').style.fontWeight = "normal";
	//document.getElementById('social_link').style.color = "#999999";
	document.getElementById('broadcast_link').style.fontWeight = "normal";
	//document.getElementById('broadcast_link').style.color = "#999999";
	
	
}






function show_branding(){
	document.getElementById('branding_container').style.display = "block";
	document.getElementById('branding_link').style.fontWeight = "bold";
	document.getElementById('branding_link').style.color = "#695e63";
	setTimeout("changeBrandImageNext()",5000);								//  <-- Auto Play feature: adjust number for delay between changes. Every 1000 = 1 second   // 
	current_place = "brand";
		
}

function check_bold(){
	if(current_place == "about"){
		document.getElementById('about_link').style.fontWeight = "bold";
	}else{
		document.getElementById('about_link').style.fontWeight = "normal";
	}
	
	if(current_place == "rec"){
		document.getElementById('recognition_link').style.fontWeight = "bold";
	}else{
		document.getElementById('recognition_link').style.fontWeight = "normal";
	}
		if(current_place == "social"){
		document.getElementById('social_linkk').style.fontWeight = "bold";
	}else{
		document.getElementById('social_link').style.fontWeight = "normal";
	}
		if(current_place == "brand"){
		document.getElementById('branding_link').style.fontWeight = "bold";
	}else{
		document.getElementById('branding_link').style.fontWeight = "normal";
	}
		if(current_place == "broadcast"){
		document.getElementById('broadcast_link').style.fontWeight = "bold";
	}else{
		document.getElementById('broadcast_link').style.fontWeight = "normal";
	}
	
}



function show_social(){
	document.getElementById('social_container').style.display = "block";
	document.getElementById('social_link').style.fontWeight = "bold";
	document.getElementById('social_link').style.color = "#695e63";
	setTimeout("changeSocialImageNext()",5000);									//  <-- Auto Play feature: adjust number for delay between changes. Every 1000 = 1 second   // 
	current_place = "social";	
}

function show_broadcast(){
	document.getElementById('broad_container').style.display = "block";
	document.getElementById('broadcast_link').style.fontWeight = "bold";
	document.getElementById('broadcast_link').style.color = "#695e63";
	current_place = "broadcast";	
}


