// ================================================================================
// ================================================================================
// File:         isla.js
// 
// Remarks:      javascript for isla taylor website
//
// Created:      25.06.2008
//
// Developers:   Nick Taylor (nickT)
//
// ================================================================================
// ================================================================================


function initPage() {
	//
}

function loadImage(newImage, imageFormat)
{
	if (document.getElementById('imagedisplay') != null)
	{
		if (imageFormat == 'lscp')
		{
			//document.getElementById('imagedisplay').height = '450'; // 480
			//document.getElementById('imagedisplay').width = '600';
		}
		else
		{
			//document.getElementById('imagedisplay').height = '480';
			//document.getElementById('imagedisplay').width = '360'; // 384
		}
		document.getElementById('imagedisplay').src = newImage;
	}
	else
	{
		alert('Sorry./nCannot display image at this time.');
	}
}



var clipid = 4;
var currClip = "clip_4";
var currClipid = 4;
function showClip(thisClip) {
	currClip = "clip_" + thisClip;
	if (document.getElementById(currClip))
	{
		document.getElementById(currClip).style.display = "block";
	}
	if (document.getElementById('clipNum')) {
		document.getElementById('clipNum').innerHTML = (nClips - thisClip + 1) + " of " + nClips;
	}
	currClipid = thisClip;
}
function hideClip(thisClip) {
	currClip = "clip_" + thisClip;
	if (document.getElementById(currClip)) {
		document.getElementById(currClip).style.display = "none";
	}
}
function showNextClip()	{
	if (currClipid == 2) {
		showLastClip();
	}
	else if (currClipid > 1) {
		hideClip(currClipid);
		clipid = currClipid - 1;
		showClip(clipid);
	}
}
function showPrevClip()	{
	if (currClipid == (nClips - 1)) {
		showFirstClip();
	}
	else if (currClipid < nClips)	{
		hideClip(currClipid);
		clipid = currClipid + 1;
		showClip(clipid);
	}
}
function showFirstClip() {
	clipid = nClips;
	hideClip(currClipid);
	showClip(clipid);
}
function showLastClip()	{
	clipid = 1;
	hideClip(currClipid);
	showClip(clipid);
}


