var Popup = Class.create();
Popup.prototype =
{
	initialize: function(options)
	{
		this.options = {
					url: '#',
					width: 400,
					height: 250
					};
		Object.extend(this.options, options || {});
		if(!this.options.left){
			newLeft = window.screenLeft || screenX;
			if((newLeft+100) > (screen.width-this.options.width)){
				this.options.left = 0;
			}else{
				this.options.left = newLeft+100;}
		}
		if(!this.options.top){
			newTop = window.screenTop || screenY;
			if((newTop+10) > (screen.height-this.options.height)){
				this.options.top = 0;}
			else{
				this.options.top = newTop+10;}
		}
		this.window1 = window.open(this.options.url, '', 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width='+this.options.width+',height='+this.options.height+',left='+this.options.left+',top='+this.options.top);
		return this;
	}
};