var searchhi_string='';function stripVowelAccent(str){var rExps=[/[\xC0-\xC2]/g,/[\xE0-\xE2]/g,/[\xC8-\xCA]/g,/[\xE8-\xEB]/g,/[\xCC-\xCE]/g,/[\xEC-\xEE]/g,/[\xD2-\xD4]/g,/[\xF2-\xF4]/g,/[\xD9-\xDB]/g,/[\xF9-\xFB]/g];var repChar=['A','a','E','e','I','i','O','o','U','u'];for(var i=0;i<rExps.length;++i)str=str.replace(rExps[i],repChar[i]);return str}function highlightWord(node,word,doc){doc=typeof(doc)!='undefined'?doc:document;if(node.hasChildNodes){var hi_cn;for(hi_cn=0;hi_cn<node.childNodes.length;hi_cn++){highlightWord(node.childNodes[hi_cn],word,doc)}}if(node.nodeType==3){tempNodeVal=stripVowelAccent(node.nodeValue.toLowerCase());tempWordVal=stripVowelAccent(word.toLowerCase());if(tempNodeVal.indexOf(tempWordVal)!=-1){pn=node.parentNode;if(pn.className!="searchword"){nv=node.nodeValue;ni=tempNodeVal.indexOf(tempWordVal);before=doc.createTextNode(nv.substr(0,ni));docWordVal=nv.substr(ni,word.length);after=doc.createTextNode(nv.substr(ni+word.length));hiwordtext=doc.createTextNode(docWordVal);hiword=doc.createElement("span");hiword.className="searchword";hiword.appendChild(hiwordtext);pn.insertBefore(before,node);pn.insertBefore(hiword,node);pn.insertBefore(after,node);pn.removeChild(node)}}}}function unhighlightWord(node,word,doc){doc=typeof(doc)!='undefined'?doc:document;if(node.hasChildNodes){var hi_cn;for(hi_cn=0;hi_cn<node.childNodes.length;hi_cn++){highlightWord(node.childNodes[hi_cn],word,doc)}}if(node.nodeType==3){tempNodeVal=node.nodeValue.toLowerCase();tempWordVal=word.toLowerCase();if(tempNodeVal.indexOf(tempWordVal)!=-1){pn=node.parentNode;if(pn.className=="searchword"){prevSib=pn.previousSibling;nextSib=pn.nextSibling;nextSib.nodeValue=prevSib.nodeValue+node.nodeValue+nextSib.nodeValue;prevSib.nodeValue='';node.nodeValue=''}}}}function unhighlight(node){if(node.hasChildNodes){var hi_cn;for(hi_cn=0;hi_cn<node.childNodes.length;hi_cn++){unhighlight(node.childNodes[hi_cn])}}if(node.nodeType==3){pn=node.parentNode;if(pn.className=="searchword"){prevSib=pn.previousSibling;nextSib=pn.nextSibling;nextSib.nodeValue=prevSib.nodeValue+node.nodeValue+nextSib.nodeValue;prevSib.nodeValue='';node.nodeValue=''}}}function googleSearchHighlight(doc){doc=typeof(doc)!='undefined'?doc:document;if(!doc.createElement)return;ref=doc.referrer;ref=ref.replace(/\/search\/web\//,'?search&q=');if(ref.indexOf('?')==-1)return;qs=ref.substr(ref.indexOf('?')+1);qsa=qs.split('#');qs=qsa[0];qs=qs.replace(/(^|&)p=Q&ts=e&/,'&');qs=qs.replace(/(^|&)query=/,'&q=');qs=qs.replace(/(^|&)key=/,'&q=');qs=qs.replace(/(^|&)keywords=/i,'&q=');qs=qs.replace(/(^|&)searchfor=/,'&q=');qs=qs.replace(/(^|&)qt=/,'&q=');qs=qs.replace(/(^|&)s=/,'&q=');qsa=qs.split('&');for(i=0;i<qsa.length;i++){qsip=qsa[i].split('=');if(qsip.length==1)continue;if(qsip[0]=='q'||qsip[0]=='p'||qsip[0]=='w'){qsip[1]=unescape(qsip[1]).replace(/^\s+|\s+$/g,"");if(qsip[1]=='')continue;phrases=qsip[1].replace(/\+/g,' ').split(/\"/);for(p=0;p<phrases.length;p++){phrases[p]=unescape(phrases[p]).replace(/^\s+|\s+$/g,"");if(phrases[p]=='')continue;if(p%2==0)words=phrases[p].replace(/([+,()]|%(29|28)|\W+(AND|OR)\W+)/g,' ').split(/\s+/);else{words=Array(1);words[0]=phrases[p]}for(w=0;w<words.length;w++){if(words[w]=='')continue;highlightWord(doc.getElementsByTagName("x")[0],words[w],doc);if(p%2==0)searchhi_string=searchhi_string+' '+words[w];else searchhi_string=searchhi_string+' "'+words[w]+'"'}}}}}function localSearchHighlight(searchStr,tryQ,doc){tryQ=typeof(tryQ)!='undefined'?tryQ:0;doc=typeof(doc)!='undefined'?doc:document;if(!doc.createElement)return;if(searchStr=='')return;if(searchStr.indexOf('?')==-1)qs=searchStr.substr(0);else qs=searchStr.substr(1);qsa=qs.split('&');for(i=0;i<qsa.length;i++){qsip=qsa[i].split('=');if(qsip.length==1)continue;if(qsip[0]=='h'||(tryQ&&(qsip[0]=='q'||qsip[0]=='p'))){qsip[1]=unescape(qsip[1]).replace(/^\s+|\s+$/g,"");if(qsip[1]=='')continue;phrases=qsip[1].replace(/\+/g,' ').split(/\"/);for(p=0;p<phrases.length;p++){phrases[p]=unescape(phrases[p]).replace(/^\s+|\s+$/g,"");if(phrases[p]=='')continue;if(p%2==0)words=phrases[p].replace(/([+,()]|%(29|28)|\W+(AND|OR)\W+)/g,' ').split(/\s+/);else{words=Array(1);words[0]=phrases[p]}for(w=0;w<words.length;w++){if(words[w]=='')continue;highlightWord(doc.getElementsByTagName("x")[0],words[w],doc);if(p%2==0)searchhi_string=searchhi_string+' '+words[w];else searchhi_string=searchhi_string+' "'+words[w]+'"'}}}}}function postSearchHighlight(doc){doc=typeof(doc)!='undefined'?doc:document;searchhi_string=searchhi_string.replace(/^\s+|\s+$/g,"");if(doc.location.hash.length>1)doc.location.hash=doc.location.hash}function SearchHighlight(doc,loc){doc=typeof(doc)!='undefined'?doc:document;loc=typeof(loc)!='undefined'?loc:doc.location;if(doc.createElement){var docrefpage=doc.referrer.split('?',2);var locrefpage=loc.href.split('?',1);if((docrefpage[0].toUpperCase()!=locrefpage[0].toUpperCase())&&((docrefpage[1]&&docrefpage[1].match(/(^|&)(p=Q&ts=e&|query=|key=|keywords=|searchfor=|qt=|q=|p=|w=|s=)/))||doc.referrer.match(/\/search\/web\//))){googleSearchHighlight(doc);localSearchHighlight(loc.search,0,doc)}else{var locsearch=loc.search;if(locsearch.indexOf('?')==-1){locsearch=locsearch.replace(/\/search\//,'?search&q=')}else{locsearch=locsearch.replace(/(\?|&)highlight=/,"$1h=")}localSearchHighlight(locsearch,1,doc)}postSearchHighlight(doc)}}function SmartHighlight(doc,loc){doc=typeof(doc)!='undefined'?doc:document;loc=typeof(loc)!='undefined'?loc:doc.location;var today=new Date();var now=today.getUTCSeconds();var cookie=doc.cookie;var cookieArray=cookie.split('; ');for(var loop=0;loop<cookieArray.length;loop++){var nameValue=cookieArray[loop].split("=");if(nameValue[0].toString()=='SHTS'){var cookieTime=parseInt(nameValue[1])}else if(nameValue[0].toString()=='SHTSP'){var cookieName=nameValue[1]}}if(cookieName&&cookieTime&&cookieName==escape(loc.href)&&Math.abs(now-cookieTime)<5){searchhi_unl=0}else{SearchHighlight(doc)}}function SmartHLUnload(doc){doc=typeof(doc)!='undefined'?doc:document;loc=typeof(loc)!='undefined'?loc:doc.location;if(searchhi_unl>0){var today=new Date();var now=today.getUTCSeconds();doc.cookie='SHTS='+now+';';doc.cookie='SHTSP='+escape(loc.href)+';'}else{doc.cookie='SHTS=;';doc.cookie='SHTSP=;'}}function NotRefreshHL(){searchhi_unl=0;return true}var searchhi_unl=1;