window.onerror=function(){return true};var n=0,content="";function findInPage(_){var $,B,A;if(_=="")return false;if(window.find){A=window.find(_);if(!A)alert("\u672a\u641c\u7d22\u5230\u201c"+_+"\u201d\u7684\u5feb\u6377\u952e\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165")}else{if(document.createRange)$=document.createRange();else $=document.body.createTextRange();for(B=0;B<=n&&(A=$.findText(_))!=false;B++){$.moveStart("character",1);$.moveEnd("textedit")}if(A){$.moveStart("character",-1);$.findText(_);$.select();$.scrollIntoView();n++}else if(n>0){n=0;findInPage(_)}else alert("\u672a\u641c\u7d22\u5230\u201c"+_+"\u201d\u7684\u5feb\u6377\u952e\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165")}}function searchHighLight(B){if(document.createRange)var A=document.createRange();else A=document.body.createTextRange();if(A.findText){while(A.findText(B)){A.pasteHTML("<span style=\"background:#ffff00\">"+A.text+"</span>");A.collapse(true)}}else{var _,$;_=window.getSelection();while(window.find(B)){$=document.createElement("SPAN");$.style.background="#ffff00";_.getRangeAt(0).surroundContents($)}}}function searchTxt(){var $=document.getElementById("search-i").value;if($==""||$=="\u3000 \u5173\u952e\u8bcd"){alert("\u8bf7\u5148\u8f93\u5165\u5173\u952e\u8bcd");document.getElementById("search-i").focus();return false}findInPage($)}function searchFocus(){if(document.getElementById("search-i").value=="\u3000 \u5173\u952e\u8bcd"){document.getElementById("search-ico").style.display="none";document.getElementById("search-i").value=""}else{document.getElementById("search-i").select();document.getElementById("search-ico").style.display="none"}}function searchBlur(){if(document.getElementById("search-i").value==""){document.getElementById("search-ico").style.display="block";document.getElementById("search-i").value="\u3000 \u5173\u952e\u8bcd"}}function searchKeyUp($){if($.keyCode==13)return searchTxt();if(content=="")content=document.getElementById("content-div").innerHTML;else document.getElementById("content-div").innerHTML=content;searchHighLight(document.getElementById("search-i").value)}function fixedSearch(){document.getElementById("search-div").style.top=document.documentElement.scrollTop;setTimeout(function(){fixedSearch()},50)}