function openScreenSizedWindow(url, horzRathio, vertRathio, centerring, windowAttribute, target){
	
	var props = "";
	
	if(horzRathio == null){ horzRathio = 100; }
	if(vertRathio == null){ vertRathio = 100; }
	if(centerring == null){ centerring = true; }
	
	switch(windowAttribute){
		case "_full":
			props += "menubar=yes,toolbar=yes,location=yes,scrollbars=yes,status=yes,resizable=yes";
			break;
		case "_normal":
			props += "menubar=no,toolbar=no,location=no,scrollbars=yes,status=yes,resizable=yes";
			break;
		case "_none":
			props += "menubar=no,toolbar=no,location=no,scrollbars=no,status=no,resizable=no";
			break;
		case null:
			break;
		default:
			props += windowAttribute;
	}
	
	if(target == null){
		target = "_blank";
	}
	
	var w = Math.floor(screen.width  * horzRathio / 100.0);
	var h = Math.floor(screen.height * vertRathio / 100.0);
	var l = Math.floor((screen.width - w) / 2.0);
	var t = Math.floor((screen.height - h) / 2.0);
	props += ",width=" + w + ",height=" + h;
	if(centerring){
		props += ",left=" + l + ",top=" + t;
	}
	
	try{
		
		var win = window.open(url, target, props);
		win.resizeTo(w, h);
		if(centerring){
			win.moveTo(l, t);
		}
		
	}catch(e){
		if(e.number == 2147024891){
		throw e;
		}
	}
	
	
	
	
	
	
	
}

