
TVentana.prototype.Ancho      = 550;
TVentana.prototype.Alto       = 400;
TVentana.prototype.Centrar    = true;
TVentana.prototype.Handle     = null;
TVentana.prototype.Menu       = false;
TVentana.prototype.Nombre     = "";
TVentana.prototype.ScrollBars = true;
TVentana.prototype.Status     = false;
TVentana.prototype.URL        = "";


TVentana.prototype.focus = function ()
{
	this.Handle.focus ();
}

TVentana.prototype.Reload = function (URL)
{
	if (this.Handle)
	{	this.Handle.location.reload (URL);
		this.Handle.focus ();
	}
}


TVentana.prototype.Open = function ()
{
	var Propiedades = "";
	var Left        = 0;
	var Top         = 0;
	
	Propiedades = "width=" + this.Ancho + ",height=" + this.Alto;
	if (this.Menu) Propiedades += ',menubar=yes,titlebar=yes,toolbar=yes,location=yes,status=yes,resizable=yes';
	if (this.Centrar)
	{	Left  = (screen.availWidth - this.Ancho) / 2;
		Top   = (screen.availHeight - this.Alto) / 2;
		Propiedades += ",top=" + Top + ",left=" + Left;
	}
	if (this.ScrollBars) Propiedades += ",scrollbars";
	if (this.Status) Propiedades += ",status=yes";
	this.Handle = window.open (this.URL, this.Nombre, Propiedades);
};

function TVentana ()
{
}
