function RSS_OpenWindow(e, windowName, url, height, width, left, top, resizable, scrollbars, toolbar, status, location) {
	var openerXPosition = e.screenX;
	var openerYPosition = e.screenY;
    
    
    var options = "";
    
    if(height > 0) {
		options = options + "height=" + height + "px,";
	}
	if(width > 0) {
		options = options + "width=" + width + "px,";
	}
	if(left > 0) {
		options = options + "left=" + left + "px,";
	}
	else {
	    var _left = openerXPosition;
    	
	    _left -= width / 2;
    	
	    //correction for 2 monitors
	    var positionScreenLeft = 0;
	    if(openerXPosition > screen.width) {
		    positionScreenLeft = screen.width;
	    }
    	
	    //if the dialog opens more then 30 pixels to the edge of the screen, modify the left to minus 70 pixels
	    if((left + this.Width) > (positionScreenLeft - 30 + screen.width)) {
		    _left = positionScreenLeft + screen.width - this.Width - 70;
	    }
	    if(left < positionScreenLeft) {
		    _left = positionScreenLeft + 50;
	    }

		options = options + "left=" + _left + "px,";
	}
	if(top > 0) {
		options = options + "top=" + top + "px,";
	}
	else {
	    var _top = openerYPosition;
	
	    _top -= height / 2;
    	
	    //if the dialog opens more then 30 pixels to the bottom, modify the top to minus 80 pixels
	    if((_top + height) > screen.availHeight - 30) {
		    _top = screen.availHeight - height - 100;
	    }
    	
	    if(_top < 0) {
		    _top = 50;
	    }

		options = options + "top=" + _top + "px,";
	}

    options = options + "resizable=" + Number(resizable) + ",scrollbars=" + Number(scrollbars) + ",toolbar=" + Number(toolbar) + ",status=" + Number(status) + ",location=" + Number(location)

    newWindow = window.open(url, windowName, options);
    newWindow.focus();
}


