// accessible popup window script by alex bovey | alex@bovey.co.uk
// degrades gracefully with no javascript
// sample usage: <a href="popup.html" onclick="popup(this.href,850,550);return false;" onkeypress="this.onclick()">open a popup</a>

var myWin;
function popup(location,width,height) {
	scrollbars = 1;
	status = 1;
	LeftPosition = (screen.width-width) / 2;
	TopPosition = (screen.height-height) / 2;
	attributes = 'scrollbars='+scrollbars+'toolbar=0,location=0,directories=0,status='+status+',menubar=0,resizable=no,height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition;
	myWin = window.open(location, 'popup', attributes)
	myWin.focus();
	return false;
}
