//<script language="JavaScript">
<!--

// Copyright 2001 by www.CodeBelly.com
// Please do *not* remove this notice.

var backImage = new Array(); // don't change this

// Enter the image filenames you wish to use.
// Follow the pattern to use more images.  The
// number in the brackets [] is the number you
// will use in the function call to pick each
// image.

// Note how backImage[3] = "" -- which would
// set the page to *no* background image.

var imageCount = 10;

backImage[0] = "";
backImage[1] = "photos/inkadu/inkadu_walking.jpg";
backImage[2] = "photos/katchina/katchina_yard.jpg";
backImage[3] = "photos/katchina/katchina_floor.jpg";
backImage[4] = "photos/oscar/oscar_string.jpg";
backImage[5] = "photos/oscar/oscar_stretch.jpg";
backImage[6] = "photos/katchina/katchina_couch.jpg";
backImage[7] = "photos/katchina/katchina_with_ron.jpg";
backImage[8] = "photos/katchina/katchina_grave_digging.jpg";
backImage[9] = "photos/katchina/katchina_grave_stone.jpg";
backImage[10] = "photos/katchina/katchina_grave.jpg";

var buttonImage = new Array(); // don't change this

buttonImage[0] = "";
buttonImage[1] = "photos/inkadu/inkadu_walking_b.jpg";
buttonImage[2] = "photos/katchina/katchina_yard_b.jpg";
buttonImage[3] = "photos/katchina/katchina_floor_b.jpg";
buttonImage[4] = "photos/oscar/oscar_string_b.jpg";
buttonImage[5] = "photos/oscar/oscar_stretch_b.jpg";
buttonImage[6] = "photos/katchina/katchina_couch_b.jpg";
buttonImage[7] = "photos/katchina/katchina_with_ron_b.jpg";
buttonImage[8] = "photos/katchina/katchina_grave_digging_b.jpg";
buttonImage[9] = "photos/katchina/katchina_grave_stone_b.jpg";
buttonImage[10] = "photos/katchina/katchina_grave_b.jpg";


var currentImage = 1;

function getThumbImageNumber(index)
{
	//alert("index = " + index);

	if(index > imageCount)
	{
		index = index - imageCount;
	}
	else
	{
		if(index <= 0)
		{
			index = imageCount + index;
		}
	}
	
	//alert("return = " + index); 

	return index;

}


function nextImage(inc)
{

	currentImage = currentImage + inc;

	if(currentImage > imageCount)
		currentImage = 1;

	if(currentImage == 0)
		currentImage = imageCount;

	var imageName =  backImage[currentImage];

	var v1 = getThumbImageNumber(currentImage-2);
	//alert("v1 = " + v1); 

	var buttonName1 =  buttonImage[v1];
	var buttonName2 =  buttonImage[getThumbImageNumber(currentImage-1)];
	var buttonName3 =  buttonImage[getThumbImageNumber(currentImage)];
	var buttonName4 =  buttonImage[getThumbImageNumber(currentImage+1)];
	var buttonName5 =  buttonImage[getThumbImageNumber(currentImage+2)];
	
	
	newImage = "url("+imageName+")";
	var imgSrc = "photos/katchina/katchina_couch.jpg"; 

if (document.body)
	{
//document.body.background = backImage[whichImage];
//document.getElementById('media_rowID').style.backgroundColor = "#000000";
//document.getElementById('media_rowID').style.backgroundImage = newImage;
//document.getElementById('media_rowID').src=imgSrc;
}
//document.body.div.background = backImage[whichImage];
//document.getElementById('rootcontainerID').style.backgroundImage = backImage[whichImage];
//document.getElementById('bannerID').style.backgroundColor = "#000000";
//document.div("banner").style.backgroundColor = "#000000"}
//document.getElementById('bannerID').style.setProperty("background-color", "#000000");


// works
//document.getElementById('rootcontainerID').style.backgroundColor = "#000000";
//document.getElementById('bannerID').style.backgroundColor = "#000000";

// current effort
//document.getElementById('rootcontainerID').style.backgroundImage = newImage;


	document.images.cats.src = imageName;
	
	document.images.cats1.src = buttonName1;
	document.images.cats2.src = buttonName2;
	document.images.cats3.src = buttonName3;
	document.images.cats4.src = buttonName4;
	document.images.cats5.src = buttonName5;


}





function setBGColor(color)
{
	document.body.background = ""
	document.bgColor = '#7F997E';
}


function setImage(whichImage)
{
   //newImage = "url(museum.jpg)";

	if(whichImage == 0)
	{
		newImage = "url(photos/katchina/katchina_couch.jpg)";
		document.body.background = newImage;

	}
	else
	{
		newImage = "url()";
		document.bgColor = '#809A7F';

	}


if (document.body)
	{
document.body.background = backImage[whichImage];
}
//document.body.div.background = backImage[whichImage];
//document.getElementById('rootcontainerID').style.backgroundImage = backImage[whichImage];
//document.getElementById('bannerID').style.backgroundColor = "#000000";
//document.div("banner").style.backgroundColor = "#000000"}
//document.getElementById('bannerID').style.setProperty("background-color", "#000000");


// works
//document.getElementById('rootcontainerID').style.backgroundColor = "#000000";
//document.getElementById('bannerID').style.backgroundColor = "#000000";

// current effort
//document.getElementById('rootcontainerID').style.backgroundImage = newImage;

}



function changeBGImage(whichImage)
{
   //newImage = "url(museum.jpg)";

	var imageName =  backImage[whichImage];



	var imgSrc = "photos/katchina/katchina_couch.jpg"; 

	if(whichImage == 0)
	{
		
		newImage = "url("+imageName+")";

	}
	else
	{
		newImage = "url()";
		document.bgColor = '#809A7F';

	}


if (document.body)
	{
//document.body.background = backImage[whichImage];
//document.getElementById('media_displayID').style.backgroundColor = "#000000";
//document.getElementById('media_displayID').style.backgroundImage = newImage;
//document.getElementById('media_displayID').src=imgSrc;

document.images.cats.src = imgSrc;
}
//document.body.div.background = backImage[whichImage];
//document.getElementById('rootcontainerID').style.backgroundImage = backImage[whichImage];
//document.getElementById('bannerID').style.backgroundColor = "#000000";
//document.div("banner").style.backgroundColor = "#000000"}
//document.getElementById('bannerID').style.setProperty("background-color", "#000000");


// works
//document.getElementById('rootcontainerID').style.backgroundColor = "#000000";
//document.getElementById('bannerID').style.backgroundColor = "#000000";

// current effort
//document.getElementById('rootcontainerID').style.backgroundImage = newImage;

}

function setUpMedia()
{
	var imageName =  backImage[1];
	newImage = "url("+imageName+")";

}

function addLoadEvent(func) 
{ 
	var oldonload = window.onload; 
	if (typeof window.onload != 'function') 
	{ 
		window.onload = func; 
	} 
	else 
	{ 
		window.onload = function() 
		{ 
			oldonload(); 
			func(); 
		} 
	} 
} 
 
addLoadEvent(setUpMedia);




//-->
//</script>


