function open_window(the_url, the_name, the_width, the_height){ 
	the_width -= 0;
	the_height -= 0;
	var screen_width = screen.availWidth;
	var screen_height = screen.availHeight;
	var the_toolbar = "no";
	var the_addressbar = "no";
	var the_directories = "no";
	var the_statusbar = "yes";
	var the_menubar = "no";
	var the_scrollbars = "yes";
	var the_do_resize =  "yes";
	var the_copy_history = "yes";
	//alert('screen_width=' + screen_width + ', screen_height=' + screen_height + ', the_width=' + the_width + ', the_height=' + the_height);
	
	if ((the_height+60) >= screen_height) {
		the_height = screen_height - 60;
	}
	if ((the_width+50) >= screen_width) {
		the_width = screen_width - 50;
	}	
	
	top_pos = (screen_height/2) -  (the_height/2) - 30;
	if (top_pos < 0) {
		top_pos = 0;
	}
	left_pos = (screen_width/2) -  (the_width/2);
	/*if (window.outerWidth ){
		alert('outerwidth');
		var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",outerWidth="+the_width+",outerHeight="+the_height+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
		site=open(the_url, the_name, option);
		var Opera = (navigator.userAgent.indexOf('Opera') != -1);
		if(Opera){
			site.resizeTo(the_width,the_height);
			site.moveTo(0,0);
		}
	}
	else
	{*/
		//alert('else');
		var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",Width="+the_width+",Height="+the_height+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
		site=open('', the_name, option);
		site.location=the_url;
		if(site.open){site.focus();return false;}
		//site.resizeTo(the_width,the_height);
	//}
	
	return false;
}
