function openWin(page, name, w, h, scroll,resizable, status) {
	var winl = (screen.width - w) / 2;
   	var wint = (screen.height - h) / 2;
   	winprops = "height=" + h + ",width=" + w + ",top="+ wint + ",left="+ winl +
   	           ",scrollbars=" + scroll + ",resizable=" + resizable +
   	           ",status=" + status;
   	win = window.open(page, name, winprops);
   	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

function openWinXY(page, name, w, h, x,y,scroll,resizable, status) {	
   	winprops = "height=" + h + ",width=" + w + ",top="+ x + ",left="+ y +
   	           ",scrollbars=" + scroll + ",resizable=" + resizable +
   	           ",status=" + status;
   	win = window.open(page, name, winprops);
   	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

var winheight=100
var winsize=100
var x=5

function openwindow(page, name, w, h, scroll,resizable, status){
	temploc=page
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
   	winprops = "height=" + h + ",width=" + w + ",top="+ wint + ",left="+ winl +
   	           ",scrollbars=" + scroll + ",resizable=" + resizable +
   	           ",status=" + status;

	if (!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById)){
		window.open(page)
		return
	}
	win2 = window.open("", name, winprops);

	win2.moveTo(winl,wint)
	win2.resizeTo(100,100)
	go2(w, h)
}

function go2(w, h){
	var go = "go2("+w+","+h+")";
	if (winheight>=h)
		x=0
	win2.resizeBy(5,x)
	winheight+=5
	winsize+=5
	if (winsize>=w){
		win2.location=temploc
		winheight=100
		winsize=100
		x=5
		return
	}
	setTimeout(go,1)
}
