﻿//for all pages
document.onkeydown= KeyCheck;
function KeyCheck(e)//works in IE and Firefox but not in Opera (June 2006)
{
   var KeyAlt = (window.event) ? event.altKey : e.altKey;
   var KeyID = (window.event) ? event.keyCode : e.keyCode;
   if (KeyAlt && KeyID == 48)
					{//0 Accesskeys
					document.location.href = "accesskey0";
					}
    if (KeyAlt && KeyID == 49)
					{//1 Home
					document.location.href = "http://www.smackthemouse.com";
					}
    if (KeyAlt && KeyID == 51)
					{//3 ToC, Sitemap
					document.location.href = "/contents";
					}
    if (KeyAlt && KeyID == 52)
					{//4 Search, in my case same as Homepage
					document.location.href = "http://www.smackthemouse.com";
					}
	if (KeyAlt && KeyID == 57)
	    			{//9 Contact
					document.location.href = "/jesper";
					}
}
					
//only relevant for articles
window.onload = hide;
function hide()
{
if (document.getElementById){ 
if(document.getElementById("appendix"))//only if exist
{
document.getElementById("appendix").style.display = "none";
document.getElementById("toggle").style.display = "block";
}
}
}

//only relevant for articles
function toggle(obj) {
	var to = document.getElementById(obj);
	to.style.display = (to.style.display != 'none' ? 'none' : 'block' );
	
if(document.getElementById("plusminus").innerHTML == "-")
{
document.getElementById("plusminus").innerHTML = "+";
}
else {document.getElementById("plusminus").innerHTML = "-";}
document.location.href = "#copyright";
}