var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var cur_fl;	// holds id of currently visible layer
function swapLayers(id) {
  if (cur_fl) hideLayer(cur_fl);
  showLayer(id);
  cur_fl = id;
}

function showLayer(id) {
  var fl = getElemRefs(id);
  if (fl && fl.css) fl.css.visibility = "visible";
}

function hideLayer(id) {
  var fl = getElemRefs(id);
  if (fl && fl.css) fl.css.visibility = "hidden";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}
var message="Copyright protected!\n ALL RIGHTS RESERVED"; 

function click(e) {if (document.all) {if (event.button == 2) {alert(message);return false;}}
if (document.layers) {if (e.which == 3) {alert(message);return false;}}}
if (document.layers) {document.captureEvents(Event.MOUSEDOWN);}document.onmousedown=click;