﻿
//<![CDATA[

var message = "© 2005 - 2009 Nochevieja Madrid.com";

function clickIE() {
    if (document.all) {
        (message);
        return false;
    }
}

function clickNS(e) {
    if (document.layers || (document.getElementById && !document.all)) {
        if (e.which == 1 || e.which == 2 || e.which == 3) {
            (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")

function disableselect(e) {
    return false;
}

function reEnable() {
    return true;
}

document.onselectstart = new Function("return false")

if (window.sidebar) {
    document.onmousedown = disableselect;
    document.onclick = reEnable;
}
/*
disableSelection(document.body);

function mouseDown(e) {

    if (parseInt(navigator.appVersion) > 3)
    {
        var clickType=1;
        if (navigator.appName == "Netscape")
        {
            clickType = e.which;
        }
        else 
        {
            clickType = event.button;
        }

        if (clickType != 1)
        {
            alert('© 2005 - 2009 Nochevieja Madrid.com');
            return false;
        }
    }
    return true;
}

if (parseInt(navigator.appVersion) > 3)
{
    document.onmousedown = mouseDown;
    if (navigator.appName == "Netscape") {
        document.captureEvents(Event.MOUSEDOWN);
    }
}

function disableSelection(target)
{
    if (typeof target.onselectstart != "undefined") //IE route
        target.onselectstart = function() { return false }
    else if (typeof target.style.MozUserSelect != "undefined") //Firefox route
        target.style.MozUserSelect = "none";
    else //All other route (ie: Opera)
        target.onmousedown = function() { return false }
    target.style.cursor = "default";
} 
*/
//]]>


