//function killErrors() {
//return true;
//}
//window.onerror = killErrors;
var hMenu = false;
var fMenu = false;

function posMenu(a,c,k){
	a.visibility=hMenu?"hidden":"visible";
	a.left=c+"px";
	a.top=k+"px";
}
function tMenu(a){
	a=a||window.event;
	var c=0,k,i,d=getObj("gbi"),e=a.target||a.srcElement;
	a.cancelBubble=true;
	if(!fMenu){
		fMenu=document.createElement(Array.every||window.createPopup?"iframe":"div");
		fMenu.frameBorder="0";
		fMenu.src="#";
		d.parentNode.appendChild(fMenu).id="gbs";
		document.onclick=closeMenu;
	}
	if(e.className!="gb3")e=e.parentNode;
	if(!e)return;
	k=18;
	do {
		c+=e.offsetLeft;
		k+=e.offsetTop;
	}while(e && (e=e.offsetParent));
	if(d){
		posMenu(d.style,c,k);
		fMenu.style.width=d.offsetWidth+"px";
		fMenu.style.height=d.offsetHeight+"px";
		posMenu(fMenu.style,c,k);
	}
	hMenu=!hMenu;
}
function closeMenu(a){hMenu&&tMenu(a)}

function getObj(id) {
	if (document.getElementById) return document.getElementById(id);
	else if (document.all) return document.all[id];	
	else if (document.layers) return document.layers[id];
	else {return document.all[id];}
}

function setHomepage()
{
    if (document.all)
    {
        document.body.style.behavior='url(#default#homepage)';
        document.body.setHomePage('http://dict.cn/');
    } else if (window.sidebar) {
        if(window.netscape)
        {
            try
            {
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
            }
            catch (e)
            {
                alert("Firefox暂无此功能，请手动设置。" );
            }
        }
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage','http://dict.cn/');
    }
}
function addFavorite()
{
 if (document.all)
    {
       window.external.addFavorite('http://dict.cn/','海词');
    }
    else if (window.sidebar)
    {
       window.sidebar.addPanel('海词', 'http://dict.cn/', "");
	}
}
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
var browsertype = BrowserSniffer();
//detects the capabilities of the browser
function BrowserSniffer() {
	if (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) return "OP";		//Opera
	else if (document.all) return "IE";														//Internet Explorer e.g. IE4 upwards
	else if (!document.all && document.getElementById) return "MO";							//Mozila e.g. Netscape 6 upwards
	else if (document.layers) return "NN";													//Netscape Communicator 4
	else {return "IE";}		//I assume it will not get here
}

function sethtml(id, str) {
	try{
	if (browsertype=="IE" && document.all[id]) {
		document.all[id].innerHTML = str;
	}else if (browsertype=="NN" && document.layers[id]) { 
		document.layers[id].document.open();
		document.layers[id].document.write(str);
		document.layers[id].document.close();
	}else if ((browsertype=="MO" || browsertype=="OP") && document.getElementById(id)) {
		document.getElementById(id).innerHTML = str;
	}
}catch (e){
}
}
function set_ustatus(id, url){
	var uname=readCookie('DictCN_username');
	if(uname && readCookie('DictCN_auth') && readCookie('hm_auth') && readCookie('bbs_auth')){
		sethtml(id,'<a href="http://my.dict.cn/" class="nn_user">'+uname+'</a>&nbsp;&nbsp;<a href="http://dict.cn/login.php?useraction=logout&url='+url+'" class="nn_logout">退出</a><a href="#" class="nn_logout" onclick="addFavorite()">收藏</a><a href="#" class="nn_logout" onclick="this.blur();Report(\'report\', \''+StrCode(uname)+'\');return false;">意见</a>');
	}else{
		sethtml(id,'<a href="http://dict.cn/login.php?url='+url+'" class="nn_login">登录</a>&nbsp;&nbsp;<a href="http://my.dict.cn/do.php?ac=register" class="nn_register">注册</a><a href="#" class="nn_logout" onclick="addFavorite()">收藏</a><a href="#" class="nn_logout" onclick="this.blur();Report(\'report\', \''+StrCode(uname)+'\');return false;">意见</a>');
	}
}

function toutf8(wide) {
  var c, s;
  var enc = "";
  var i = 0;
  while(i<wide.length) {
    c= wide.charCodeAt(i++);
    // handle UTF-16 surrogates
    if (c>=0xDC00 && c<0xE000) continue;
    if (c>=0xD800 && c<0xDC00) {
      if (i>=wide.length) continue;
      s= wide.charCodeAt(i++);
      if (s<0xDC00 || c>=0xDE00) continue;
      c= ((c-0xD800)<<10)+(s-0xDC00)+0x10000;
    }
    // output value
    if (c<0x80) enc += String.fromCharCode(c);
    else if (c<0x800) enc += String.fromCharCode(0xC0+(c>>6),0x80+(c&0x3F));
    else if (c<0x10000) enc += String.fromCharCode(0xE0+(c>>12),0x80+(c>>6&0x3F),0x80+(c&0x3F));
    else enc += String.fromCharCode(0xF0+(c>>18),0x80+(c>>12&0x3F),0x80+(c>>6&0x3F),0x80+(c&0x3F));
  }
  return enc;
}

var hexchars = "0123456789ABCDEF";

function toHex(n) {
  return hexchars.charAt(n>>4)+hexchars.charAt(n & 0xF);
}

var okURIchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

function encodeURIComponentNew(s) {
  var s = toutf8(s);
  var c;
  var enc = "";
  for (var i= 0; i<s.length; i++) {
    if (okURIchars.indexOf(s.charAt(i))==-1)
      enc += "%"+toHex(s.charCodeAt(i));
    else
      enc += s.charAt(i);
  }
  return enc;
}

function utfurl(s){
	return encodeURIComponentNew(s);
}

function buildURL(fld)
{
	fld = fld.replace(/^\s+|\s+$/g,"");
	if (fld == "") return "";
	s = utfurl(fld);
	s = s.replace(/%20/g, "+");
	return s.replace(/%(5E|2E|2D|2F|3B|3F|40|2C|26|3A|3D|2B|24)/g,"_$1");
}
var engine="d";
function setengine(g){
	engine=g;
}
function sf(){if(document.f)document.f.q.focus();}
var best_site="";
function qs(n) {
	var p=document.f; 
	if(p&&p.q&&p.q.value) {
		var v=best_site+"/"+buildURL(p.q.value);
		if(p.client&&p.client.value) v+="?client="+p.client.value;
		if(engine == "g"){ 
			v="http://www.goo"+"gle.cn/search?sa=%CB%D1%CB%F7&client=pu"+"b-5062500030325920&forid=1&prog=aff&ie=GB2312&oe=GB2312&safe=active&hl=zh-CN&q="+p.q.value;
			n=1;
		}else if(engine == "b"){
			v="http://www.bai"+"du.com/bai"+"du?tn=jimf"+"an_pg&word="+p.q.value;
			n=1;
		}else if(engine == "h"){
			v="/ok/hd.php?q="+utfurl(p.q.value);
			n=1;
		}
		if(n) window.open(v); 
		else location.href = v; 
		return false;
	}else return true;
}
/*选择 end*/
function audio(c){
	if(c!=""){
		c='<a href="javascript:return false;" onClick="ssplay(\''+c+'\');return false;" onMouseOver="ssplay(\''+c+'\')" onMouseOut="ssstop()"><img src="/imgs/audio.gif" border="0"></a>';
	}
	return c;
}
function getFlashMovieObject(movieName)
{
	if (window.document[movieName])
	{
		return window.document[movieName];
	}
	if (navigator.appName.indexOf("Microsoft Internet")==-1)
	{
		if (document.embeds && document.embeds[movieName])
			return document.embeds[movieName];
	}
	else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
	{
		return document.getElementById(movieName);
	}
}
function ssplay(c){
	var recite = getFlashMovieObject("recite");
	if(recite){
		recite.SetVariable("audio",c);
		recite.GotoFrame(1);
	}
}
function ssstop(){
	var recite = getFlashMovieObject("recite");
	if(recite){
		recite.GotoFrame(3);
	}
}

function insertaudio(a,bg){
  if(bg == null) bg = '#e7f7f7';
  document.write( '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="13" height="13" align="absmiddle">' +
'<param name="allowScriptAccess" value="sameDomain" />' +
'<param name="movie" value="/img/audio.swf" />' +
'<param name="loop" value="false" />' +
'<param name="menu" value="false" />' +
'<param name="quality" value="high" />' +
'<param name="bgcolor" value="'+bg+'" />' +
'<param name="FlashVars" value="audio=' + a + '">' +
'<embed src="/img/audio.swf" loop="false" menu="false" quality="high" bgcolor="'+bg+'" width="13" height="13" align="absmiddle" allowScriptAccess="sameDomain" FlashVars="audio=' + a + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
'</object>');
};

var isOpen = true;
function sendMsg(msg){
	if(isOpen){
		//alert("请求" + msg);
		/*jQuery.ajax({
			type:    "POST",
			url:     "index.php",
			data:    "msg=" + msg,
			success: function(data){
				jQuery("#wordContent").html(data);
				visibleB();
			}
		});*/
	}
};
function gname(name){return document.getElementsByTagName?document.getElementsByTagName(name):new Array()}
function Browser(){var ua, s, i;this.isIE = false;this.isNS = false;this.isOP = false;this.isSF = false;ua = navigator.userAgent.toLowerCase();s = "opera";if ((i = ua.indexOf(s)) >= 0){this.isOP = true;return;}s = "msie";if ((i = ua.indexOf(s)) >= 0) {this.isIE = true;return;}s = "netscape6/";if ((i = ua.indexOf(s)) >= 0) {this.isNS = true;return;}s = "gecko";if ((i = ua.indexOf(s)) >= 0) {this.isNS = true;return;}s = "safari";if ((i = ua.indexOf(s)) >= 0) {this.isSF = true;return;}}
function Trim(s){var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);return (m == null)?"":m[1];}

function InitRequest(){var C_req = null;try{C_req = new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{C_req = new ActiveXObject("Microsoft.XMLHTTP");}catch(oc){C_req = null;}}if (!C_req && typeof XMLHttpRequest != "undefined"){try{C_req = new XMLHttpRequest();}catch(fa){alert("对不起!您的浏览器不支持该功能,请使用Internet Explorer 6.0或FireFox浏览器!");C_req = null;}}return C_req;}
function PostRequests(url, data){var AjaxRequestObj = InitRequest();if (AjaxRequestObj != null){AjaxRequestObj.onreadystatechange = function (){if (AjaxRequestObj.readyState == 4 && AjaxRequestObj.responseText){ProcessAjaxData(AjaxRequestObj.responseText);}};AjaxRequestObj.open("POST", url, true);AjaxRequestObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");AjaxRequestObj.send(data);}}
function ProcessAjaxData(data){eval(data);}
function StrCode(str){if(encodeURIComponent) return encodeURIComponent(str); if(escape) return escape(str); return encodeURIComponentNew(s);}

var t_DiglogX,t_DiglogY,t_DiglogW,t_DiglogH,t_dictStatus;

function ScreenConvert(){var browser = new Browser();var objScreen = getObj("ScreenOver");if(!objScreen) var objScreen = document.createElement("div");var oS = objScreen.style;objScreen.id = "ScreenOver";oS.display = "block";oS.top = oS.left = oS.margin = oS.padding = "0px";if (document.body.clientHeight)	{var wh = document.body.clientHeight + "px";}else if (window.innerHeight){var wh = window.innerHeight + "px";}else{var wh = "100%";}oS.width = "100%";oS.height = wh;oS.position = "absolute";oS.zIndex = "3";oS.textAlign = "left";if ((!browser.isSF) && (!browser.isOP)){oS.background = "#cccccc";}else{oS.background = "#cccccc";}oS.filter = "alpha(opacity=40)";oS.opacity = 40/100;oS.MozOpacity = 40/100;document.body.appendChild(objScreen);var allselect = gname("select");for (var i=0; i<allselect.length; i++) allselect[i].style.visibility = "hidden";t_dictStatus=_dict_enable;_dict_enable = false;}
function ScreenClean(){var objScreen = getObj("ScreenOver");if (objScreen) objScreen.style.display = "none";var allselect = gname("select");for (var i=0; i<allselect.length; i++) allselect[i].style.visibility = "visible";_dict_enable = t_dictStatus;}
function DialogLoc(){var dde = document.documentElement;if (window.innerWidth){var ww = window.innerWidth;var wh = window.innerHeight;var bgX = window.pageXOffset;var bgY = window.pageYOffset;}else{var ww = dde.offsetWidth;var wh = dde.offsetHeight;var bgX = dde.scrollLeft;var bgY = dde.scrollTop;}t_DiglogX = (bgX + ((ww - t_DiglogW)/2));t_DiglogY = (bgY + ((wh - t_DiglogH)/2));}
function DialogShow(showdata,ow,oh,w,h){var objDialog = getObj("DialogMove");if (!objDialog) {objDialog = document.createElement("div");objDialog.id = "DialogMove";document.body.appendChild(objDialog);}t_DiglogW = ow;t_DiglogH = oh;DialogLoc();var oS = objDialog.style;oS.display = "block";oS.top = t_DiglogY + "px";oS.left = t_DiglogX + "px";oS.margin = "0px";oS.padding = "0px";oS.width = w + "px";oS.height = "auto";oS.position = "absolute";oS.zIndex = "5";oS.background = "#FFF";oS.border = "solid #000 3px";objDialog.innerHTML = showdata;}
function DialogHide(){var objDialog = getObj("DialogMove");if (objDialog) objDialog.style.display = "none";}

function ReportOK(Type,ID){var objReportName=getObj("ReportName");var objReportEmail=getObj("ReportEmail");var objReportComments=getObj("ReportComments");var objDialogValidator=getObj("DialogValidator");if(objReportName!=null&&objReportEmail!=null&&objReportComments!=null&&objDialogValidator!=null){if(Trim(objReportName.value).length<1||Trim(objReportName.value).length>50){objDialogValidator.innerHTML="<span class=\"Error\">姓名长度应在1-50字之间!</span>";objReportName.focus();return false;}if(Trim(objReportEmail.value).length<1||Trim(objReportEmail.value).length>100){objDialogValidator.innerHTML="<span class=\"Error\">邮件地址长度应在1-100字之间!</span>";objReportEmail.focus();return false;}else{var rx=new RegExp(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/);var matches=rx.exec(Trim(objReportEmail.value));if(matches==null||Trim(objReportEmail.value)!=matches[0]){objDialogValidator.innerHTML="<span class=\"Error\">邮件地址格式错误,请重新输入!</span>";objReportEmail.focus();return false;}}if(Trim(objReportComments.value).length<1||Trim(objReportComments.value).length>1000){objDialogValidator.innerHTML="<span class=\"Error\">内容长度应在1-1000字之间!</span>";objReportComments.focus();return false;}var PostData="do="+Type+"&reportid="+ID+"&name="+StrCode(Trim(objReportName.value))+"&mail="+StrCode(Trim(objReportEmail.value))+"&comments="+StrCode(Trim(objReportComments.value))+"&url="+StrCode(location.href)+"&browser="+StrCode(navigator.userAgent);PostRequests(window.location.protocol+"//"+window.location.host+"/AJAX_report.php",PostData);DialogShow("<div id=\"DialogLoading\">正在提交,请稍候...</div>",80,24,124,24);}return false;}

function Report(Type,ID){var PostData="do="+Type+"&reportid="+ID;PostRequests(window.location.protocol+"//"+window.location.host+"/AJAX_report.php",PostData);DialogShow("<div id=\"DialogLoading\">正在读取,请稍候...</div>",110,10,124,20);}
(function(){var window=this,undefined;Object.extend=function(destination,source){for(var property in source){destination[property]=source[property]}return destination};var ex={css:function(key,value){if(typeof key=="object"){Object.extend(this.style,key);return}if(value===undefined){return this[key]}this.style[key]=value},on:function(evt,func){func=func||function(){};func.elem=this;if(window.attachEvent){this.attachEvent("on"+evt,func)}else{this.addEventListener(evt,func,false)}},pos:function(){var curleft=curtop=0;obj=this;do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent);return[curleft,curtop]}};var dict=window.$z=function(id){id=id||document;var obj=null;if(id.nodeType){obj=id}else{if(document.getElementById){obj=document.getElementById(id)}else{if(document.layers){obj=document.layers[id]}}if(obj&&obj.attributes.id.value!=id){obj=null;if(document.all){for(var i=1,j=document.all[id].length;i<j;i++){if(document.all[id][i].attributes.id.value==id){obj=document.all[id][i];break}}}}}if(obj!=null){Object.extend(obj,ex)}return obj};Object.extend($z,{on:function(evt,func){func=func||function(){};if(window.attachEvent){window.attachEvent("on"+evt,func)}else{window.addEventListener(evt,func,false)}},stop:function(e){if(typeof e!="object"){return}if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}},top:function(){return document.body.scrollTop||document.documentElement.scrollTop},left:function(){return document.body.scrollLeft||document.documentElement.scrollLeft},width:function(){return self.innerWidth||document.documentElement.clientWidth},height:function(){return self.innerHeight||document.documentElement.clientHeight},theight:function(){var d=document,b=d.body,e=d.documentElement;return Math.max(Math.max(b.scrollHeight,e.scrollHeight),Math.max(b.clientHeight,e.clientHeight))},twidth:function(){var d=document,b=d.body,e=d.documentElement;return Math.max(Math.max(b.scrollWidth,e.scrollWidth),Math.max(b.clientWidth,e.clientWidth))},getCookie:function(key){var tmp=document.cookie.match((new RegExp(key+"=.*?($|;)","g")));if(!tmp||!tmp[0]){return null}else{return unescape(tmp[0].substring(key.length+1,tmp[0].length).replace(";",""))||null}},setCookie:function(key,value,ttl,path,domain,secure){var cookie=[key+"="+escape(value),"path="+((!path||path=="")?"/":path),"domain="+((!domain||domain=="")?window.location.hostname:domain)];if(ttl){cookie.push("expires="+this.getGMT(ttl))}if(secure){cookie.push("secure")}return document.cookie=cookie.join(";")},unsetCookie:function(key,path,domain){path=(!path||typeof path!="string")?"":path;domain=(!domain||typeof domain!="string")?"":domain;if(this.getCookie(key)){this.setCookie(key,"","Thu, 01-Jan-70 00:00:01 GMT",path,domain)}},getGMT:function(ttl){if(parseInt(ttl)=="NaN"){return""}else{now=new Date();now.setTime(now.getTime()+(parseInt(ttl)*60*1000));return now.toGMTString()}},getClass:function(cls,node,tag){var c=[];node=node||document;var p=new RegExp("(^|\\s)"+cls+"(\\s|$)");var els=(!tag&&node.all)||node.getElementsByTagName(tag||"*");var elsLen=els.length;for(var i=0,j=0;i<els.length;i++){if(p.test(els[i].className)){c[j]=$z(els[i]);j++}}return c},emptyFunction:function(){},loadJS:function(id,url){id=id||"_loadjs_undefined_id";var oScript=$z(id);var head=document.getElementsByTagName("head").item(0);if(oScript){head.removeChild(oScript)}oScript=document.createElement("script");oScript.setAttribute("src",url);oScript.setAttribute("id",id);oScript.setAttribute("type","text/javascript");oScript.setAttribute("language","javascript");head.appendChild(oScript);return oScript},jsonEncode:function(obj){var t=typeof(obj);if(t!="object"||obj===null){if(t=="string"){obj='"'+obj+'"'}return String(obj)}else{var n,v,json=[],arr=(obj&&obj.constructor==Array);for(n in obj){v=obj[n];t=typeof(v);if(t=="string"){v='"'+v+'"'}else{if(t=="object"&&v!==null){v=JSON.stringify(v)}}json.push((arr?"":'"'+n+'":')+String(v))}return(arr?"[":"{")+String(json)+(arr?"]":"}")}},jsonDecode:function(str){if(str===""){str='""'}eval("var p="+str+";");return p},_getRequest:function(){var http_request,response,i;var activex_ids=["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType("text/xml")}}else{if(window.ActiveXObject){for(i=0;i<activex_ids.length;i++){try{http_request=new ActiveXObject(activex_ids[i])}catch(e){}}}}if(!http_request){return false}return http_request},get:function(url,func,isjson){return this._send(url,func,"GET",isjson)},post:function(url,func,args,isjson){return this._send(url,func,"POST",isjson,args)},_send:function(u,f,m,j,a){var x=this._getRequest();x.open(m,u,true);x.onreadystatechange=function(){if(x.readyState==4){if(j==null){f(x.responseText)}else{f($z.jsonDecode(x.responseText))}}};if(m=="POST"){x.setRequestHeader("Content-type","application/x-www-form-urlencoded")}x.setRequestHeader("ISAJAX","yes");var b;if(typeof(a)=="object"){var aa=[];for(var i in a){if(typeof(a[i])=="object"){aa=aa.concat(encodeURIComponent(i)+"="+encodeURIComponent($z.jsonEncode(a[i])))}aa=aa.concat(encodeURIComponent(i)+"="+encodeURIComponent(a[i]))}b=aa.join("&")}else{b=a}x.send(b);return x}})})();function showmenu(g,f){var e=$z(g),a=$z(g+"_menu");if(!a.init){var c=e.pos();if(f==null||typeof f!="function"){f=$z.emptyFunction}var d=function(){if(a.t){clearTimeout(a.t)}a.t=setTimeout(function(){a.css("display","none");f()},300)};var b=function(){if(a.t){clearTimeout(a.t)}};e.on("mouseout",d);a.on("mouseout",d);e.on("mouseover",b);a.on("mouseover",b);a.css({left:c[0]+"px",top:c[1]+e.offsetHeight+"px"});a.init=1}a.css("display","block")}function closemenu(b){if(b.substr(b.length-4,4)!="menu"){b+="_menu"}var a=$z(b);if(a.init){clearTimeout(a.t);a.css("display","none")}}function get_usercfg(a){var d=$z.getCookie("DictCN_cfg");if(d==null){return null}var b=d.toString().match(new RegExp(a+"(\\d+)","i"));if(b==null){return 0}return parseInt(b[1])}function set_usercfg(a,d){var f=$z.getCookie("DictCN_cfg");var e="";if(f==null){e=a+d}else{if(p=f.toString().match(new RegExp(a+"(\\d+)","i"))){e=f.replace(p[0],a+d)}else{e=f+a+d}}var b=$z.getCookie("DictCN_time");b=b?parseInt(b):0;$z.setCookie("DictCN_cfg",e,b,"/","dict.cn")};
report.reporter=false;
function report($wtid,$wuid,$title,$extend){
	if(!$title){
		$title = '改进词条';
	}
	if(!report.reporter){
		var $block = '<DIV id="reportbox" style="background-color:#FFF;left:-1000px;top:-1000px;disply:none;position:absolute;border:1px solid #7E98D6;width:240px;">'+
		'<div style="border: medium none ; margin: 0px; padding: 0px; width: 240px; height: 20px;background-color:#C8DAF3; display: inline;"><table cellspacing="0" cellpadding="0" border="0" width="100%"><tbody><tr><td height="20" align="left" width="60%" name="_dict_title" id="_dict_title" style="border: medium none ; margin: 0px; padding: 0pt 3px; background-color: rgb(200, 218, 243); color: rgb(26, 145, 0); font-size: 14px; line-height: 20px; font-weight: normal; font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;">'+
		$title+' - Dict.CN</td><td valign="middle" height="20" align="right" style="border: medium none ; margin: 0px; padding: 0pt 3px; background-color: rgb(200, 218, 243); line-height: 20px; font-weight: normal; font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;"><a style="border: medium none ; margin: 0px; padding: 0px; font-weight: normal; font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;" target="_self" title="关闭" href="javascript:void(0);" onclick="report().hide();"><img border="0" align="absmiddle" style="border: medium none ; margin: 0px; padding: 0px; display: inline;" src="http://dict.cn/img/close.gif"/></a></td></tr></tbody></table></div>'+
		'<h4 style="text-align:center;">'+$title+'</h4>'+
		'<div style="margin:5px 0;text-align:center;" id="rpt_inner">'+
		'<textarea id="rpt_comment" style="width:200px;height:80px;overflow-y:auto;">发表意见</textarea><br />'+
		'<div style="color:#666;text-align:left;margin:8px 15px;">我的大名<input size=15 id="rpt_name" /></div>'+
		'<button onclick="report().send();">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;<button onclick="report().hide();">取消</button>'+
		'</div>'+
		'<div style="display:none;margin:5px 0;text-align:center;font-size:14px;" id="rpt_result"><br /><b>提交成功</b><br />谢谢您给的意见!<br />我们会仔细阅读!<br />&nbsp;</div>'+
		'<iframe id="rpt_channel" style="visibility:hidden;width:1px;height:1px"></iframe>'+
		'</DIV>';
		var el=document.createElement('div');
		el.innerHTML = $block;
		document.body.insertBefore(el,document.body.firstChild);
		report.reporter = (function(){
			var ex = '';
			if(typeof $extend == 'string'){
				ex = $extend+'\t___\t';
			}
			var id=$wtid;
			var wuid=$wuid;
			var p,c,n,ch,ni,an,su;
			var tg=0,f=0;
			var sending=false;
			return {
				't1':false,
				't2':false,
				'show':function(obj){
					if(!f){
						su=getObj('rpt_result');
						an=obj;
						p=getObj('reportbox');
						ch=getObj('rpt_channel');
						c=getObj('rpt_comment');
						n=getObj('rpt_name');
						ni=getObj('rpt_inner');
						var pos=findPos(obj);
						p.style.top=pos[1]+20+'px';
						p.style.left=pos[0]+40+'px';
						if(window.attachEvent){
							p.attachEvent('onclick',function(){var e=window.event?window.event:arguments[0];e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();return false;});
							window.attachEvent('onresize',this.resize);
							document.getElementsByTagName("BODY")[0].attachEvent('onclick',this.hide);
						}else{
							p.addEventListener('click',function(){var e=window.event?window.event:arguments[0];e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();return false;},false);
							window.addEventListener('resize',this.resize,false);
							document.getElementsByTagName("BODY")[0].addEventListener('click',this.hide,false);
						}
						f=1;
					}
					p.style.display = 'block';
				},
				'hide':function(){
					if(this.t2)clearTimeout(this.t2);
					p.style.display='none';
					c.blur();
					tg = 0;
				},
				'tgl':function(o){
					if(this.t1){
						clearTimeout(this.t1);
						ni.style.display = 'block';
						su.style.display = "none";
					}
					tg = !tg;
					if(tg)this.show(o);
					else this.hide();
					return false;
				},
				'send':function(){
					var str = 'c='+encodeURIComponent(ex+c.value)+'&n='+encodeURIComponent(n.value)+'&id='+id+'&wuid='+wuid;
					this.sending = true;
					ch.src = 'http://edit.dict.cn/editreport.php?'+str;
					var _this=this;
					this.t2 = setTimeout(function(){if(sending){sending=false;_this.hide();}},2000);
				},
				'off':function(){
					ni.style.display = 'none';
					su.style.display = "block";
					var _this = this;
					sending=false;
					this.t1 = setTimeout(function(){
					_this.hide();
					ni.style.display = 'block';
					su.style.display = "none";
					},3000);
				},
				'resize':function(){
					var pos=findPos(an);
					p.style.top=pos[1]+20+'px';
					p.style.left=pos[0]+40+'px';
				}
			};
		})();
	}
	return report.reporter;
}
