function window_open(url, win_width, win_height) {
	
	var screen_width = window.screen.width;
	var screen_height = window.screen.height;
	
	var win_left = screen_width / 2 - win_width / 2;
	var win_top = screen_height / 2 - win_height / 2;
	
	var win = window.open(url, "", "width=" + win_width + ", height=" + win_height + ", location=0, menubar=0, resizable=0, status=0, titlebar=0, toolbar=0, screenX=100, left=" + win_left + ", screenY=30, top=" + win_top);
 	
}

function window_open_resizable(url, win_width, win_height) {
	
	var screen_width = window.screen.width;
	var screen_height = window.screen.height;
	
	var win_left = screen_width / 2 - win_width / 2;
	var win_top = screen_height / 2 - win_height / 2;
	
	var win = window.open(url, "", "width=" + win_width + ", height=" + win_height + ", location=0, menubar=0, resizable=1,scrollbars=1 status=0, titlebar=0, toolbar=0, screenX=100, left=" + win_left + ", screenY=30, top=" + win_top);
 	
}

function window_open_resizable_images() {
	
	var win_width = arguments[0];
	var win_height = arguments[1];
	
	var screen_width = window.screen.width;
	var screen_height = window.screen.height;
	
	var win_left = screen_width / 2 - win_width / 2;
	var win_top = screen_height / 2 - win_height / 2;
	
	var win = window.open("", "images", "width=" + win_width + ", height=" + win_height + ", location=0, menubar=0, resizable=1,scrollbars=1 status=0, titlebar=0, toolbar=0, screenX=100, left=" + win_left + ", screenY=30, top=" + win_top);
 	
	win.document.writeln("<html>");
	win.document.writeln("<head>");
	win.document.writeln("<title>" + arguments[2] + "</title>");
	win.document.writeln("<body>");
	for (var i = 3; i < arguments.length; i += 1) {
		win.document.writeln("<p><img src=\"" + arguments[i] + "\"></p>");
	}
	win.document.writeln("</body>");
	win.document.writeln("</html>");
	
	win.document.close();
	
	win.focus();
	
}

