
// ***************************************
// ******* XY Positioned popup window ****
// ***************************************

function spawnWindow_positioned(mypage, myname, w, h, scroll, resize, menu,toolbar) {

// ***** window position will be 200 pixels from the left of the parent window
var winl = 0;

// ***** window position will be 50 pixels from the top of the parent window
var wint = 0;

// ***** window properties
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize+',menubar='+menu+',toolbar=no,status=no,toolbar='+toolbar+''

// ***** open popup window
win = window.open(mypage, myname, winprops)

// ***** if browser >= 4 then focus window
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	
}
// ******* END XY Positioned popup window *********




// ***************************************
// ******* Centered popup window *********
// ***************************************

function spawnWindow_centered(mypage, myname, w, h, scroll, resize, menu,toolbar) {

// ***** window width minus popup window width divided by 2
var winl = (screen.width - w) / 2;

// ***** window height minus popup window height divided by 2
var wint = (screen.height - h) / 2;

// ***** window properties
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize+',menubar='+menu+',toolbar='+toolbar+''

// ***** open popup window
win = window.open(mypage, myname, winprops)

// ***** if browser >= 4 then focus window
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	
}
// ******* END Centered popup window *********


