function popup(mypage, myname, w, h, scroll) {

	wh = screen.height;
	ww = screen.width;

	wleft = Math.round((ww - w) / 2);
	wtop = Math.round((wh - h) / 2) - 30;

	winprops = 'height='+h+',width='+w+',left='+wleft+',top='+wtop+',scrollbars='+scroll+',resizable=0';
	win = window.open(mypage, myname, winprops);
	win.window.focus();
}


function popup_blur(mypage, myname, w, h, scroll) {

	wh = screen.height;
	ww = screen.width;

	wleft = Math.round((ww - w) / 2);
	wtop = Math.round((wh - h) / 2) - 30;

	winprops = 'height='+h+',width='+w+',left='+wleft+',top='+wtop+',scrollbars='+scroll+',resizable=0';
	win = window.open(mypage, myname, winprops);

	win.window.blur();
	win.opener.focus();
}




function popup_empty() {
	if(document.getElementById("popcontent").innerHTML.length == 0)this.close();

}
