function open_window(url, width, height, scrollbars, resizable)
{
	if (url != undefined)
    {
    	if (url != '')
        {
        	if (width == undefined)
            	var width = Math.round(screen.width / 2);
			if (height == undefined)
            	var height = Math.round(screen.height / 2);

			width += 20; height += 30;
  			if (width > screen.width - 8) width = screen.width - 8;
  			if (height > screen.height - 36) width = screen.width - 36;

            if (scrollbars == undefined)
            	var scrollbars = false;
            if (resizable == undefined)
            	var resizable = true;

  			var scrollbars = (scrollbars) ? 'yes' : 'no';
  			var resizable = (resizable) ? 'yes' : 'no';
  			var date = new Date();
  			var name = String(date.getMilliseconds());
  			win1 = window.open(url, name, 'top=8,left=8,width='+width+',height='+height+',resizable='+resizable+',scrollbars='+scrollbars);
        }
    }
}

function setBrs(el)
{
	if (typeof el != 'undefined')
	{
		if (typeof el == 'object')
		{
			el.value = el.value.replace("\n", "<br>\n");
		}
	}
}
