// Opens a new popup window centered on the page according to the width and height of the user's screen.
// You can customize the width, height, and scrollbars on or off for each window you open.
// USAGE:
// <a href="http://www.yahoo.com/" onclick="NewWindow(this.href,'name','400','400','yes');return false;">Popup Yahoo.com</a> 
// The four variables are: name of window, window width, widow height, scrollbars


function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

