function popup(page, width, height, windowname) {

    var tmp;
	var winWidth = width;
	var winHeight = height;
	var posLeft = (screen.availWidth - winWidth) / 2;
	var posTop = (screen.availHeight - winHeight) / 2;

        oPopupWin = window.open(page,windowname,"alwaysRaised=1,dependent=0,height=" + height + ",location=0,menubar=0,personalbar=0,scrollbars=1,status=0,toolbar=0,width=" + width + ",resizable=1");

	if(posLeft>0 && posTop>0){
		oPopupWin.moveTo(posLeft,posTop);
	}
	else{
		oPopupWin.moveTo(0, 0);
	}

        //Open the popup window
        oPopupWin.focus();
        return !oPopupWin;
}
// Global to store handle to popup window.
var oPopupWin;

function show(id){
	if(document.getElementById)
		document.getElementById(id).style.display = "inline";
}
function hide(id){
	if(document.getElementById)
		document.getElementById(id).style.display = "none";
}

function loadPage(url){
	window.location.href = url;
}

