// Disable Right-click (works also in Firefox)
/*
function right(e) {
  if (e && e.which && (e.which == 3 || e.which == 2)) return false;
  else if (window.event && (event.button == 2 || event.button == 3)) {
	nocontextmenu();
    return false;
  }
  return true;
}
function nocontextmenu() {
   //alert('Sorry! To avoid Internet pilfering this function has been diabled.');
   return false;
}
document.onmousedown=right;
if (window.captureEvents) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
document.oncontextmenu = nocontextmenu;
document.onmousedown = right;
document.onmouseup = right;
*/

// Author: Simon Willison (addLoadEvent)
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}