// JavaScript Document
// Author: Moreschi Paolo
// Title: open new window plus
// Version: 0.4a

function openMywindw(URL, winName, h, w, posy, posx, property) {
	if ((posy == "center" && posx == "center") && (h !== "autofit" && w != "autofit")) {
		var mPosy = (screen.height - h) / 2;
		var mPosx = (screen.width - w) / 2;
		var normalproperty = 'height='+h+',width='+w+',top='+mPosy+',left='+mPosx+','+property
		window.open(URL, winName, normalproperty);
	} else if ((h == "autofit" && w == "autofit") && (posy != "center" && posx != "center")) {
		var mH = screen.height;
		var mW = screen.width;
		var fullproperty = 'height='+mH+',width='+mW+',top=0,left=0,'+property
		window.open(URL, winName, fullproperty);
	} else if ((h != "autofit" && w != "autofit") && (posy != "center" && posx != "center")) {
		var nproperty = 'height='+h+',width='+w+',top='+posy+',left='+posx+','+property
		window.open(URL, winName, nproperty);
	}
}
function openNewWindow(URLtoOpen, windowName, windowFeatures) { 
	newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}