function getbrowserwidth()
    {
    	if (navigator.userAgent.indexOf("MSIE") > 0)
        	{
        		return(document.body.clientWidth);
        	}
        else
            {
            		return window.outerWidth;
            	}
        }
        function getbrowserheight()
            {
            	if (navigator.userAgent.indexOf("MSIE") > 0)
                	{
                		return(document.body.clientHeight);
                	} 
                else
                    {
                    		return(window.outerHeight);
                    	}
                }
                var popup = new Object()
                function CenterPopup(URL, width, height, scroll)
                    {
                    	// get center of browser window
                    	var X = getbrowserwidth() / 2
                    	var Y = getbrowserheight() / 2
                    	
                    	popup = window.open(URL, 'PopUp', 
                    		'scrollbars=no ' +
                    		'width=' + width + ' ' +
                    		'height=' + height + ' ' +
                    		'top=' + (window.screenTop + (Y - (height/2))) + ' ' +
                    		'left=' + (window.screenLeft + (X - (width/2))) 
                    		)                    	
                    	popup.focus()
                }
				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(); }
}