function window_opener(w,h,page){

	//ah = available screen height, aw = available screen width
	var ah = screen.availHeight
	var aw = screen.availWidth
	//ph - where the window horizontal top will be positioned to
	//pw - where the window left edge will be positioned to
	var ph = ah/2-(h/2)
	var pw = aw/2-(w/2)
	
	window.open(page,'openedpage','width='+w+',height='+h+',status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,left='+pw+',top='+ph);
}

function window_opener_s(w,h,page){

	//ah = available screen height, aw = available screen width
	var ah = screen.availHeight
	var aw = screen.availWidth
	//ph - where the window horizontal top will be positioned to
	//pw - where the window left edge will be positioned to
	var ph = ah/2-(h/2)
	var pw = aw/2-(w/2)
	
	window.open(page,'openedpage','width='+w+',height='+h+',status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,left='+pw+',top='+ph);
}

/* Opens up a window with resizable and status bar properties. */
function window_opener_s_r(w,h,page){

	//ah = available screen height, aw = available screen width
	var ah = screen.availHeight
	var aw = screen.availWidth
	//ph - where the window horizontal top will be positioned to
	//pw - where the window left edge will be positioned to
	var ph = ah/2-(h/2)
	var pw = aw/2-(w/2)
	
	window.open(page,'openedpage','width='+w+',height='+h+',status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,left='+pw+',top='+ph);
}

function courseWin(hole) {
	holePage = 'hole.cfm?h=' + hole;
	window_opener('538','510',holePage);
}