document.writeln("<style type=\"text\/css\">");
document.writeln("	img { border:0;}");
document.writeln("	.windows { top:20%; left:20%; margin:0; padding:0;}");
document.writeln("	.windows {width:461px; height:297px; position:relative;}");
//document.writeln("	.windows { background:url(http:\/\/www.463mn.com.cn\/swt\/bg.gif) no-repeat; width:460px; height:244px; position:relative;}");
//document.writeln("	.windows ul { width:250px; position:absolute; left:190px; top:175px; margin:0; padding:0;}");
//document.writeln("	.windows ul li { float:left; list-style:none; padding-top:10px;padding-right:12px;}");
//document.writeln("	.windows ul li img { vertical-align:middle;}");
//document.writeln("	.ico_closed { position:absolute; left:420px; top:13px;}");
//document.writeln("  .windows .lclose{background:url(http:\/\/www.463mn.com.cn\/swt\/close.gif);width:11px; height:11px; border:none;}");
document.writeln("<\/style>");
document.writeln("<div class=\"windows\" id=\"idBox\">");
document.write("<table width=\"461\" height=\"297\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"http:\/\/www.463mn.com.cn\/imgg\/kf_bgimg.gif\"><tr><td valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr><td height=\"37\"><div align=\"right\" style=\"margin-top:2px; margin-right:6px;\"><img src=\"http:\/\/www.463mn.com.cn\/imgg\/close.gif\" width=\"13\" id=\"idBoxCancel\" height=\"13\" /></div></td></tr><tr><td height=\"165\">&nbsp;</td></tr><tr><td height=\"54\"><div align=\"right\" style=\"margin-right:30px;\"><a href=\"http:\/\/www.463mn.com.cn\/kf\/index.php?e=jg&p=jg\" target=\"_blank\"><img src=\"http:\/\/www.463mn.com.cn\/imgg\/zxzx.gif\" width=\"121\" height=\"38\" border=\"0\" /></a>　<a href=\"http:\/\/www.463mn.com.cn\/kf\/index.php?e=jg&p=jg\" target=\"_blank\"><img src=\"http:\/\/www.463mn.com.cn\/imgg\/yygh.gif\" width=\"105\" height=\"38\" border=\"0\" /></a></div></td></tr><tr><td height=\"35\"><div style=\"font-size:12px;　margin-left:13px;\">　　<img src=\"http:\/\/www.463mn.com.cn\/imgg\/ico.gif\" width=\"18\" height=\"18\" /><font style=\"color:#FF0000; font-size:14px;\"><strong>温馨提示:</strong></font>如果您是<font style=\"color:#FF0000; font-size:12px;\"><strong>大连</strong></font>患者，请点击咨询<font style=\"color:#FF0000; font-size:12px;\"><strong>大连</strong></font>在线专家。<a href=\"http:\/\/webservice.zoosnet.net\/LR\/Chatpre.aspx?id=LZA84073287\" target=\"_blank\"><img src=\"http:\/\/www.463mn.com.cn\/imgg\/zx.gif\" width=\"79\" height=\"18\" border=\"0\" /></a></div></td></tr></table></td></tr></table>");
//document.writeln("  	<span style=\"display:none\" class=\"ico_closed\"><input type=\"button\" value=\"\" id=\"idBoxCancel\" class=\"lclose\" /><\/span>");
//document.writeln("  	<ul>");
//document.writeln("      <li><a href=\"http:\/\/www.463mn.com.cn\/kf\/index.php?e=jg&p=jg\" target=\"_blank\"><img src=http:\/\/www.463mn.com.cn\/swt\/zx.gif\"  \/><\/a><\/li>");
//document.writeln("    	<li><a href=\"http:\/\/www.463mn.com.cn\/kf\/index.php?e=jg&p=jg\" target=\"_blank\"><img src=http:\/\/www.463mn.com.cn\/swt\/gh.gif\" \/><\/a><\/li>");
//document.writeln("    <\/ul>");
document.writeln("  <\/div>");
//流量统计
document.write('<script language="javascript" src="http://s16.cnzz.com/stat.php?id=2376650&web_id=2376650"><\/script>');

document.writeln("<div id=\"divQQbox\">");
document.writeln("<div style='text-align:left;margin:0px;padding:0px;width:150px;'><input value=\"\" style=\"display:none\" id=\"rboxCancel\" class=\"rboxclose\" />");
document.writeln("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"129\" height=\"297\" valign=\"top\" background=\"http:\/\/www.463mn.com.cn\/imgg\/zc_bg.gif\" headers=\"296\"><div style=\"text-align:right; height:22px; line-height:22px; margin-top:10px; margin-right:5px;\"><img src=\"http:\/\/www.463mn.com.cn\/imgg\/close.gif\" /></div><div style=\"margin-top:130px; text-align: center; font-size:12px; margin-bottom:10px;\">访客您好！</div><div style=\"text-align:center;\"><a href=\"http:\/\/www.463mn.com.cn\/kf\/index.php?e=jg&p=jg\" target=\"_blank\"><img src=\"http:\/\/www.463mn.com.cn\/imgg\/zc_zx.gif\" /></a></div></td></tr><tr><td height=\"6\"></td></tr><tr><td height=\"86\" valign=\"top\" background=\"http:\/\/www.463mn.com.cn\/imgg\/zc_xbg.gif\"><div style=\"line-height:25px; padding-left: 10px; margin-top: 5px; font-size:12px;\"><strong style=\"font-size:13px; color:#FF0000;\">　&nbsp;友情提示:</strong><br />如果您是<strong style=\"color:#FF0000;\">[大连]</strong>访客<br /><a href=\"http:\/\/webservice.zoosnet.net\/LR\/Chatpre.aspx?id=LZA84073287\" target=\"_blank\"><img src=\"http:\/\/www.463mn.com.cn\/imgg\/zc_xzjzx.gif\" /></a></div></td></tr></table>");
document.writeln("<\/div>");
document.writeln("<\/div>");

var isIE = (document.all) ? true : false;

var isIE6 = isIE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6);

var $ = function (id) {
	return "string" == typeof id ? document.getElementById(id) : id;
};

var Class = {
	create: function() {
		return function() { this.initialize.apply(this, arguments); }
	}
}

var Extend = function(destination, source) {
	for (var property in source) {
		destination[property] = source[property];
	}
}

var Bind = function(object, fun) {
	return function() {
		return fun.apply(object, arguments);
	}
}

var Each = function(list, fun){
	for (var i = 0, len = list.length; i < len; i++) { fun(list[i], i); }
};

var Contains = function(a, b){
	return a.contains ? a != b && a.contains(b) : !!(a.compareDocumentPosition(b) & 16);
}


var OverLay = Class.create();
OverLay.prototype = {
  initialize: function(options) {

	this.SetOptions(options);
	
	this.Lay = $(this.options.Lay) || document.body.insertBefore(document.createElement("div"), document.body.childNodes[0]);
	
	this.Color = this.options.Color;
	this.Opacity = parseInt(this.options.Opacity);
	this.zIndex = parseInt(this.options.zIndex);
	
	with(this.Lay.style){ display = "none"; zIndex = this.zIndex; left = top = 0; position = "fixed"; width = height = "100%"; }
	
	if(isIE6){
		this.Lay.style.position = "absolute";
		//ie6设置覆盖层大小程序
		this._resize = Bind(this, function(){
			this.Lay.style.width = Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth) + "px";
			this.Lay.style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + "px";
		});
		//遮盖select
		this.Lay.innerHTML = '<iframe style="position:absolute;top:0;left:0;width:100%;height:100%;filter:alpha(opacity=0);"></iframe>'
	}
  },
  //设置默认属性
  SetOptions: function(options) {
    this.options = {//默认值
		Lay:		null,//覆盖层对象
		Color:		"#000",//背景色
		Opacity:	0,//透明度(0-100)
		zIndex:		10000//层叠顺序
    };
    Extend(this.options, options || {});
  },
  //显示
  Show: function() {
	//兼容ie6
	if(isIE6){ this._resize(); window.attachEvent("onresize", this._resize); }
	//设置样式
	with(this.Lay.style){
		//设置透明度
		isIE ? filter = "alpha(opacity:" + this.Opacity + ")" : opacity = this.Opacity / 100;
		backgroundColor = this.Color; display = "block";
	}
  },
  //关闭
  Close: function() {
	this.Lay.style.display = "none";
	if(isIE6){ window.detachEvent("onresize", this._resize); }
  }
};



var LightBox = Class.create();
LightBox.prototype = {
  initialize: function(box, options) {
	
	this.Box = $(box);//显示层
	
	this.OverLay = new OverLay(options);//覆盖层
	
	this.SetOptions(options);
	
	this.Fixed = !!this.options.Fixed;
	this.Over = !!this.options.Over;
	this.Center = !!this.options.Center;
	this.onShow = this.options.onShow;
	
	this.Box.style.zIndex = this.OverLay.zIndex + 1;
	this.Box.style.display = "none";
	
	//兼容ie6用的属性
	if(isIE6){
		this._top = this._left = 0; this._select = [];
		this._fixed = Bind(this, function(){ this.Center ? this.SetCenter() : this.SetFixed(); });
	}
  },
  //设置默认属性
  SetOptions: function(options) {
    this.options = {//默认值
		Over:	false,//是否显示覆盖层
		Fixed:	true,//是否固定定位
		Center:	true,//是否居中
		onShow:	function(){}//显示时执行
	};
    Extend(this.options, options || {});
  },
  //兼容ie6的固定定位程序
  SetFixed: function(){
	this.Box.style.top = document.documentElement.scrollTop - this._top + this.Box.offsetTop + "px";
	this.Box.style.left = document.documentElement.scrollLeft - this._left + this.Box.offsetLeft + "px";
	
	this._top = document.documentElement.scrollTop; this._left = document.documentElement.scrollLeft;
  },
  //兼容ie6的居中定位程序
  SetCenter: function(){
	this.Box.style.marginTop = document.documentElement.scrollTop - this.Box.offsetHeight / 2 + "px";
	this.Box.style.marginLeft = document.documentElement.scrollLeft - this.Box.offsetWidth / 2 + "px";
  },
  //显示
  Show: function(options) {
	//固定定位
	this.Box.style.position = this.Fixed && !isIE6 ? "fixed" : "absolute";

	//覆盖层
	this.Over && this.OverLay.Show();
	
	this.Box.style.display = "block";
	
//	//居中
//	if(this.Center){
//		this.Box.style.top = this.Box.style.left = "50%";
//		//设置margin
//		if(this.Fixed){
//			this.Box.style.marginTop = - this.Box.offsetHeight / 2 + "px";
//			this.Box.style.marginLeft = - this.Box.offsetWidth / 2 + "px";
//		}else{
//			this.SetCenter();
//		}
//	}

	//居中
	if(this.Center){
		//this.Box.style.top = this.Box.style.left = "10%";
		this.Box.style.top = "50%";
		this.Box.style.left = "50%";
		//设置margin
		if(this.Fixed){
			this.Box.style.marginTop = - this.Box.offsetHeight / 2 + "px";
			this.Box.style.marginLeft = - this.Box.offsetWidth / 2 + "px";
		}else{
			this.SetCenter();
		}
	}
	
	//兼容ie6
	if(isIE6){
		if(!this.Over){
			//没有覆盖层ie6需要把不在Box上的select隐藏
			this._select.length = 0;
			Each(document.getElementsByTagName("select"), Bind(this, function(o){
				if(!Contains(this.Box, o)){ o.style.visibility = "hidden"; this._select.push(o); }
			}))
		}
		//设置显示位置
		this.Center ? this.SetCenter() : this.Fixed && this.SetFixed();
		//设置定位
		this.Fixed && window.attachEvent("onscroll", this._fixed);
	}
	
	this.onShow();
  },
  //关闭
  Close: function() {
	this.Box.style.display = "none";
	this.OverLay.Close();
	if(isIE6){
		window.detachEvent("onscroll", this._fixed);
		Each(this._select, function(o){ o.style.visibility = "visible"; });
	}
  }
};
var box = new LightBox("idBox");
var rbox = new LightBox("divQQbox");
$("idBoxCancel").onclick = function(){ 
		box.Close(); 
	//右侧就医服务新
		rbox.Center = false;
		rbox.Box.style.top = "10%";
		rbox.Box.style.left = "89%";
		rbox.Box.style.marginTop = rbox.Box.style.marginLeft = "0";
		rbox.OverLay.Opacity = 0;
		rbox.Show();
	}
$("rboxCancel").onclick = function(){ rbox.Close(); }
box.Show();
