addonloadhandler(menuscroll);
var t=35;
var moz=(navigator.appName.indexOf('Netscape')!=-1);
function menuscroll(){var dy=moz?pageYOffset+35-t:document.documentElement.scrollTop+35-t;var my=dy/10;if((Math.abs(my)<1)&&(Math.abs(dy)>1)){(my>0)?my=1:my=-1};my=parseInt(t+my);document.getElementById('menu').style.top=my+"px";t=my;setTimeout("menuscroll()",10);};
function addonloadhandler(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload;func;};};};
function showhide(id){document.getElementById(id).style.display=document.getElementById(id).style.display=='none'?'block':'none';};
function show(id){document.getElementById(id).style.display='block';};
function hide(id){document.getElementById(id).style.display='none';};
function getsource(id){window.clipboardData.setData('Text',document.getElementById(id).innerText);alert('Sourcekoden er nu kopieret til udklipsholderen');};
function selectsource(id){document.getElementById(id).focus();document.getElementById(id).select();};
function editlink(link){wlink=window.open('','wlink','width=300,height=75,dependent=yes');wlink.document.open();wlink.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Link</title><link rel="stylesheet" type="text/css" href="kenshoedit.css"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><form onsubmit="window.opener.document.getElementById("redirlink").value=document.getElementById("relink").value;window.close();"><div class="menueditor"><div class="linkeditor"><input type="text" maxlength="220" id="relink" class="txt" value="'+link+'"/></div><input type="submit" value="Opdater link" onclick="window.opener.document.getElementById("redirlink").value=document.getElementById("relink").value;window.close();" class="editok" /></div></form></body></html>');wlink.document.close();wlink.focus();window.onfocus=function(){wlink.close();};};
function vissearch(){if(document.getElementById("divsearch").style.display=="block"){document.getElementById("divsearch").style.display="none"}else{document.getElementById("divsearch").style.display="block";document.getElementById("search").focus();window.scrollBy(0,100)}};
function dosearch(){if(navigator.appName.indexOf("Microsoft")!=-1){if(event.keyCode==13){event.returnValue=false;event.cancel=true;window.location.replace('/kensho/search.aspx?str='+escape(document.getElementById("search").value))}}};
function endsearch(){window.location.replace(window.location.href.replace(/[?|&]search.+/,""))};

