
var message="COPYRIGHT PROTECTED";
function clickIE() {
		 if (document.all) {
		 		 alert(message);return false;
		 }
}
function clickNS(e) {
		 if  (document.layers||(document.getElementById&&!document.all)) {
		 		 if (e.which==2||e.which==3) {
		 		 		 alert(message);
		 		 		 return false;
		 		 }
		 }
}

if (document.layers) {
		 document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
}else{
		 document.onmouseup=clickNS;document.oncontextmenu=clickIE;
}

document.oncontextmenu=new Function("return false")

//to turn off borders in macs
function getLinksToBlur() {
		if (!document.getElementById) return
		links = document.getElementsByTagName("a");
		for(i=0; i<links.length; i++) {
			links[i].onfocus = unblur
		}
	}

function unblur() {
this.blur();
}
function ImageBrowsingKeydownHandler( e, mfHandle ) {
//////////////////////////

    if (!e) { e = window.event; }
    if (e.type!='keydown') { return; }

    switch (e.keyCode) {

        case 37:    // left_arrow
                    mfHandle.Previous();
                    break;

        case 39:    // right_arrow
                    mfHandle.Next();
                    break;
        default:
    }
}

///////////////////////////
function PortaMagicFooter( footerStr ) {
///////////////////////////

    var p_link = ' <a href=\"http://www.stegmann.dk/mikkel/porta/\" class="control">Porta</a>';
    return footerStr.replace( / Porta/g, p_link );
}
