function popUp ( url, name, width, height, positioner, xOffset, yOffset, features ) 
{
	new popUpObject ( url, name, width, height, positioner, xOffset, yOffset, features );
}

function popUpObject ( url, name, width, height, positioner, xOffset, yOffset, features) 
{
	this.url				 = url;
	this.name				 = name;
	this.width				 = eval (width);
	this.height				 = eval (height);
	this.positioner			 = positioner;
	this.xOffset			 = xOffset;
	this.yOffset			 = yOffset;	
	this.features			 = features;

	this.construct();
}

popUpObject.prototype.construct = function ( )
{	
	if ( this.width != null && this.height != null )
	{
		this.features += ",width=" + this.width + ",height=" + this.height;
	}

	this.positioner( this.xOffset, this.yOffset );

	this.popUpWindow = window.open ( this.url, this.name, this.features );

	this.popUpWindow.focus ( );
}

popUpObject.prototype.reSize = function ( width, height )
{
	if ( this.width != null && this.height != null )
	{
		this.width				 = eval (width);
		this.height				 = eval (height);
	}
		
	var currentW = this.popUpWindow.cbe.width();
	var currentH = this.popUpWindow.cbe.height();
		
	if ( (currentW != this.width) || (currentH != this.height) )
	{
		var diffW = this.width - currentW;
		var diffH = this.height - currentH;

		this.popUpWindow.resizeBy ( diffW, diffH );
	}

	this.popUpWindow.focus ( );
}

popUpObject.prototype.loadUrl = function ( url )
{
	this.url = url;
	
	this.popUpWindow.open ( this.url, "_self" );

	this.popUpWindow.focus ( );
}


