var liveSearchReq=false;var t=null;var liveSearchLast="";var isIE=false;if(window.XMLHttpRequest){liveSearchReq=new XMLHttpRequest()}function liveSearchInit(){var searchInput=document.getElementById('livesearch');if(searchInput==null)return;searchInput.setAttribute('autocomplete','off');if(navigator.userAgent.indexOf("Safari")>0){document.getElementById('livesearch').addEventListener("keydown",liveSearchKeyPress,false)}else if(navigator.product=="Gecko"){document.getElementById('livesearch').addEventListener("keypress",liveSearchKeyPress,false)}else{document.getElementById('livesearch').attachEvent('onkeydown',liveSearchKeyPress);isIE=true}}function liveSearchKeyPress(event){if(event.keyCode==40){highlight=document.getElementById("LSHighlight");if(!highlight){try{highlight=document.getElementById("LSRes").firstChild}catch(exception){}}else{highlight.removeAttribute("id");highlight=highlight.nextSibling}if(highlight){highlight.setAttribute("id","LSHighlight")}if(!isIE){event.preventDefault()}}else if(event.keyCode==38){highlight=document.getElementById("LSHighlight");if(!highlight){try{highlight=document.getElementById("LSRes").lastChild}catch(exception){}}else{highlight.removeAttribute("id");highlight=highlight.previousSibling}if(highlight){highlight.setAttribute("id","LSHighlight")}if(!isIE){event.preventDefault()}}else if(event.keyCode==27){highlight=document.getElementById("LSHighlight");if(highlight){highlight.removeAttribute("id")}document.getElementById("LSResult").style.display="none";document.forms.searchform.q.value=''}else if(event.keyCode==13){liveSearchSubmit()}}function closeLiveSearch(){highlight=document.getElementById("LSHighlight");if(highlight){highlight.removeAttribute("id")}document.getElementById("LSResult").style.display="none";document.forms.searchform.q.value=''}function liveSearchStart(){if(t){window.clearTimeout(t)}t=window.setTimeout("liveSearchDoSearch()",200)}function liveSearchDoSearch(){if(liveSearchLast!=document.forms.searchform.q.value){if(liveSearchReq&&liveSearchReq.readyState<4){liveSearchReq.abort()}if(searchTrimAll(document.forms.searchform.q.value)==""){document.getElementById("LSResult").style.display="none";highlight=document.getElementById("LSHighlight");if(highlight){highlight.removeAttribute("id")}return false}if(window.XMLHttpRequest){liveSearchReq=new XMLHttpRequest()}else if(window.ActiveXObject){liveSearchReq=new ActiveXObject("Microsoft.XMLHTTP")}liveSearchReq.onreadystatechange=liveSearchProcessReqChange; liveSearchReq.open("GET", "?ls=" + document.forms.searchform.q.value); liveSearchLast=document.forms.searchform.q.value;liveSearchReq.send(null)}}function liveSearchProcessReqChange(){if(liveSearchReq.readyState==4){var res=document.getElementById("LSResult");res.style.display="block";res.firstChild.innerHTML='
gunakan tanda panah & enter
tutup (esc)

'+liveSearchReq.responseText}}function liveSearchSubmit(){var highlight=document.getElementById("LSHighlight");if(highlight&&highlight.firstChild){window.location=highlight.firstChild.getAttribute("href");return false}else{var searchInput=document.getElementById('searchform');searchInput.submit();return false}}function liveSearchByContext(thelink,theText){var searchTerm=theText;if(liveSearchLast!=searchTerm){if(liveSearchReq&&liveSearchReq.readyState<4){liveSearchReq.abort()}if(window.XMLHttpRequest){liveSearchReq=new XMLHttpRequest()}else if(window.ActiveXObject){liveSearchReq=new ActiveXObject("Microsoft.XMLHTTP")}liveSearchReq.onreadystatechange=function(){if(liveSearchReq.readyState==4){var newDiv=document.createElement('div');newDiv.id='liveLinkRes';newDiv.style.display='none';newDiv.innerHTML='
 
[x]

'+liveSearchReq.responseText;newDiv.style.display='block';myRes=document.getElementById(theText+"-livelink");myRes.appendChild(newDiv);myBlank=document.createTextNode("");myRes.insertBefore(myBlank,newDiv)}} liveSearchReq.open("GET", "?ls=" + searchTerm); liveSearchLast=searchTerm;liveSearchReq.send(null)}else{closeLiveLink()}}function searchTrimAll(sString){while(sString.substring(0,1)==' '){sString=sString.substring(1,sString.length)}while(sString.substring(sString.length-1,sString.length)==' '){sString=sString.substring(0,sString.length-1)}return sString}function closeLiveLink(){liveSearchLast="";highlight=document.getElementById("LSHighlight");if(highlight){highlight.removeAttribute("id")}document.getElementById("liveLinkRes").style.display="none"}function addDOMLoadEvent(func){if(!window.__load_events){var init=function(){if(arguments.callee.done)return;arguments.callee.done=true;if(window.__load_timer){clearInterval(window.__load_timer);window.__load_timer=null}for(var i=0;i<\/scr"+"ipt>");var script=document.getElementById("__ie_onload");script.onreadystatechange=function(){if(this.readyState=="complete"){init()}};/*@end@*/if(/WebKit/i.test(navigator.userAgent)){window.__load_timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){init()}},10)}window.onload=init;window.__load_events=[]}window.__load_events.push(func)}addDOMLoadEvent(liveSearchInit);