function NewWindow(mypage,myname,w,h,scroll){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='resizable=yes';
win=window.open(mypage,myname,settings);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function PopUp2(nId, nWidth, nHeight)
{
    if(typeof WindowPopUp != "undefined")
            WindowPopUp.close();
    
    WindowPopUp = window.open("popup_image.php?id="+nId, "image", "left="+((screen.width-nWidth)/2)+", top="+((screen.height-nHeight)/2)+", width="+nWidth+", height="+nHeight+", scrollbars=yes");
    WindowPopUp.focus();
    }

function PopUp(strFile, nWidth, nHeight)
{
    if((typeof WindowPopUp != "undefined") && (WindowPopUp != null))
        WindowPopUp.close();

    WindowPopUp = window.open("popup.php?file="+strFile, "popup", "left="+((screen.width-nWidth)/2)+", top="+((screen.height-nHeight)/2)+", width="+nWidth+", height="+nHeight);
    if(WindowPopUp != null)
        WindowPopUp.focus();
}



		<!--
		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		function setFooter() {
			if (document.getElementById('footer')) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var contentMain = document.getElementById('container').offsetHeight;
					var contentHead = document.getElementById('header').offsetHeight;
					var contentLeftcol = document.getElementById('left_col').offsetHeight;
					var contentRightcol = document.getElementById('right_col').offsetHeight;
					var footerElement = document.getElementById('footer');
					var footerHeight  = footerElement.offsetHeight;
					var rightHeightElement  = document.getElementById('right_col');
					if (contentHead + contentLeftcol + footerHeight >= contentRightcol) {
						//footerElement.style.position = 'absolute';
						//footerElement.style.top = (windowHeight - footerHeight) + 'px';
						rightHeightElement.style.height =	(contentLeftcol) + 'px'; //(windowHeight - (contentHead + footerHeight) + 10 + 'px');
					}
					else {
						rightHeightElement.style.height =	 'auto';
						//contentRightcol.style.height = 2000 + 'px';
						//footerElement.style.position = 'static';
					}
				}
			}
		}
		window.onload = function() {
			setFooter();
		}
		window.onresize = function() {
			setFooter();
		}