// ##LOG: 
// -----------------------------------------------------------------------------------------------
//	17/12/03	Chris Jenkins			Created.
// -----------------------------------------------------------------------------------------------
// ##TEMPLATE: 
// -----------------------------------------------------------------------------------------------
//	This file contains a function that provides graphic swapping code.
// -----------------------------------------------------------------------------------------------

var currentImg = 1;

function swapImg( srcImg, tgtImg ) {	
	// Place the main version of the selected thumb into 
	// the centre graphic position.
	var loc = srcImg.src.substr(0,tgtImg.src.lastIndexOf('/'));
	var name = srcImg.src.substr(srcImg.src.lastIndexOf('/'));	
	tgtImg.src = loc + name;
	
	// Set the font weight of the photo nav bar graphic numbers.
	if (name.substr(name.length-6,2) == "01") {
		document.getElementById("One").style.fontWeight='bold';
		document.getElementById("One").style.textDecoration='underline';
		document.getElementById("Two").style.fontWeight='normal';
		document.getElementById("Two").style.textDecoration='none';
		document.getElementById("Three").style.fontWeight='normal';
		document.getElementById("Three").style.textDecoration='none';
		document.getElementById("Four").style.fontWeight='normal';
		document.getElementById("Four").style.textDecoration='none';
	} else if (name.substr(name.length-6,2) == "02") {
		document.getElementById("Two").style.fontWeight='bold';
		document.getElementById("Two").style.textDecoration='underline';
		document.getElementById("One").style.fontWeight='normal';
		document.getElementById("One").style.textDecoration='none';
		document.getElementById("Three").style.fontWeight='normal';
		document.getElementById("Three").style.textDecoration='none';
		document.getElementById("Four").style.fontWeight='normal';
		document.getElementById("Four").style.textDecoration='none';
	} else if (name.substr(name.length-6,2) == "03") {
		document.getElementById("Three").style.fontWeight='bold';
		document.getElementById("Three").style.textDecoration='underline';
		document.getElementById("Two").style.fontWeight='normal';
		document.getElementById("Two").style.textDecoration='none';
		document.getElementById("One").style.fontWeight='normal';
		document.getElementById("One").style.textDecoration='none';
		document.getElementById("Four").style.fontWeight='normal';
		document.getElementById("Four").style.textDecoration='none';
	} else if (name.substr(name.length-6,2) == "04") {
		document.getElementById("Four").style.fontWeight='bold';
		document.getElementById("Four").style.textDecoration='underline';
		document.getElementById("Two").style.fontWeight='normal';
		document.getElementById("Two").style.textDecoration='none';
		document.getElementById("Three").style.fontWeight='normal';
		document.getElementById("Three").style.textDecoration='none';
		document.getElementById("One").style.fontWeight='normal';
		document.getElementById("One").style.textDecoration='none';
	}
}