// JavaScript Document

var initVal = "";
var resultsArray = window.location.search.split("=");
if (resultsArray.length > 1) {
  initVal = resultsArray[1];
}

function getFlashMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}

function updateBeingPlayedArea(initVal) {
  var name = "";
  var description = "";
  if (videoHash[initVal]) {
    name = videoHash[initVal]['name'];
    description = videoHash[initVal]['description']
  }
  document.getElementById("videoNameBeingPlayed").innerHTML = name;
  document.getElementById("videoDescriptionBeingPlayed").innerHTML = description;
}

function loadswf(initVal,theVideoPlayer,width,height,color){
  if (initVal) {
    updateBeingPlayedArea(initVal);
  }

  var SWFO=new SWFObject(theVideoPlayer+initVal,"videoclips",width,height,"9",color);
  SWFO.write("videoPlayer");
}

function callToActionscript(videoclips, initVal) {
    updateBeingPlayedArea(initVal);
    getFlashMovie(videoclips).sendToActionscript(initVal);
}

/*
	Video tab code, cloned by Shah Khatri from the HeadlineBistro "left_sidebar_tabs"
*/
$(document).ready(function(){
  $('.video_tabs_nav').addClass('video_tabs_nav_js');
  $('.video_tab_content > div').hide();
  $('.video_tab_content > div:first').show();
  $('.video_tabs_nav > li:first a').addClass('active');
  $('.video_tabs_nav > li a').click(function(){
    $('.video_tabs_nav > li a.active').removeClass('active');
    $(this).addClass('active');
    $('.video_tab_content > div:visible').slideUp(300, showVideoTabContent);
    return false;
  });
});

function showVideoTabContent() {
  $($('.video_tabs_nav > li a.active').attr('href')).slideDown(300);
}

function termsAndConditionsPopup(popup) {
  if (popup) {
    var disclaimer = "The content, organization, graphics, design, compilation, magnetic translation, digital conversion and other matters related to the Knights of Columbus productions are protected under applicable copyrights, trademarks and other proprietary (including but not limited to intellectual property) rights. Copying or redistribution of the Knights of Columbus film is strictly prohibited.";
    return confirm(disclaimer);
  }
  else {
    return true;
  }
}




<!--Below is an external interface call from the vidPlayer.swf file that calls the following function and passes the name of the div layer. Depending on the current class name, the class name switches back and forth between two classes (hide, show), As of 12/15 this function is disabled but will be kept until it is warrented for a later date-->

function changecss(objDivID){
  var myID = objDivID;
	if(document.getElementById(myID).className=='hide')
	{
		document.getElementById(myID).className = 'show';
	} else {
		if(document.getElementById(myID).className=='show'){
			document.getElementById(myID).className = 'hide';
		}
	}
}
