if (top.location != self.location)
{
	if (top.location.href.match(/wiki8.com/i))
	{
		if (!top.location.href.match(/wiki8.com\/cai/i))
		{
			if (confirm("我们发现您在浏览医学百科时被缺德的电信运营商恶意劫持，按确定键将跳出恶意框架，正常访问医学百科\r\n网页被劫持时，无良电信运营商可能会无故弹一些广告"))
			{
				top.location.href = self.location.href;
			}
		}
	}
	else
	{
		top.location.href = self.location.href;
	}
}

var Mobile = {}; 
Mobile.UA = navigator.userAgent; 
Mobile.Device = false; 
Mobile.Types = ["iPhone", "iPod", "iPad", "android"]; 
for (var d = 0; d < Mobile.Types.length; d++) 
{ 
	var t = Mobile.Types[d]; 
	Mobile[t] = !!Mobile.UA.match(new RegExp(t, "i")); 
	Mobile.Device = Mobile.Device || Mobile[t]; 
} 
// is this an Mobile device? 
//alert("Mobile device?" + Mobile.Device + "\niPhone?" + Mobile.iPhone + "\niPod?" + Mobile.iPod + "\niPad?" + Mobile.iPad);


function getQuery(str)
{
	var queryString = window.location.search.substring(1);
	var query = queryString.split("&");
	for (var i=0; i<query.length; i++)
	{
		queryNV = query[i].split("=");
		if (queryNV[0] == str)
		{
			return queryNV[1];
		}
	}
}

function getXmlHttpObject()
{
	var xmlHttp = null;
	if (window.XMLHttpRequest)
	{
		xmlHttp = new XMLHttpRequest();
	}
	else
	{
		if (window.ActiveXObject)
		{
			if (new ActiveXObject("Microsoft.XMLHTTP"))
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			else
			{
				xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
		}
	}
	return xmlHttp;

}

function  parseXML(st){
	if (window.ActiveXObject)
	{
		var result = new ActiveXObject("microsoft.XMLDOM");
		result.async= "false";
		result.loadXML(st);
	}
	else
	{
		var parser = new DOMParser();
		var result = parser.parseFromString(st,  "text/xml");
	}
	return result;
}

var GetNodeValue = function(obj)
{
    var str = "";
    if(window.ActiveXObject)    //IE
    {
        str = obj.text;
    }
    else //Mozilla
    {
        try
        {
            str = obj.childNodes[0].nodeValue;
        }
        catch(ex)
        {
            str = "";
        }
    }
    return str;
}

function isNumberic(oNum)
{
  if(!oNum) return false;
  var strP=/^\d+(\.\d+)?$/;
  if(!strP.test(oNum)) return false;
  try{
	  if(parseFloat(oNum)!=oNum) return false;
  }
  catch(ex)
  {
   return false;
  }
  return true;
}

var Cookie=new Object();
var CookiesDate = 1;
Cookie.setCookie = function(name,value){
	var exp = new Date();
	exp.setTime(exp.getTime() + CookiesDate*24*60*60*1000);
	var str = name + "=" + escape(value);		
	str += "; path=/; expires="+exp.toGMTString();
	document.cookie = str;
}
Cookie.getCookie = function(name){
	var cookieArray = document.cookie.split("; ");	//得到分割的cookie名值对
	var cookie = new Object();
	for(var i = 0; i < cookieArray.length; i++){
		var arr = cookieArray[i].split("=");				//将名和值分开
		if(arr[0] == name)return unescape(arr[1]);	//如果是指定的cookie，则返回它的值
	}
	return "";
}
Cookie.deleteCookie = function(name){
	document.cookie = name + "=; path=/; expires=-1";
}

function StringBuilder(value)
{
	this.s = [];
	this.append(value);
}
StringBuilder.prototype.append = function(value){
	if(value)
	{
		this.s.push(value);
	}
}
StringBuilder.prototype.clear = function(){
	this.s = [];
}
StringBuilder.prototype.toString = function(){
	return this.s.join('');
}

function init()
{
	var h = document.getElementById("content").getElementsByTagName("h2");
	for (var i=0; i<h.length; i++)
	{
		//h[i].onmouseover = function(){
		//	this.className = "MouseOver";
		//}
		//h[i].onmouseout = function(i){
		//	this.className = "";
		//}
		h[i].innerHTML = "<span class=\"returnTop\">[<a href=\"#top\">返回</a>]</span>" + h[i].innerHTML;

	}
	var zImg = document.getElementById("content").getElementsByTagName("img");
	for (var i=0; i<zImg.length; i++)
	{
		if (zImg[i].src.indexOf("ZoomImg")>-1)
		{
			zImg[i].alt = "点击查看原图";
			zImg[i].className = "zoom";
			zImg[i].onclick = function(){
				dialog("原始图片","<img src=\""+this.src.replace(/(.*?)ZoomImg(.*?)\.jpg/gi, "$1img$2") + "\" />");
			}
		}
	}
	entrySummary();
	showKnowledge();
	scroll();
	showSimilar();
	showLiterature();
	loadPostCookie();
	wikiNotice();
	if (Mobile.Device)
	{
		document.getElementById("adv").innerHTML += "<div id=\"Mobile\">为iPhone、iPad、Android等设备设计的移动版已经可用，<a href=\"/mobile.html\">点此切换<\/a><\/div>";
	}

}
function showLiterature()
{
	var literatureBox = document.getElementById("Literature");
	if (literatureBox)
	{
		var literatureC = "";
		var entry = document.getElementsByTagName("h1")[0].innerHTML;
		var lang = /big5\.wiki8\.com/i.test(document.URL)? "t" : "s";
		var SoapRequest = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
						+ "<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">"
						+ "	<soap12:Body>"
						+ "		<wikiSearcher xmlns=\"/\">"
						+ "			<q><![CDATA[" + entry + "]]></q>"
						+ "			<c>10</c>"
						+ "			<dic>ProIndex</dic>"
						+ "			<showSummary>true</showSummary>"
						+ "			<hfSize>48</hfSize>"
						+ "			<lang>" + lang + "</lang>"
						+ "		</wikiSearcher>"
						+ "	</soap12:Body>"
						+ "</soap12:Envelope>";
		var wikiXmlObj = getXmlHttpObject();
		wikiXmlObj.onreadystatechange = function(){
			if(wikiXmlObj.readyState == 4)
			{
				xmlDoc=parseXML(wikiXmlObj.responseText);
				literatureC = GetNodeValue(xmlDoc.getElementsByTagName("wikiSearcherResult")[0]);
				//alert(literatureC);
				literatureC = literatureC.replace(/<p>/gi, "<span>摘要：");
				literatureC = literatureC.replace(/<\/p>/gi, "</span>");
				if (lang == "t")
				{
					literatureC = literatureC.replace(/www\.39kf\.com/gi, "big5.39kf.com");
				}
				literatureBox.innerHTML = literatureC + "<li><a href=\"Literature.html\">&lt;&lt;&lt;点此查看更多文献&gt;&gt;&gt;</a></li>";
			 }
			 else
			{
				//alert(wikiXmlObj.readyState);
			}
		}
		wikiXmlObj.open ("POST", "/wikisearcher", true);
		wikiXmlObj.setRequestHeader("Content-Type", "application/soap+xml; charset=utf-8");
		wikiXmlObj.setRequestHeader("HOST","www.94ab.com");
		wikiXmlObj.setRequestHeader("Content-Length",SoapRequest.length);
		wikiXmlObj.setRequestHeader("SOAPAction", "/");
		wikiXmlObj.send (SoapRequest);
	}
}
function showSimilar()
{
	if (document.body.offsetHeight > 1200)
	{
		if (document.getElementById("Similar"))
		{
				ss = document.getElementById("Similar").getElementsByTagName("ul")[0];
				if (document.getElementById("sim"))
				{
					document.getElementById("sim").innerHTML = "<legend>近似词条</legend><ul>" + ss.innerHTML + "</ul>";
					document.getElementById("sim").style.display = "";
				}
		}
	}
	else
	{
		if (document.getElementById("rightBox"))
		{
			document.getElementById("rightBox").style.display = "none";
		}
	}

}
function dialog(winName, str)
{
	if (document.getElementById("winBox"))
	{
		if (document.body.scrollTop)
		{
			document.getElementById("winBox").style.top = document.body.scrollTop + 30 + "px";
		}
		else
		{
			document.getElementById("winBox").style.top = document.documentElement.scrollTop + 30 + "px";
		}
		document.getElementById("bgDiv").style.display = "block";
		document.getElementById("winBox").style.display = "block";
		document.getElementById("winName").innerHTML = winName;
		document.getElementById("winContent").innerHTML = str;
	}
	else
	{
		var bgDiv = document.createElement("div"); 
		bgDiv.setAttribute("id", "bgDiv");
		bgDiv.style.display = "block";
		bgDiv.style.width = document.body.offsetWidth + "px";
		bgDiv.style.height = document.body.offsetHeight + "px";
		var winBox = document.createElement("div");
		winBox.setAttribute("id", "winBox");
		winBox.style.diaplay = "block";
		if (document.body.scrollTop)
		{
			winBox.style.top = document.body.scrollTop + 30 + "px";
		}
		else
		{
			winBox.style.top = document.documentElement.scrollTop + 30 + "px";
		}
		var winMenu = "\
			<div class=\"winMenu\">\
			<img alt=\"关闭\" src=\"http:\/\/www.wiki8.com/images/del_btn.gif\" style=\"float:right;cursor:pointer;\" onclick=\"closeDialog();\" />\
			<span id=\"winName\">" + winName + "</span>\
			</div>\
		";
		winBox.innerHTML = winMenu + "<div id=\"winContent\">" + str + "</div>";
		document.body.appendChild(bgDiv); 
		document.body.appendChild(winBox); 
	}
}
function closeDialog()
{
	document.getElementById("bgDiv").style.display = "none";
	document.getElementById("winBox").style.display = "none";
}

function entrySummary()
{
	var summaryWin = document.createElement("div"); 
	summaryWin.setAttribute("id", "summaryWin");
	document.body.appendChild(summaryWin);

	var a = document.getElementById("content").getElementsByTagName("a");
	for (i = 0; i < a.length; i++)
	{
		if (a[i].rel=="summary")
		{
			a[i].onmouseover = function(){
				try
				{
					clearTimeout(gc);
				}
				catch (e)
				{
				}
				var event=arguments[0] || window.event;   
				var x = event.clientX;
				var y = event.clientY;
				var scrollT = getDocType().scrollTop;
				x = x + 20;
				if (x + 400 > document.body.offsetWidth)
				{
					x = x - 400;
				}
				y = y + 10 + scrollT;
				go = setTimeout("openEntrySummary('" + x + "', '" + y + "', '" + this.href + "')", 500);
			}
			a[i].onmouseout = function(){
				try
				{
					clearTimeout(go);
				}
				catch (e)
				{
				}
				gc = setTimeout("closeEntrySummary()", 800);
			}
		}
	}

}

function openEntrySummary(x, y, h)
{
	var _summaryWin = document.getElementById("summaryWin")
	if (h != "s")
	{
		_summaryWin.style.display = "block";
		_summaryWin.style.top = y + "px";
		_summaryWin.style.left = x + "px";
		_summaryWin.innerHTML = "<div id=\"ol\">Lodding...</div><iframe frameborder=\"0\" src=\"/Summary?" + h + "\"></iframe>";				
	}
	else
	{
		_summaryWin.style.display = "block";
	}
}
function closeEntrySummary()
{
	document.getElementById("summaryWin").style.display = "none";
}

function showKnowledge()
{
	as = document.getElementById("content").getElementsByTagName("a");
	kns = new StringBuilder();
	for (i = 0; i < as.length ; i ++)
	{
		if (as[i].rel == "summary")
		{
			kns +="<li><a title=\"医学百科：" + as[i].innerHTML + "\" href=\"" + as[i].href + "\" rel=\"knowledge\">" + as[i].innerHTML + "</a></li>";
		}
	}
	kn = kns.toString();
	if (kns != "")
	{
		document.getElementById("floatLeft").innerHTML = "<h3>知识点</h3><ul>" + kns + "</ul>";
	}
}


function search(w)
{
	if(w == "fulltext")
	{
		document.getElementById("s").action = "http://www.94ab.com/s";
		document.getElementById("s").target = "_blank";
		document.getElementById("s").submit();
	}
	else
	{
		document.getElementById("s").action = "/search";
		document.getElementById("s").target = "_self";
		document.getElementById("s").submit();
	}
}
function getWinHeight()
{
	if (window.navigator.appName=="Netscape")
	{
		return window.innerHeight;
	}
	else
	{
		return getDocType().offsetHeight;
	}
}
function getDocType(obj)
{
	var doc = document;
	if (obj)
	{
		doc = obj;
	}
	isCSS1 = /CSS1Compat/.test( document.compatMode ),
	isWebkit = /webkit/ig.test( navigator.userAgent ),
	obj = isCSS1 && !isWebkit ? doc.documentElement : doc.body;
	return obj;
}
function reSize()
{
	if (document.getElementById("floatLeft").getElementsByTagName("ul")[0])
	{
		document.getElementById("floatLeft").getElementsByTagName("ul")[0].style.height = getWinHeight() - 80 + "px";
		document.getElementById("floatLeft").style.top = getLeftHeight() + "px";
	}
}
function getLeftHeight()
{
	if (document.getElementById("nav").offsetHeight)
	{
		return document.getElementById("nav").offsetHeight;
	}
	else
	{
		return 580;
	}
}
function getOffsetTop(el)
{
	y = el.offsetTop;
	var parent = el.offsetParent;
	while (parent) {
		y += parent.offsetTop;
		parent = parent.offsetParent;
	}
	return y;
}

var baseT;
function scroll()
{
	reSize();
	if (document.getElementById("toolbar"))
	{
		baseT = getOffsetTop(document.getElementById("toolbar"));
	}
	window.onscroll = function(){
		//t = document.documentElement.scrollTop || window.pageYOffset;
		var t = getDocType().scrollTop;
		//if (document.getElementById("toolbar"))
		//{
		//	if (t > baseT)
		//	{
		//		document.getElementById("toolbar").style.position = "absolute";
		//		document.getElementById("toolbar").style.width = "700px";
		//		document.getElementById("toolbar").style.top = t + "px";
		//	}
		//	else
		//	{
		//		document.getElementById("toolbar").style.position = "static";
		//	}
		//}
		if (document.getElementById("floatLeft"))
		{
			if (t > getLeftHeight())
			{
				document.getElementById("floatLeft").style.top = t + 10 + "px";
			}
			else
			{
				document.getElementById("floatLeft").style.top = getLeftHeight() + "px";
			}
		}
		
	}
}

function reply(dId)
{
	var d = document.getElementById(dId);
	dUser = d.getElementsByTagName("div")[2].innerHTML;
	insertStr = "<a href=\"#" + dId + "\">@" + dUser + "</a>\r\n";
	insertDiscuss(insertStr);
}
function quote(dId)
{
	var d = document.getElementById(dId);
	dUser = d.getElementsByTagName("div")[2].innerHTML;
	dContent = d.getElementsByTagName("div")[7].innerHTML;
	insertStr = "<blockquote cite=\"#" + dId + "\">\r\n<strong><a href=\"#" + dId + "\">@" + dUser + "</a>:</strong><p>" + dContent + "</p></blockquote>\r\n<a href=\"#" + dId + "\">@" + dUser + "</a>\r\n";
	insertDiscuss(insertStr);
}
function insertDiscuss(insertStr) {

	field = document.getElementById("dContent");
	if(document.selection) {
		field.focus();
		sel = document.selection.createRange();
		sel.text = insertStr;
		field.focus();

	} else if (field.selectionStart || field.selectionStart == '0') {
		var startPos = field.selectionStart;
		var endPos = field.selectionEnd;
		var cursorPos = startPos;
		field.value = field.value.substring(0, startPos)
					+ insertStr
					+ field.value.substring(endPos, field.value.length);
		cursorPos += insertStr.length;
		field.focus();
		field.selectionStart = cursorPos;
		field.selectionEnd = cursorPos;

	} else {
		field.value += insertStr;
		field.focus();
	}
}

function checkDform()
{
	nickName = document.getElementById("nickName").value.replace(/\s/gi, "");
	dEmail = document.getElementById("email").value.replace(/\s/gi, "");
	dContent = document.getElementById("dContent").value.replace(/\s/gi, "");
	var ret = true;
	if (dContent == "")
	{
		alert("评论内容不能为空，写点什么吧");
		document.getElementById("dContent").focus();
		ret = false;
	}
	if (dEmail == "")
	{
		alert("请填写电子邮箱");
		document.getElementById("email").focus();
		ret = false;
	}
	else
	{
		if(!/(\S)+[@]{1}(\S)+[.]{1}(\w)+/.test(dEmail))
		{
			alert("电子邮箱不正确");
			document.getElementById("email").focus();
			ret = false;
		}
		else
		{
			Cookie.setCookie("dEmail", dEmail);
		}
	}
	if ( nickName == "")
	{
		alert("昵称不能为空");
		document.getElementById("nickName").focus();
		ret = false;
	}
	else
	{
		Cookie.setCookie("nickName", nickName);
	}
	return ret;
}

function loadPostCookie()
{
	if (document.getElementById("post"))
	{
		document.getElementById("nickName").value = Cookie.getCookie("nickName");
		document.getElementById("email").value = Cookie.getCookie("dEmail");
	}
}

function wikiTools(b)
{
	var entry = document.getElementsByTagName("h1")[0].innerHTML;
	var url = location.href;
	var entryId = url.split("_")[1].replace(/\//gi,"");
	var sourceCode = document.getElementById("content").innerHTML;
	sourceCode = sourceCode.replace(/<span class=\"?returnTop\"?>(\w|\W)*?<\/span>/gi, "");
	sourceCode = sourceCode.replace(/<fieldset(\w|\W)*?<\/fieldset>/gi, "");
	sourceCode = sourceCode.replace(/<a class=\"?line\"? name(\w|\W)*?<\/a>/gi, "");
	sourceCode = sourceCode.replace(/=\"\//gi, "=\"http:\/\/www.wiki8.com\/");
	sourceCode = sourceCode.replace(/<h2>相关文献<\/h2>\s*?<ul id=\"?Literature(\w|\W)*?<\/ul>/gi, "");
	sourceCode = sourceCode.replace(/<div class=\"?notice\"?>(.*?)<\/div>/gi, "");

	if (b == "copy")
	{
		var inHtml = "<div id=\"editBox\" contenteditable=\"true\">" + sourceCode + "</div>";
		dialog("<span class=\"removeLink\" onclick=\"removeLink();\">去掉链接</span><span class=\"copyThis\" onclick=\"copyThis();\">复制全文</span>", inHtml);
	}
	if (b == "email")
	{
		var inHtml = "<div style=\"display:none;\" id=\"sending\">正在发送...<br /><img src=\"http://www.wiki8.com/images/sending.gif\" /></div><form id=\"sendMail\" onsubmit=\"return sendThisMail();\" action=\"/sendMail\" method=\"post\" target=\"sendMailFrame\"><input type=\"hidden\" name=\"entryId\" value=\"" + entryId + "\" /><button type=\"submit\" name=\"submit\">立即发送</button><label>邮件地址：</label><input type=\"text\" id=\"mailAddress\" class=\"text\" name=\"mailAddress\" value=\"\" /><br /><label>邮件标题：</label><input type=\"text\" id=\"mailTitle\" class=\"text\" name=\"mailTitle\" value=\"医学知识分享：" + entry + "\" /><br /><textarea id=\"mailContent\" style=\"display:none\" name=\"mailContent\"></textarea><div id=\"editBox\" contenteditable=\"true\"><p>您的朋友跟您分享了一篇名为<strong><a href=\"" + url + "\">" + entry + "</a></strong>的百科知识：</p><hr size=\"1\">" + sourceCode + "<hr size=\"1\"><p>这篇文章来自医学百科<a href=\"" + url + "\">" + url + "</a></p><p></p></div></form><iframe style=\"display:none;\" name=\"sendMailFrame\" src=\"\"></iframe>";
		dialog("发送到邮箱", inHtml);

	}
	if (b == "download")
	{
		//var inHtml = "<form id=\"download\" onsubmit=\"return downloadThis();\" action=\"/down\" method=\"post\" target=\"downloadFrame\"><input type=\"hidden\" name=\"entryId\" value=\"" + entryId + "\" /><button type=\"submit\" name=\"submit\">立即下载</button><label>文档标题：</label><input type=\"text\" id=\"docTitle\" class=\"text\" name=\"docTitle\" value=\"百科知识：" + entry + "\" /><br /><label>文档内容：</label><br /><textarea id=\"docContent\" style=\"display:none\" name=\"docContent\"></textarea><div id=\"editBox\" contenteditable=\"true\"><h1>" + entry + "</h1>" + sourceCode + "<hr size=\"1\"><p>这篇文章来自医学百科<a href=\"" + url + "\">" + url + "</a></p><p></p></div></form><iframe style=\"display:none;\" name=\"downloadFrame\" src=\"\"></iframe>";
		var inHtml = "<form id=\"download\" onsubmit=\"return downloadThis();\" action=\"/down\" method=\"post\" target=\"downloadFrame\"><input type=\"hidden\" name=\"entryId\" value=\"" + entryId + "\" /><button type=\"submit\" name=\"submit\">立即下载</button><label>文档标题：</label><input type=\"text\" id=\"docTitle\" class=\"text\" name=\"docTitle\" value=\"百科知识：" + entry + "\" /><br /><label>文档类型：</label><input type=\"radio\" name=\"docType\" checked value=\"pdf\" /><label>pdf</label> <input type=\"radio\" name=\"docType\" value=\"word\" /><label>word</label><br /><textarea id=\"docContent\" style=\"display:none\" name=\"docContent\"></textarea><div id=\"editBox\" contenteditable=\"true\"><h1>" + entry + "</h1>" + sourceCode + "<hr size=\"1\"><p>这篇文章来自医学百科<a href=\"" + url + "\">" + url + "</a></p><p></p></div></form><iframe style=\"display:none;\" name=\"downloadFrame\" src=\"\"></iframe>";
		dialog("下载保存", inHtml);
		//alert("暂时没有开放");
	}
}

function copyThis()
{
	var obj = document.getElementById("editBox");
	if (obj.innerHTML.indexOf("本文来自医学百科：" + location.href) == -1)
	{
		obj.innerHTML += "\r\n本文来自医学百科：" + location.href;
	}
	obj.focus();
	obj.document.execCommand("SelectAll");
	obj.document.execCommand("Copy", true);
	obj.document.execCommand("UnSelect", true);
	if (confirm("已经复制到您的剪切板,可以点击右键粘贴到需要的地方"))
	{
		closeDialog();
	}
}

function removeLink()
{
	var obj = document.getElementById("editBox");
	sCode = obj.innerHTML;
	sCode = sCode.replace(/<\/?a(.*?)>/gi, "");
	obj.innerHTML = sCode;
}

function sendThisMail()
{
	var mailAddress = document.getElementById("mailAddress").value;
	var mailTitle = document.getElementById("mailTitle").value;
	var mailContent = document.getElementById("editBox").innerHTML;
	var msg;
	document.getElementById("mailContent").value = mailContent;
	if (mailAddress != "" && mailTitle != "")
	{
		if(!/^[a-zA-Z0-9\-\_\.]+[@]{1}[a-zA-Z0-9\-]+[.]{1}[a-zA-Z0-9\-\_\.]*[a-zA-Z]+$/.test(mailAddress))
		{
			alert("邮件地址不正确");
			document.getElementById("mailAddress").focus();
			return false;
		}
		else
		{
			document.getElementById("sending").style.display = "";
			return true;
		}
	}
	else
	{
		if (!/(\S)+[@]{1}(\S)+[.]{1}(\w)+/.test(mailAddress))
		{
			alert("请输入正确的邮件地址");
			document.getElementById("mailAddress").focus();
		}
		else
		{
			if (mailTitle == "")
			{
				alert("请输入邮件标题");
				document.getElementById("mailTitle").focus();
			}
		}
		return false;
	}
}

function downloadThis()
{
	var docContent = document.getElementById("editBox").innerHTML;
	document.getElementById("docContent").value = docContent;
	closeDialog();
}

function sendMsg(msg)
{
	if (msg.indexOf("success") != -1)
	{
		alert("发送成功");
		document.getElementById("sending").style.display = "none";
		closeDialog();
	}
	else
	{
		alert(msg);
		document.getElementById("sending").style.display = "none";
	}
}

function rand(number) {
	return Math.floor(Math.random()*number);
}
function wikiNotice()
{
	setInterval("showNotice()", 5000);
}
function showNotice()
{
	var code = ["我们一直在尝试为您提供更多知识",
				"医学百科每天都在进步着，尽管有时候步伐很小",
				"我们添加了“复制全文”、“下载保存”和“发到邮箱”功能，您可以方便的和好友分享知识了！",
				"繁体版也可以评论了",
				"为iPhone、iPad、Android等设备设计的移动版本已经可用"
				];
	myNum=(rand(code.length));
	if (document.getElementById("wikiNotice"))
	{
		document.getElementById("wikiNotice").innerHTML = code[myNum];
	}
}
