// Window Open
function winBRopen(theURL, Name, popW, popH, scroll) { // V 1.0
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable'
	Win = window.open(theURL, Name, winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
	}
	
function chartWin(imgname) { //v2.0
  theURL='../php/showchart.php?id='+imgname;
  window.open(theURL,'chart','width=32,height=32,scrollbars=no,toolbar=no, resizable=yes, location=no');
}
function imgWin(imgname) { //v2.0
  theURL='../php/show_image.php?id='+imgname;
  window.open(theURL,'img','width=32,height=32,scrollbars=no,toolbar=no, resizable=yes, location=no');
}
<!-- Begin

/* Message to be displayed */
function pageTop() { 
var topOfPageMsg='<a href="#" class="top">Top of Page</a>';

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;
var ns6=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1;
var ns4=document.layers;
lC=(ie4)? document.body.scrollHeight : document.height;
rC=(ie4)? document.body.clientHeight : window.innerHeight-20;
if(lC>rC) {
	document.write(topOfPageMsg);
}
var agt=navigator.userAgent.toLowerCase();
function nsReload() { window.location.reload(); }
function reLoad() {
	if (ns4&&(agt.indexOf("win")!=-1)) {
		setTimeout("window.onresize=nsReload", 500);
	}
}
if(ns4) {
	reLoad();
}
else if(ie4) {
	window.onresize=new Function("window.location.reload()");
}
}
//  End -->
