/*
 * Desktop Class. 
 *  Version: 1.0.1
 *		Copyright 2002 John Cowen
 *		http://www.johncowen.com
 */
function Desktop(b)
{
	this.browser = b;
	this.screenWidth = screen.width;
	this.screenHeight = screen.height;
	this.windows = new Object(); // should be an array containing windows objects
	this.popX = null;
	this.popY = null;
}
Desktop.prototype.setPopPosition = function(x, y)
{
	this.popX = x;
	this.popY = y;
};
Desktop.prototype.popCentered = function()
{
	this.popX = null;
	this.popY = null;
};
Desktop.prototype.popWindow = function(f, n, w, h, p)
{
	if(this.browser.isMac)
	{
		w -= 16;
		h -= 16;
	}
	var winLeft = this.popX != null ? this.popX : (this.screenWidth - w) / 2;
	var winTop = this.popY != null ? this.popY :  (this.screenHeight - h) / 2;
	var winProps = 'height=' + h + ',width=' + w + ',top=' + winTop + ',left=' + winLeft + ',' + p;

	this.windows[n] = window.open(f, n, winProps);
	return this.windows[n];
};

var d1 = new Date(2010, 8, 3); // fecha usada para los popup de las vacaiones (mes-1)
