var AlvogenPopup = new Class({
	Implements: [Options, Events],
	options: {
		width: 300
	},
	initialize: function(element,options){
		this.setOptions(options);
		this.content = element;
		
		this.Create();
		
		
		
	},
	Create: function(){
		
		this.popup_wrap = new Element('div', {
			'class': 'popup-wrap',
			'styles': {
				'position': 'absolute',
				'z-index': 1000,
				'top': 0,
				'left': 0,
				'width': this.options.width,
				'opacity': 0
			}
		}).inject( $('Disillserversideform1') );
		
		this.close = new Element('div', {
			'class': 'close',
			'html': 'Close Window'
		}).inject( this.popup_wrap );
		
		this.close.addEvent('click', (function(){
			this.Hide();
		}).bind(this));
		
		this.content.inject( this.popup_wrap );
		this.content.setStyle('display', 'block');
	},
	Show: function(){
		
		this.Position();
		this.popup_wrap.fade('in');
		
	},
	Hide: function(){
		
		//this.Position();
		this.popup_wrap.fade('out');
		
	},
	Position: function(){
		var WinSize = window.getSize();
		var WinScroll = window.getScroll();
		var PopSize = this.popup_wrap.getSize();
		
		this.popup_wrap.setStyles({
			'top': ( ( document.getSize().y / 2 ) - (PopSize.y - 2 ) ) + 100 + ( WinScroll.y ),
			'left': (WinSize.x / 2) - ( PopSize.x / 2 )
		});
		
		
	}
});
