if (document.images) {

// main photos
		photoList = new Array();
		var i = 0;
		
		photoList[i++] = "<img src='images/layout/skiing.jpg' alt='Skiing' class='right'>";
		photoList[i++] = "<img src='images/layout/hunting.jpg' alt='Bow & Rifle Hunting' class='right'>";
		photoList[i++] = "<img src='images/layout/farmers_market.jpg' alt='Farmers Market' class='right'>";
		photoList[i++] = "<img src='images/layout/wildlife.jpg' alt='Wyoming Wildlife' class='right'>";
		photoList[i++] = "<img src='images/layout/Vedauwoo_Climbing.jpg' alt='Rock Climbing in Vedauwoo, Wyoming' class='right'>";
		photoList[i++] = "<img src='images/layout/university_of_wyo.jpg' alt='University of Wyoming' class='right'>";
		photoList[i++] = "<img src='images/layout/snowboarding.jpg' alt='Snowboarding' class='right'>";
		photoList[i++] = "<img src='images/layout/beautiful_scenery.jpg' alt='Beautiful Scenery' class='right'>";
		photoList[i++] = "<img src='images/layout/fishing.jpg' alt='Fishing' class='right'>";
		photoList[i++] = "<img src='images/layout/downtown_shopping.jpg' alt='Downtown Shopping' class='right'>";		

// ALL NEW STUFF BELOW HERE, NOTHING CHANGED ABOVE

// get the cookie value

		var value=0; // default value to start with is zero
		
		var allCookies=document.cookie; // get the whole cookie for the site
		
		var cookieName="randomizer="; // the name of the cookie we're interested in
		
		var position=allCookies.indexOf(cookieName); // is our cookie in the site's cookie
		
		if (position!=-1) { // if so, let's find out where it is in the site's cookie
			
			var start=position+cookieName.length; // here's where it starts
			
			if (photoList.length>20) { // here's where it ends
				var end=start+2;
			} else {
				var end=start+1;
			}
			
			value=allCookies.substring(start,end); // pull out the value we want to display
		}
		
		if (value==photoList.length-1) { // have we reached the end of the photoList?
			var setValue=0; // if so, set it back to zero
		} else {
			var setValue=parseInt(value)+1; // if not, add one to it
		}

		document.cookie=cookieName+setValue; // now set the cookie for next time
	
// the value to display		
		
		var rand=value; // and this is the value to display
		
}