
$topcmm = jQuery.noConflict();

function fixedwindow()
{
	this.content = "";
	
	this.divmargin = "";
	this.divname = "";
	this.divwidth = "";
	this.divtop = "";
	this.divleft = "";
	
	this.showpop = function()
	{
		$topcmm("#" + this.divname).replaceWith('<div id="' + this.divname + '" class="leightbox">' + this.content + '</div>');
		$topcmm("#" + this.divname).css("display","block");

		var b=window.navigator.userAgent;
		var f="MSIE";
		var a;
		if((a=b.indexOf(f))>=0)
		{
			version=parseFloat(b.substr(a+f.length));
			if(version==6)
			{
				$topcmm("#" + this.divname).css("position","absolute")
			}
			else
			{
				$topcmm("#" + this.divname).css("position","fixed")
			}
		}
		else
		{
			$topcmm("#" + this.divname).css("position","fixed");
		}
		$topcmm("#" + this.divname).css("margin-left",this.divmargin);
		$topcmm("#" + this.divname).css("width",this.divwidth);
		$topcmm("#" + this.divname).css("top", this.divtop);
		$topcmm("#" + this.divname).css("left", this.divleft);
	},
		
	this.hidepop = function()
	{
		$topcmm("#" + this.divname).css("display","none");
	},
		
	this.init = function(obj, bindid, removeid)
	{
		$topcmm(document).ready(function()
		{
			$topcmm("#" + bindid).bind("click", function(){
				obj.showpop();
			});
			$topcmm("#" + removeid).bind("click", function(){
				obj.hidepop();
			});
		});	
	},
		
	this.setContent = function(content)
	{
		this.content = content;
	},
		
	this.setDivMargin = function(divmargin)
	{
		this.divmargin = divmargin;
	},
		
	this.setDivWidth = function(divwidth)
	{
		this.divwidth = divwidth;
	},
		
	this.setDivTop = function(divtop)
	{
		this.divtop = divtop;
	},
	
	this.setDivLeft= function(divleft)
	{
		this.divleft = divleft;
	},
		
	this.setDivName = function(divname)
	{
		this.divname = divname;
	}
}
