function winresize(HW,HWT,Rws,Margin,Titulo)
{
	var HT, HWD, Tolerance;
	Tolerance = 10 * Rws;
	HT=BHeight() - Titulo;
	if (HWT <= (HT-Tolerance))
	{
		HWD =((HT-Tolerance) - HWT)/Rws;
		return HW + HWD - Margin;
	}
	else
	{
		return HW;
	}
}
