//***************************************************************************************************************************
function FObtenerNavegador ()
//***************************************************************************************************************************
{
    this.useragent = navigator.userAgent;
    this.appname = navigator.appName;
    this.appversion = navigator.appVersion;

    var loc_usragt = navigator.userAgent.toLowerCase();

//***************************************************************************************************************************
// Info del navegador
//***************************************************************************************************************************

    this.major_version = parseInt(navigator.appVersion);
    this.minor_version = parseFloat(navigator.appVersion);

    this.ns  = ((loc_usragt.indexOf("mozilla")!= -1) &&
                (loc_usragt.indexOf("compatible") == -1) &&
                (loc_usragt.indexOf("opera") == -1) &&                
                (loc_usragt.indexOf("safari") == -1));

    this.ns2 = (this.ns &&
               (this.major_version == 2));
    this.ns3 = (this.ns &&
               (this.major_version == 3));
    this.ns4 = (this.ns &&
               (this.major_version == 4));
    this.ns6 = (this.ns &&
                this.major_version == 5 &&
                loc_usragt.indexOf("netscape 7") == -1 &&
                loc_usragt.indexOf("netscape/7") == -1);
    this.ns7 = (this.ns &&
                this.major_version == 5 &&
               (loc_usragt.indexOf("netscape 7") != -1 ||
                loc_usragt.indexOf("netscape/7") != -1));
    this.ns4up = (this.ns &&
                 (this.major_version >= 4));
    this.ns6up = (this.ns &&
                 (this.major_version >= 5));
    this.ns7up = (this.ns &&
                  this.major_version == 5 &&
                 (loc_usragt.indexOf("netscape 7") != -1 ||
                  loc_usragt.indexOf("netscape/7") != -1));
    this.nsonly =  (this.ns &&
                  ((loc_usragt.indexOf(";nav") != -1) ||
                   (loc_usragt.indexOf("; nav") != -1)));
    this.gecko = (loc_usragt.indexOf("gecko") != -1 &&
                  loc_usragt.indexOf("safari") != -1);

// Internet Explorer
    this.ie      = ((loc_usragt.indexOf("msie") != -1) &&
                    (loc_usragt.indexOf("opera") == -1));

    this.ie3     = (this.ie &&
                   (this.major_version < 4));

    this.ie4     = (this.ie &&
                   (this.major_version == 4) &&
                   (loc_usragt.indexOf("msie 4")!=-1));

    this.ie5     = (this.ie &&
                   (this.major_version == 4) &&
                   (loc_usragt.indexOf("msie 5.0")!=-1));

    this.ie5_5   = (this.ie &&
                   (this.major_version == 4) &&
                   (loc_usragt.indexOf("msie 5.5") !=-1));

    this.ie6     = (this.ie &&
                   (this.major_version == 4) &&
                   (loc_usragt.indexOf("msie 6.")!=-1) );

    this.ie4up   = (this.ie  &&
                   (this.major_version >= 4));

    this.ie5up   = (this.ie  &&
                   !this.ie3 &&
                   !this.ie4);

    this.ie5_5up = (this.ie &&
                   !this.ie3 &&
                   !this.ie4 &&
                   !this.ie5);

    this.ie6up   = (this.ie  &&
                   !this.ie3 &&
                   !this.ie4 &&
                   !this.ie5 &&
                   !this.ie5_5);

// Opera
    this.opera =  (loc_usragt.indexOf("opera") != -1);
    this.opera2 = (loc_usragt.indexOf("opera 2") != -1 ||
                   loc_usragt.indexOf("opera/2") != -1);
    this.opera3 = (loc_usragt.indexOf("opera 3") != -1 ||
                   loc_usragt.indexOf("opera/3") != -1);
    this.opera4 = (loc_usragt.indexOf("opera 4") != -1 ||
                   loc_usragt.indexOf("opera/4") != -1);
    this.opera5 = (loc_usragt.indexOf("opera 5") != -1 ||
                   loc_usragt.indexOf("opera/5") != -1);
    this.opera6 = (loc_usragt.indexOf("opera 6") != -1 ||
                   loc_usragt.indexOf("opera/6") != -1);
    this.opera7 = (loc_usragt.indexOf("opera 7") != -1 ||
                   loc_usragt.indexOf("opera/7") != -1);
    this.opera5up = (this.opera &&
                    !this.opera2 &&
                    !this.opera3 &&
                    !this.opera4);
    this.opera6up = (this.opera &&
                    !this.opera2 &&
                    !this.opera3 &&
                    !this.opera4 &&
                    !this.opera5);
    this.opera7up = (this.opera &&
                    !this.opera2 &&
                    !this.opera3 &&
                    !this.opera4 &&
                    !this.opera5 &&
                    !this.opera6);
// Safari

    this.safari = (loc_usragt.indexOf("safari") != - 1);
}

//***************************************************************************************************************************
function blockBotonDerecho(prm_event)
//***************************************************************************************************************************

{
var mensaje = "Los contenidos de este site www.Allianz.es, est\u00e1n protegidos por derechos de autor.\nNo est\u00e1 permitido su uso sin consentimiento de \nALLIANZ Compa\u00f1\u00eda de Seguros y Reaseguros S.A.";
// IE4
    if (ObtenerNavegador.ie4)
    {	
		event.srcElement.unselectable = "on";
		event.srcElement.style.cursor = "none";
        if (event.button == 2 || event.button == 3)
        {
            if (event.srcElement.tagName == "IMG")
            {
                if (mensaje != "")
                {
                    alert(mensaje);
                }
                return false;
			}
       }
    }

// IE >5
    else if (ObtenerNavegador.ie5up)
    {
			event.srcElement.unselectable = "on";
			event.srcElement.style.cursor = "none";
            if (mensaje != "")
            {
                alert(mensaje);
            }
            return false;
    }

// Netscape 4 
    else if (ObtenerNavegador.ns4)
    {	
        if (prm_event.which == 3)
        {
            if (mensaje != "")
            {
                alert(mensaje);
            }
            return false;
        }

    }

// Netscape 6
    else if (ObtenerNavegador.ns6up)
    {	
            if (mensaje != "")
            {
                alert(mensaje);
            }
            return false;

    }
	
	 return mensaje;
}
//***************************************************************************************************************************
function AsociarImagenes()
//***************************************************************************************************************************
// Asocia mousedown event a imagenes en netscape4

{
    for(loc_counter = 0; loc_counter < document.images.length; loc_counter++)
    {
       document.images[loc_counter].onmousedown = blockBotonDerecho;
    }
}

//***************************************************************************************************************************
function Set()
//***************************************************************************************************************************
{
    if (ObtenerNavegador.ie4)
    {
        document.onmousedown = blockBotonDerecho;
    }

    else if (ObtenerNavegador.ie5up)
    {
        document.oncontextmenu = blockBotonDerecho;
    }

    else if (ObtenerNavegador.ns6up)
    {
        document.oncontextmenu = blockBotonDerecho;
    }

    else if (ObtenerNavegador.opera6up)
    {
		alert("Los contenidos de este site www.Allianz.es, est\u00e1n protegidos por derechos de autor.\nNo est\u00e1 permitido su uso sin consentimiento de \nALLIANZ Compa\u00f1\u00eda de Seguros y Reaseguros S.A.");
        document.onmouseup = blockBotonDerecho;
    }
	
	else if (ObtenerNavegador.ns4)
    {
        AsociarImagenes();
    }

}

//***************************************************************************************************************************
    var ObtenerNavegador = new FObtenerNavegador ();
//***************************************************************************************************************************