var AbsoluteWin = {
	create: function(id,left,top,display)
	{
		try
		{
			var docheight = typeof(window.innerHeight) == 'number' ? window.innerHeight : document.documentElement.clientHeight;
			var docwidth = typeof(window.innerWidth) == 'number' ? window.innerWidth : document.documentElement.clientWidth;
			
			if(typeof(left) == 'number')
			{
				$(id).style.left = left + 'px';
			}
			else
			{
				var parentwidth = typeof($(id).parentNode.offsetWidth) == 'number' ? $(id).parentNode.offsetWidth : docwidth;
				$(id).style.left = ((parentwidth / 2) - ($(id).offsetWidth / 2)) + 'px';	
			}
			
			if(typeof(top) == 'number')
			{
				$(id).style.top = top + 'px';
			}
			else
			{
				$(id).style.top = ((docheight / 2) - ($(id).offsetHeight / 2)) + 'px';	
			}

			this.fix(id);
			
			$(id).style.display = display;
			
			$(id).makeDraggable({handle: $(id + '_handle')});
		}
		catch(e) {}
	},
	
	show: function(id)
	{		
		$(id).style.marginTop = getScrollTop() + 'px';
		$(id).style.display = 'block';
	},
	
	fix: function(id)
	{
		var divin = $(id).getElementsByTagName('div');

		for(var i = 0; i < divin.length; i++)
		{
			if(divin[i].className == 'popup_left')
			{
				left = divin[i];
			}
			else if(divin[i].className == 'popup_right')
			{
				right = divin[i];
			}
			else if(divin[i].className == 'popup_content')
			{
				content = divin[i];
			}
		}
		
		left.style.height = (content.offsetHeight + 22) + 'px';
		right.style.height = (content.offsetHeight + 22) + 'px';
	}
}