//PreLoads Images..

if (document.images)
{
	pic1 = new Image;
	pic1.src = "images/red_shadow2.jpg";
	pic2 = new Image;
	pic2.src = "images/jsmb.jpg";
	pic3 = new Image;
	pic3.src = "images/grey1.jpg";
	pic4 = new Image;
	pic4.src = "images/bw1.jpg";
	pic5 = new Image;
	pic5.src = "images/building1.jpg";
	pic6 = new Image;
	pic6.src = "images/building2.jpg";
	pic8 = new Image;
	pic8.src = "images/building3.jpg";
	pic7 = new Image;
	pic7.src = "images/rock1.jpg";
	pic9 = new Image;
	pic9.src = "images/building4.jpg";
}


function thumb2()
{
	document.getElementById("content").innerHTML='<img src="images/jsmb.jpg" />'; 
}


function thumb1()
{
	document.getElementById("content").innerHTML='<img src="images/red_shadow2.jpg" />'; 
}

function thumb3()
{
	document.getElementById("content").innerHTML='<img src="images/grey1.jpg" />'; 
}

function thumb4()
{
	document.getElementById("content").innerHTML='<img src="images/bw1.jpg" />'; 
}

function thumb5()
{
	document.getElementById("content").innerHTML='<img src="images/building1.jpg" />'; 
}

function thumb6()
{
	document.getElementById("content").innerHTML='<img src="images/building2.jpg" />'; 
}

function thumb7()
{
	document.getElementById("content").innerHTML='<img src="images/building3.jpg" />'; 
}

function thumb8()
{
	document.getElementById("content").innerHTML='<img src="images/rocks1.jpg" />'; 
}

function thumb9()
{
	document.getElementById("content").innerHTML='<img src="images/building4.jpg" />'; 
}

function contact()
{
	document.getElementById("thumbs").style.visibility='hidden';
	document.getElementById("content").innerHTML='<p class="about"><b>Contact Information</b><br><br><a href="mailto:stacy@stacysphotography.com">stacy@stacysphotography.com</a><br><br>(435) 760-2331<br><br>35 South Main, Brigham City UT 84302</p>';
	
}

function about()
{
	
	document.getElementById("thumbs").style.visibility='hidden';
	document.getElementById("content").innerHTML='<p align="left" class="about"><b>About us</b><br><br>Stacy Richards was born and raised in Brigham City Utah. Stacy is a happy newlywed since September 2004.  Stacy has been involved with photography for over 9 years.  She has 7 years of formal education helping to develop her talents in the arts and especially photography.  She has a Bachelor of fine arts with an emphasis in photography.  Her college education came from 1 year at the Utah Valley State College, and another 4 years at the Utah State University.<BR><BR>Stacy is currently a grade school art teacher and running a successful photography business.  She loves people and has a special talent with kids.  She is excited to start a family and hopes to be a help to people in the local communities by preserving their memories in her unique and simply different work.</p>';	

}

var the_timeout;
var start_left;
var new_left;
var end_left;
var el;

function findStart()
{
  el=document.getElementById('content').offsetLeft; 

	//alert(el);
	end_left = el - 70;
	//alert(end_left);
	
	var start_style = getStyleObject("myDiv");
	  if (start_style)
	  {
	    // get the current coordinate and add 5
	    //
	    start_left = parseInt(el - 400);
	   
	    // set the left property of the DIV, add px at the
	    // end unless this is NN4
	    //
	    if (document.layers) 
	    {
	      start_style.left = start_left;
	    }
	    else 
	    {  
	      start_style.left = start_left + "px";
	    }
		
		start_style.visibility = "visible";
	}
}



function hide()
{
	var div_style = getStyleObject("myDiv");
	if (div_style)
	{
		div_style.visibility = "hidden";
	}
}

function moveDiv()
{
  // get the stylesheet
  //
  
  var the_style = getStyleObject("myDiv");
  if (the_style)
  {
    
    var current_left = parseInt(the_style.left);
     new_left = current_left + 5;

   
    if (document.layers) 
    {
      the_style.left = new_left;
    }
    else 
    {  
      the_style.left = new_left + "px";
    }
	
    
    if (document.getElementById('myDiv').offsetLeft < end_left)
    {
      the_timeout = setTimeout('moveDiv();',10);
    }
  }
}


function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
} // getStyleObject

