/**

	These are the intandemfilms javascript functions
	
	Author:	Andrew Fisher (andrew.fisher@xmlinfinity.com)
	
	version:	0.4


**/

// currently selected movie item.
var currentlySelected = "main";

function ShowMovieContent(section) {
	// this function takes a section of the movie page and then turns off the old content that was being shown and switches the new
	// part of it on instead.
	
	// first up we switch off the old bits.
	
	document.getElementById("link_" + currentlySelected).className = "";
	
	document.getElementById(currentlySelected).className = "off";
	
	// now we switch on the new ones.
	document.getElementById("link_" + section).className = "selected";
	
	document.getElementById(section).className = "on";
	
	currentlySelected = section;
	
}

function ShowItem(obj, switchOn) {
	// this function looks at an object and either switches it on or off
	if (switchOn) {
		document.getElementById(obj).className = "on";
	} else {
		document.getElementById(obj).className = "off";
	}
}

function SwitchItem(obj) {
	// this function switches the state of the item.
	if (document.getElementById(obj).className == "on") {
		ShowItem(obj, false);
	} else {
		ShowItem(obj, true);
	}
}

function MovieRollover(path) {
	// this function makes the movie image roll over and then display in teh big area along with the caption.
	document.getElementById('bigimage').src = path;
}

function ChangeLink(path) {
	// this function takes a path and changes the link target
	document.getElementById('imagelink').href = path;
}

function ChangeCaption(caption) {
	// this function changes the caption of the main image 
	document.getElementById('caption').innerHTML = caption;
}

function NavRollover(obj, path) {
	// this function does a quick image rollover.
	document.getElementById(obj).src = path;
}