var secs=new Array("client", "screen", "objective", "solution", "result", "link", "date");
var curSec=0;
var projectPage;

function sl(idx) {
	document.getElementById("main_portfolio").style.visibility="hidden";
	document.getElementById("portfolio_link").style.visibility="hidden";

	for (c=0; c<secs.length; c++) {
		document.getElementById(secs[c]).innerHTML=document.getElementById(secs[c]+idx).innerHTML;
	}
	
	for (c=1; c<=5; c++) {
		document.getElementById("pf"+c).className="selOff";		
	}

	document.getElementById("pf"+idx).className="selOn";
	document.getElementById("main_portfolio").style.visibility="visible";
	document.getElementById("portfolio_link").style.visibility="visible";
}

function init() {
	sl(1);
}

function showProject(c) {
	var t=parseInt((screen.availHeight-370)/2);
	var l=parseInt((screen.availWidth-314)/2);
	projectPage=window.open("/portfolio/"+c+"_project.html", c+"project", 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=314,height=370,top='+t+',left='+l);
}