function OpenWindow(URL, Width, Height, CanScroll, CanResize, HasMenuBar)
{
	
	var ScrollBars, Resize, MenuBar;
	
	if(CanScroll==undefined)
	{
		ScrollBars = 0;
	}
	else
	{
		ScrollBars = 1;
	}
	
	if(CanResize==undefined)
	{
		Resize = ",resizable=0";
	}
	else
	{
		Resize = ",resizable=1";
	}
	
	if(HasMenuBar==undefined)
	{
		MenuBar = ",menubar=0";
	}
	else
	{
		MenuBar = ",menubar=1";
	}
	
    var newwindow = window.open(URL, "search", "toolbar=0,location=0,directories=0,status=0" + MenuBar + ",scrollbars=" + ScrollBars + Resize +",width=" + Width + ",height=" + Height);
    newwindow.focus();
    newwindow.moveTo((screen.width/2) - (Width/2), (screen.height/2) - (Height/2));
}