function openwin(theURL, wname, W, H, X, Y) {

	var isie = false
	var isv55= false
	var iswin= false

	if ( navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4 ) {
		isie=true
		if ( navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE ")+5,navigator.appVersion.indexOf("MSIE ")+8) >= 5.5 ) isv55=true;
	}

	if ( navigator.userAgent.toLowerCase().indexOf("win")!=-1 ) iswin=true

	if (X==null) var X = Math.ceil( (window.screen.width  - W) / 2 );
	if (Y==null) var Y = Math.ceil( (window.screen.height - H) / 2 );

	if (isie) { H=H+40+3; W=W+12; }
	var s = ",width="+ W +",height="+ H ;

	if (isie && iswin) {

		var CWIN = window.open( theURL , wname, "fullscreen=0,scrollbars=1,resizable=1"+s);
		CWIN.resizeTo( Math.ceil( W ) , Math.ceil( H ) );
		CWIN.moveTo( Math.ceil( X ) , Math.ceil( Y ) );

	}
	else    {
		var CWIN = window.open(theURL, wname, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1"+s, true);
	}

	CWIN.focus();
}
