// JavaScript Document

function FindObject(n, d)
{
	//v4.01
	var p, i, x;
	if(!d)
		d=document;
		
	if ((p=n.indexOf("?"))>0&&parent.frames.length)
	{
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	
	if (!(x=d[n])&&d.all)
		x=d.all[n];
	
	for (i=0; !x&&i < d.forms.length; i++)
		x=d.forms[i][n];
	
	for (i=0; !x&&d.layers && i < d.layers.length; i++)
		x=FindObject(n,d.layers[i].document);
	
	if(!x && d.getElementById)
		x=d.getElementById(n);
	
	return x;
}

function UpdateImage()
{
	//v3.0
	var i, j=0, x, a=UpdateImage.arguments;
	
	document.MM_sr=new Array;
	for(i=0; i < (a.length-2); i += 3)
		if ((x=FindObject(a[i])) != null)
		{
			document.MM_sr[j++]=x;
			if(!x.oSrc)
				x.oSrc=x.src;
			
			x.src=a[i+2];
		}
}

function Init()
{
	i = 1;
	images = [
				'images/geothermalss/geothermal1.jpg',
				'images/geothermalss/geothermal2.jpg',
				'images/geothermalss/geothermal3.jpg',
				'images/geothermalss/geothermal4.jpg',
				'images/geothermalss/geothermal5.jpg',
				'images/geothermalss/geothermal6.jpg',
				'images/geothermalss/geothermal7.jpg',
				'images/geothermalss/geothermal8.jpg',
				'images/geothermalss/geothermal9.jpg',
				'images/geothermalss/geothermal10.jpg',
				'images/geothermalss/geothermal11.jpg'
			];

	setTimeout("SwapImage('rotate', 'geothermalss/geothermal1.jpg', '1', 'Volunteer Cabin Rentals');",5000);
}

function SetTimer()
{
	setTimeout("SwapImage('rotate', 'geothermalss/geothermal3.jpg', '0', 'Volunteer Cabin Rentals');",5000);
}

function SwapImage()
{
	UpdateImage('rotate', '', images[i], 1);
	i++;
	if (i == images.length)
		i=0;
	setTimeout("SwapImage();",5000);
	
}
