

// ----------------------------------------------------------------------------
// WHAT WE DO / WORK 


// On this page, the user can choose to open up a pop-open window that displays samples
// relevant to the case study the user is currently viewing.

function displaySample(caseStudyID) { 

	var url = 'workSample.php?caseStudyID=' + caseStudyID;

	var winWidth = 900;
	var winHeight = 540;
	
	var x = (640 - winWidth)/2, y = (480 - winHeight)/2;
	if (document.body) {
		y = (document.body.scrollHeight - winHeight)/2;
		x = ((document.body.scrollWidth - winWidth)/2) ;  // 5px adjust for shadow area on page+ 5
	}
	if (document.body.scrollWidth > 1800) {
		x = ((document.body.scrollWidth/2) - winWidth)/2;
	}
	detailWin = window.open(url, "detailWin", "width=" + winWidth + ",height=" + winHeight + ",status=0,scrollbars=no,toolbar=no,resizable=yes,screenX=" + x + ",screenY=" + y + ",top=" + y + ",left=" + x);		
	detailWin.focus();

}