
	var view;
	function setClass(view)
	{
		var classN = "inactive";
		var arLinks = document.getElementsByTagName("a");
		var ct = (arLinks.length);
		for (var i=0; i<ct; i++)
		{
			arLinks[i].className = "inactive";
		}
		view.className = "active";
	}
	
	function getView(view)
	{
		var placeholder = document.getElementById("placeholder");
		var source = view.getAttribute("href");
		placeholder.setAttribute("src", source);
		setClass(view);
		createBtn(source);
	}
	
	
	function openContact()
	{
		var height=500;
		var width=600;
		var newLeft = (window.screen.availWidth - width) / 2;
		var newHeight = (window.screen.availHeight - height) /2;
		var url = "index.php/act/c.contact";
		var contactWin = window.open(url,'ssWin','height=' + height + ',width=' + width + ',left=' + newLeft + ',top=' + newHeight + ',menubar=0,status=0,scrollbars=0,directories=0,resizable=1');
		contactWin.focus();
	}
	
	function createBtn(filename)
	{
		var newDir = "";
		var target = document.getElementById("enlarge");
		var theFile = filename.split("jpgs/");
		var newFile = theFile[1].split(".jpg");
		var btnString = "<a href=\"#\" class=\"btn\" id=\"enlargeBtn\" onclick=\"doEnlarge('" + newFile[0] + "'); return false;\">ENLARGE</a>";
		//var btnString = "<input type=\"button\" id=\"enlargeBtn\" value=\"ENLARGE\" onclick=\"doEnlarge('" + newFile[0] + "')\"/>";
		
		target.innerHTML = btnString;
	}
	
	function doEnlarge(filename)
	{
			width = 700;
			height = 700;
			var url = "index.php/act/c.enlarge/filename/" + filename;
			var newLeft = (window.screen.availWidth - width) / 2;
			var newHeight = (window.screen.availHeight - height) / 2;
			var objPopup = window.open(url,'detailWin','height=' + height + ',width=' + width + ',left=' + newLeft +',top=60,menubar=0,status=0,scrollbars=0,directories=0');
			objPopup.focus();
	}
