function new_win(url, width_x, height_x){
	window.open(url, '', 'height=500,width=600,scrollbars=yes,resizable=yes,menubar=no');
} 
function resize_window(w, h){
	w += ( w < 600 ) ? ( 600 - w ) : 50;
	h += 220;
var is=new Is();	
	if(is.ns4) {
	  window.innerWidth=w;
	  window.innerHeight=h;
	
	  var Xcor=(screen.width-window.outerWidth)/2;
	  var Ycor=(screen.height-window.outerHeight)/2
	  window.moveTo(Xcor,Ycor);
	} else if(is.ie4) { 
	
	  h+=10;var Ycor=(screen.height-h)/2;
	  var Xcor=(screen.width-w)/2;
	  window.moveTo(Xcor,Ycor);window.resizeTo(w,h);
	}
}

function Is() {
	var agent=navigator.userAgent.toLowerCase();
  this.major=parseInt(navigator.appVersion);
  this.minor=parseFloat(navigator.appVersion);
  this.ns=((agent.indexOf('mozilla')!=-1)&&((agent.indexOf('spoofer')==-1)&&(agent.indexOf('compatible')==-1)));
  this.ns4=(this.ns&&(this.major>=4));
  this.ie=(agent.indexOf("msie")!=-1);
  this.ie4=(this.ie&&(this.major>=4));
}
