function buildViewNav(currentProject)
{
	var viewNavBlockElement = document.getElementById("viewNavBlock");
	if(currentProject.images.length == 1)
	{
		viewNavBlockElement.innerHTML = "";
	}
	else
	{
		viewNavBlockElement.innerHTML = "";
		for(var i = 0; i < currentProject.images.length; i++)
		{
			var tempAnchor = document.createElement("a");
			tempAnchor.index = i;
			tempAnchor.className = "thumbNail";
			tempAnchor.setAttribute("href", "");
			var tempImage = document.createElement("img");
			var imgSrc = currentProject.resourceLocation + "s_" + i + "." + currentProject.images[i].type; 
			tempImage.setAttribute("src", imgSrc);
			tempAnchor.appendChild(tempImage);
			viewNavBlockElement.appendChild(tempAnchor);
		}
		var anchorArray = viewNavBlockElement.getElementsByTagName("a");
		currentProject.viewArray = new Array();
		for(var i = 0; i < anchorArray.length; i++)
		{
			var tempAnchor = anchorArray[i];
			if(i == 0)
			{
				tempAnchor.selected = true;
				tempAnchor.childNodes[0].style.borderColor = "#900";
			}
			tempAnchor.onmouseover = function()
			{
				if (!this.selected) this.childNodes[0].style.borderColor = "#900";
			}
			
			tempAnchor.onmouseout = function()
			{
				if (!this.selected) this.childNodes[0].style.borderColor = "#FFF";
			}
			
			tempAnchor.onclick = function()
			{
				if(!this.selected)
				{
					for(var j=0; j  < currentProject.viewArray.length; j++)
					{
						currentProject.viewArray[j].childNodes[0].style.borderColor = "#FFF";
						currentProject.viewArray[j].selected = false;
					}
					
					this.childNodes[0].style.borderColor = "#900";
					this.selected = true;
					setCurrentView(this.index);				
				}
				//fixed popup
				if(typeof fullSizeWindow != "undefined") if(!fullSizeWindow.closed) fullSizeWindow.close();
				return false;
			}
			
			currentProject.viewArray.push(tempAnchor);
		}
	}
}							
