function openWin(url, name, w, h, perc, scroll, resize) {
	var winX = (screen.availWidth - w)*perc*.01;
	var winY = (screen.availHeight - h)*perc*.01;
	popupWin = window.open(url, name,'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY + ',scrollbars=' + scroll + ',resizable=' + resize);
}

function openWinCentered(mypage, myname, w, h, scroll, resize) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize;
	win = window.open(mypage, myname, winprops)
}

function openOfficePics() {
	openWinCentered('image.php?i=130granby.jpg', 'officepics', 750, 600, 0, 0);
}

function openDramaFlier() {
	openWinCentered('image.php?i=drama_postcard.jpg', 'dramaflier', 500, 667, 0, 0);
}

function openDramaPics() {
	openWinCentered('content/drama_party/', 'dramaparty', 550, 443, 0, 0);
}

function openDOFL() {
	openWinCentered('content/fullcircle/', 'fullcircle', 570, 576, 0, 0);
}

function fix_scroll(w, h, elm) {


	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	 }
	}


	if(winH < h) {
		document.getElementById(elm).style.height = h;
	} else {
		document.getElementById(elm).style.height = "100%";
	}

	if(winW < w) {
		document.getElementById(elm).style.width = w;
	} else {
		document.getElementById(elm).style.width = "100%";
	}
}