/* ======================================================================
js/cafe.js

====================================================================== */

/* ======================================================================
FUNCTION: 	winOpen(URL,h,w), winOpenExtra(URL,h,w), presOpen(URL,h,w)

INPUT:		string for URL
				
RETURNS:		void
						
====================================================================== */
function winOpen(URL,h,w) {
if (typeof h == 'boolean') tool = (h)? "menubar,":"toolbar," // e.g., winOpen('help.htm',false) gives toolbar
else tool = ''
if (typeof h != 'number') h = 500
if (typeof w != 'number') w = 550
if (typeof newWindow == 'object' && navigator.appVersion.indexOf('MSIE 4')==0 && !newWindow.closed) newWindow.close()
var nW = 'newWindow = window.open(URL, "newWin", tool + "scrollbars,resizable,status,height=' + h + ',width=' + w + '")'
eval(nW)
		newWindow.focus()
}  

function void1() {}

	var nW
function winOpenExtra(URL,h,w) {
if (typeof h == 'boolean') tool = "menubar," // e.g., winOpen('help.htm',true) gives toolbar
else tool = ''
if (typeof h != 'number') h = 500
if (typeof w != 'number') w = 550
nW = 'extraWindow = window.open(URL, "extraWin", tool + "scrollbars,resizable,status,height=' + h + ',width=' + w + '")'
if (typeof extraWindow == 'object' && !extraWindow.closed) {
	extraWindow.location = URL
	extraWindow.focus()
	}
else {
	eval(nW)
	extraWindow.focus()
	}
}  

function presOpen(URL,h,w) {
if (typeof h != 'number') h = 450
if (typeof w != 'number') w = 700
var tool = ''
if (screen.height < 575) {
	w=640
	URL = URL.substring(0,URL.length-4) + '1' + '.htm'
	tool = 'toolbar,'
	}
pW = 'presWindow = window.open(URL, "presWin", "' + tool + 'scrollbars,resizable,status,height=' + h + ',width=' + w + '")'
if (typeof presWindow == 'object' && !presWindow.closed) {
	presWindow.location = URL
	presWindow.focus()
	}
else {
	eval(pW)
	presWindow.focus()
	}
}  