function toggle_visibility(id){var e=document.getElementById(id);if(id=='SMButtons'){var o=document.getElementById('commentformcontainer')}else{var o=document.getElementById('SMButtons')};if(e.style.display=='none'){e.style.display='block';o.style.display='none';setCookie('display',id)}else{e.style.display='none';setCookie('display','')}};function setCookie(c_name,value){var exdays=1;var exdate=new Date();exdate.setDate(exdate.getDate()+exdays);var c_value=escape(value)+((exdays==null)?"":";expires="+exdate.toUTCString());document.cookie=c_name+"="+c_value};function deel(d){if(d=='facebook'){var url='http://www.facebook.com/sharer/sharer.php?u='+window.u;var w=480;var h=380}else if(d=='googleplus'){var url='https://plusone.google.com/_/+1/confirm?url='+window.u+'&title='+window.t;var w=545;var h=615}else if(d=='twitter'){var url='http://twitter.com/intent/tweet?url='+window.u;var w=550;var h=450}else if(d=='stumbleupon'){var url='http://www.stumbleupon.com/submit?url='+window.u+'&title='+window.t;var w=1037;var h=783};var x=Number((window.screen.width-w)/2);var y=Number((window.screen.height-h)/2);toggle_visibility('SMButtons');window.open(url,'','width='+w+',height='+h+',left='+x+',top='+y+',personalbar=0,toolbar=0,scrollbars=1,resizable=1')};function getCookie(c_name){var i,x,y,ARRcookies=document.cookie.split(";");for(i=0;i<ARRcookies.length;i++){x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x==c_name){return unescape(y)}}};var display=getCookie('display');if(display=='SMButtons'){el=document.getElementById('SMButtons');el.style.display='block'};if(display=='commentformcontainer'){el=document.getElementById('commentformcontainer');el.style.display='block'};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;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==27){document.getElementById("LSResult").style.display="none";document.forms.searchform.q.value=''}else if(event.keyCode==13){liveSearchSubmit()}};function Annuleer(){closeLiveSearch()};function closeLiveSearch(){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";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='<div id="LSHeader"><a href="#" onclick="closeLiveSearch();">x</a></div>'+liveSearchReq.responseText}};function liveSearchSubmit(){var searchInput=document.getElementById('searchform');searchInput.submit();return false};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 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<window.__load_events.length;i++){window.__load_events[i]()};window.__load_events=null};if(document.addEventListener){document.addEventListener("DOMContentLoaded",init,false)};/*@cc_on@*//*@if(@_win32)document.write("<scr"+"ipt id=__ie_onload defer src=//0><\/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);
