function isIE5() { return (navigator.userAgent.indexOf("MSIE 5") > -1); }
function isIE6() { return ((navigator.userAgent.indexOf("MSIE 6") > -1) && (navigator.userAgent.indexOf("Opera") == -1)); }
function isIE() { return (isIE5() || isIE6());}

n4=(document.layers);
n6=(document.getElementById&&!document.all);
ie=(document.all);

function zoom(url,ww,hh,id){
	var wX=10;
	var wY=10;
	if(!ie && !n6){
		ww+=15;
		hh+=15;
	}
	if(ie || n6){
		wX=(screen.availWidth-(ww+5))*.5;
		wY=(screen.availHeight-(hh+20))*.5;
	}
	return popup=window.open(url,id,"scrollbars=0,resizable=0,width="+ww+",height="+hh+",left="+wX+",top="+wY);
}

function pop(url,ww,hh,id){
	var wX=10;
	var wY=10;
	if(!ie){
		ww+=15;
		hh+=15;
	}
	if(ie || n6){
		wX=(screen.availWidth-(ww+5))*.5;
		wY=(screen.availHeight-(hh+20))*.5;
	}
	return popup=window.open(url,id,"scrollbars=1,resizable=1,width="+ww+",height="+hh+",left="+wX+",top="+wY);
}


function show_image(url,name) {
   var windowWidth = 800;
   var windowHeight = 600;
   var centerWidth = (window.screen.width - windowWidth) / 2;
   var centerHeight = (window.screen.height - windowHeight) / 2;
   newWindow = window.open(url+'&showimg='+name,'198','scrollbars=no,height='+windowHeight+',width='+windowWidth);
   newWindow.moveTo(centerWidth, centerHeight);
   newWindow.blur();
   newWindow.focus();
   return newWindow.name
}
