// JavaScript Document

/*
function fadeElement
author: Glen Kleinig for PerthWeb PTY LTD
notes:	obj: can either be an object literal (this) or a reference to 
		an object in the document ('about_btn').
		oSrc: a string representing the filepath/name of the image to fade to
		duration: duration of fade in seconds.

*/
	function fadeElement(obj, oSrc, duration) {
	
		if(typeof(obj)!="object") {
			obj = MM_findObj(obj);
		}
		
		if (document.all) {
			obj.style.filter="blendTrans(duration="+duration+")";			
			obj.filters.blendTrans.Apply();
			obj.src = oSrc;
			obj.filters.blendTrans.Play();
		}
		else 
		{
			obj.src = oSrc;
		}
		
	}
	
	
var SlideShowSpeed = 5000;
// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;
var Picture = new Array(); // don't change this
//var Caption = new Array(); // don't change this
Picture[1]  = 'grfx/hp/thewest.jpg';
Picture[2]  = 'grfx/hp/logo_landcorp.gif';
Picture[3]  = 'grfx/hp/landgate-logo.gif';
Picture[4]  = 'grfx/logos/quantia.jpg';
/* 

 Specify the Captions...
 To add more captions, just continue
 the pattern, adding to the array below.
 To use fewer captions, remove lines
 starting at the end of the Caption array.
 Caution: The number of Captions *must*
 equal the number of Pictures!
 Caption[1]  = "<em>Powered by The Cheat.</em>";
*/
//-->

var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
//if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
