function open_window(target,name,width,height,posx,posy,windowoptions,init_target) {
	var it, wo, px, py

	it = target;
	wo = "location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=no,dependent=yes,top=1,left=1";
	px = py = 0;
	if (typeof posx != "undefined") px = posx;
	if (typeof posy != "undefined") py = posy;
	if ((typeof windowoptions != "undefined") && (windowoptions != "")) wo = windowoptions;
	if (typeof init_target != "undefined") it = init_target;

	if(typeof new_window != "undefined") {
		if(new_window.closed != true) {
			new_window.close();
		}
	}
	new_window = window.open(it,name,"width=" + width + ",height=" + height + "," + wo);
	new_window.location.replace(target);
	new_window.focus();
	return false;
}

function open_window_center(target,name,width,height) {
	var it, wo, px, py;

	px = (screen.width-width) / 2;
	py = (screen.height-height) / 2;
	wo = "location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=no,dependent=yes,top="+py+",left="+px;

	new_window = window.open(target,name,"width=" + width + ",height=" + height + "," + wo);
	new_window.location.replace(target);
	new_window.focus();
	return false;
}