function myPopup(opts_obj,opts_mask,opts_close) {
	_obj=$(opts_obj);
	_mask=$(opts_mask);
	_objclose=$(opts_close);
}
myPopup.prototype.pup= function() {
	_this=this;
	_this.mask();
	var _srcoll_top=$(window).scrollTop();
	$(window).bind("scroll", function() {
		_this.srcoll(_srcoll_top)
	});
	var _width=_obj.width(); //获取弹出框宽度
	_height=_obj.height();
	if($.browser.msie && $.browser.version<7) {
		_top=$(window).scrollTop()+($(window).height()-_height)/2;
	} else {
		_obj.css("position","fixed");
		_top=($(window).height()-_height)/2;
	}
	//垂直居中
	var _left=(($("body").width())-_width)/2;
	//设置水平
	_obj.css({
		"top":  _top,
		"left": _left
	})
	.fadeIn(200);
	_objclose.live("click",function(){
		_this.close()
	})
}
myPopup.prototype.close= function() {
	_obj.fadeOut(0);
	_mask.css("display","none");
	$(window).unbind("scroll");
}
myPopup.prototype.mask= function() {
	var mask_height=Math.max($("body").height(),$(window).height());
	var mask_width=$("body").width();
	_mask.css({
		"height":mask_height,
		"width":mask_width,
		"display":"block"
	})
}
myPopup.prototype.srcoll= function(_srcoll_top) {
	var srcoll_top=$(window).scrollTop();
	if($.browser.msie && $.browser.version<7) {
		_obj.css("top",srcoll_top+_top-_srcoll_top);
	} else {
		_obj.css("top",_top)
	}
}

