	var natureBackWidth = Array(242, 224, 208, 308);

	var contain = new Array();

	var photoBrowserIndex = 0;

	function createPage()
	{
		var rnd = Math.round(Math.random()*3);
		var string = "";
		if (rnd == 0) {
			string = "<img src='gfx/natureback1.png' width=242 height=256>";
			document.getElementById("natureback").style.left = 757 - 250;
		}
		else if (rnd == 1) {
			string = "<img src='gfx/natureback2.png' width=223 height=256>";
			document.getElementById("natureback").style.left = 757 - 231;
		}
		else if (rnd == 2) {
			string = "<img src='gfx/natureback3.png' width=208 height=256>";
			document.getElementById("natureback").style.left = 757 - 216;
		}
		else if (rnd == 3) {
			string = "<img src='gfx/natureback4.png' width=308 height=256>";
			document.getElementById("natureback").style.left = 757 - 316;
		}
		document.getElementById("natureback").innerHTML = string;
		if (photos != null)
			setPhotoBrowserSmall();
	}	


	function setPhotoBrowserSmall() {
		document.getElementById("pb_photo").style.top = photosDescription[(photoBrowserIndex<<1)+1];
		document.getElementById("pb_photo").innerHTML = "<img border=0 src='gfx/photobrowser/"+photos[(photoBrowserIndex<<1)+1]+"'>";
	}

	function photoBrowser() {
            if (photos != null) document.getElementById("contain").innerHTML = "<table border=0 width='100%' height='100%'><tr><td align=center valign=center><img src='gfx/photobrowser/"+photos[(photoBrowserIndex<<1)]+"'></td></tr><tr><td align=center valign=center><font class='t10n'>"+photosDescription[(photoBrowserIndex<<1)]+"</font></td></tr></table>";
	}

	function photoBrowserLeft() {
		if (photos != null) {
			photoBrowserIndex --;
			if (photoBrowserIndex < 0) photoBrowserIndex = 0;
			else setPhotoBrowserSmall();
		}
	}

	function photoBrowserRight() {
		if (photos != null) {
			photoBrowserIndex ++;
			if (photoBrowserIndex > (photos.length >> 1) - 1) photoBrowserIndex --;
			else setPhotoBrowserSmall();
		}
	}