
function show_popup(filename, w, h){
	var imw = window.open(filename,'imagewindow','width='+w,'height='+h);
    var x,y;
	if (imw.innerHeight){ // all except Explorer
	    x = imw.innerWidth;
		y = imw.innerHeight;
	}else if (imw.document.documentElement && imw.document.documentElement.clientHeight){
		// Explorer 6 Strict Mode
	    x = imw.document.documentElement.clientWidth;
	    y = imw.document.documentElement.clientHeight;
	} else if (imw.document.body){ // other Explorers
        x = imw.document.body.clientWidth;
        y = imw.document.body.clientHeight;
    }
	if ((Math.abs(w-x) > 10)||(Math.abs(h-y) > 10))
		imw.resizeTo(w,h);
	// if the popup window is underneath, put it on top
	if (window.focus) imw.focus();
}
