function gallery() {
	//preload images
	var NewImg = new Array (
		"<a href=\"http://www.sonywonder.com\" target=\"_blank\"><img src=\"images/work/sonywonder.jpg\" /></a>",   // 00
		"<a href=\"http://flash.sonypictures.com/video/movies/quarantine/site/main.html\" target=\"_blank\"><img src=\"images/work/quarantine.jpg\" /></a>",   // 01
		"<a href=\"http://boondockstv.com\" target=\"_blank\"><img src=\"images/work/boondocks.jpg\" /></a>",   // 02
		"<a href=\"http://spiderman3moviezone.com\" target=\"_blank\"><img src=\"images/work/sm3moviezone.jpg\" /></a>",   // 03
		"<a href=\"http://www.afterworld.tv\" target=\"_blank\"><img src=\"images/work/afterworld.jpg\" /></a>",   // 04		
		"<a href=\"http://www.theshieldtv.com\" target=\"_blank\"><img src=\"images/work/theshield.jpg\" /></a>",   // 05
		"<a href=\"http://www.fanta.com\" target=\"_blank\"><img src=\"images/work/fanta.jpg\" /></a>",   // 06
		"<a href=\"http://www.elizabethwubishet.com\" target=\"_blank\"><img src=\"images/work/elizabethwubishet.jpg\" /></a>",   // 07
		"<a href=\"http://www.lovensky.com\" target=\"_blank\"><img src=\"images/work/lovensky.jpg\" /></a>"   // 08
	);
	
	var captionsArray = new Array(
		 "<ul><li>Web Producer / Project Manager</li><li><strong>property:</strong> Sony Wonder - Family Entertainment from Sony Pictures</li><li><strong>client:</strong> <span class=\"red\">Sony Pictures Home Entertainment</span></li><li><strong>url:</strong> <a href=\"http://www.sonywonder.com\" target=\"_blank\">sonywonder.com</a></li></ul>", //00
		"<ul><li>Web Producer / Project Manager</li><li><strong>property:</strong> Quarantine - The Official Movie Site</li><li><strong>client:</strong> <span class=\"red\">Screen Gems</span></li><li><strong>url:</strong> <a href=\"http://flash.sonypictures.com/video/movies/quarantine/site/main.html\" target=\"_blank\">containthetruth.com</a></li></ul>", //01 
		"<ul><li>Web Producer / Project Manager</li><li><strong>property:</strong> The Boondocks - Official Site</li><li><strong>client:</strong> <span class=\"red\">Sony Pictures Television</span></li><li><strong>url:</strong> <a href=\"http://boondockstv.com\" target=\"_blank\">boondockstv.com</a></li></ul>", //02 	
		"<ul><li>Web Producer / Project Manager</li><li><strong>property:</strong> Spider-Man 3 Movie Zone</li><li><strong>client:</strong> <span class=\"red\">Columbia Pictures</span></li><li><strong>url:</strong> <a href=\"http://spiderman3moviezone.com\" target=\"_blank\">spiderman3moviezone.com</a></li></ul>", //03
		"<ul><li>Web Producer / Project Manager</li><li><strong>property:</strong> Afterworld</li><li><strong>client:</strong> <span class=\"red\">Stan Rogow Productions</span></li><li><strong>url:</strong> <a href=\"http://www.afterworld.tv\" target=\"_blank\">afterworld.tv</a></li></ul>", //04
		"<ul><li>Web Producer / Project Manager</li><li><strong>property:</strong> The Shield - Official Site</li><li><strong>client:</strong> <span class=\"red\">Sony Pictures Television</span></li><li><strong>url:</strong> <a href=\"http://www.theshieldtv.com\" target=\"_blank\">theshieldtv.com</a></li></ul>", //05
		"<ul><li>Web Producer / Project Manager</li><li><strong>property:</strong> Fanta - The Fantanas Are Back!</li><li><strong>client:</strong> <span class=\"red\">Coca-Cola</span></li><li><strong>url:</strong> <a href=\"http://www.fanta.com/\" target=\"_blank\">fanta.com</a></li></ul>", //06
		"<ul><li>Web Producer / Designer / Developer</li><li><strong>property:</strong> Elizabeth Wubishet - Official Site</li><li><strong>client:</strong> <span class=\"red\">Elizabeth Wubishet</span></li><li><strong>url:</strong> <a href=\"http://www.elizabethwubishet.com/\" target=\"_blank\">elizabethwubishet.com</a></li></ul>", //07
	"<ul><li>Web Producer / Designer / Developer</li><li><strong>property:</strong> Lovensky Online</li><li><strong>client:</strong> <span class=\"red\">Lovensky Jean-Baptiste</span></li><li><strong>url:</strong> <a href=\"http://www.lovensky.com/\" target=\"_blank\">lovensky.com</a></li></ul>" //08
	);
/*
	var backButton = document.getElementById('prev');	
	backButton.onclick = function () {
		imageNav(-1);
		return false;
	}
	
	var nextButton = document.getElementById('next');
	nextButton.onclick = function () {
		imageNav(1);
		return false;
	}
*/
	var links = document.getElementsByTagName ( 'a' );
	for (var i = 0; i < links.length; i++ ) {
		var link = links[i];
		if ( ( link.getAttribute ( 'href' ) ) && ( link.getAttribute ( 'id' ) ) ) {
			link.onclick = function() {
				var imgId=this.getAttribute('id');
				document.getElementById('screenshot').innerHTML=NewImg[imgId];
				document.getElementById('caption').innerHTML=captionsArray[imgId];
				return false;
			}
		}
	}
/*
	var ImgNum = 1;	
	var ImgLength = NewImg.length;	

	
	function imageNav(direction) {	
		ImgNum += direction;
		if (ImgNum > ImgLength) {
			ImgNum = 1;
		}
		if (ImgNum <= 0) {
			currentPhoto='screenshot'+ImgLength;
			ImgNum = ImgLength;
		}
		changeImage(ImgNum);
	}
	
	function changeImage(index) {	
		photo.src=NewImg[index-1];
		photoCaption.innerHTML=captionsArray[index-1];
	}
*/
}

window.onload = function() {
	gallery();
}