﻿


function closeWindow() {
	window.close();
}

function openWindow(url, windowName, props) {
	var wn = windowName == "brotherNewWindow" ? "brotherNewWindow_" + Math.floor(Math.random()*100000) : windowName;
	
	if (props != "" && props != undefined) {
		var wp1 = props.indexOf("width=") + ("width=").length;
		var wp2 = props.indexOf(",height=");
		var wp = screen.width - 20 - Number(props.slice(wp1, wp2));
		props += ",screenX=" + wp + ",screenY=20,left=" + wp + ",top=20";
	}
	window.open(url, wn, props);
	
	
}



