﻿//Añadir a Favoritos
function AñadeFavoritos() {
    var direccion = "http://www.naturalardai.es";
    var titulo = "Doma Natural Ardai";
    var ns = "Para añadir esta web a tu libreta de Bookmarks," + "\n" + "pulsa: [ Ctrl ] + [ D ]";
    var op = "Para añadir esta web a tus Marcadores de Opera," + "\n" + "pulsa: [ Ctrl ] + [ D ]";
    //Para Opera
    if (navigator.userAgent.indexOf("Opera") != -1) alert(op);
    //Para Firefox
    else {
        if (navigator.appName == "Netscape") alert(ns)
        //Explorer
        else {
            var url = "http://www.naturalardai.es"
            var titulo = "Doma Natural Ardai"
            if (document.all)
                window.external.AddFavorite(url, titulo)
        }
    }
}


//Añade página Inicio
function PaginaInicio(enlace) {
    var navegador = navigator.appName
    if (navegador == "Microsoft Internet Explorer") {
        enlace.style.behavior = 'url(#default#homepage)';
        enlace.setHomePage('http://www.naturalardai.es');
    }
    //No es Explorer
    else {
        alert("Esta función Sólo está disponible para el navegador Internet Explorer")
    }

}

//Al Pasar Ratón por menú horizontal Cambia de color
function SeleccionMenu(Columna, IdEnlace) {
    Columna.style.background = "#99CC33";
    document.getElementById(IdEnlace).style.background = "#99CC33";
    document.getElementById(IdEnlace).style.color = "black";
}

//Al salir el ratón vuelve a color original
function DesSeleccionMenu(Columna, IdEnlace) {
    Columna.style.background = "#003300";
    document.getElementById(IdEnlace).style.background = "#003300";
    document.getElementById(IdEnlace).style.color = "white";
}



function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
    var rv = -1; // Return value assumes failure.
    if (navigator.appName == 'Microsoft Internet Explorer') {
        var ua = navigator.userAgent;
        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
        if (re.exec(ua) != null)
            rv = parseFloat(RegExp.$1);
    }
    return rv;
}

function Abrir_ventana (pagina) {
          window.open(pagina,"Recomienda Doma Natural Ardai","width=500px,height=500px,scrollbars=NO, resizable=NO");
      }

      
    function redim() {
          ancho = document.getElementById("contenidopopup").offsetWidth;
          alto = document.getElementById("contenidopopup").offsetHeight;
          resizeTo(ancho +10, alto + 73);
      }
      
   function CambioImagenOver(tipo) {
    if (tipo=='adopcion')
    {
        var img = document.getElementById('ImgAdopcion');
        var imgAdopta = document.getElementById('divAdopta');
        img.src = 'ImgEstilo/ADOPCIONES ARDAI_2.bmp';
        imgAdopta.src = 'ImgEstilo/Adopcion Animales.jpg';
     }
     if (tipo=='spa')
     {
         var img = document.getElementById('ImgSpa');
         var imgProtectora = document.getElementById('divProtectora');
         img.src = 'ImgEstilo/SPA ESPANA_2.bmp';
         imgProtectora.src='ImgEstilo/Protectora Animales.jpg';
     }
      if(tipo=='ayudantes')
     {
        var img = document.getElementById('ImgAyudantes');
        var imgAyudantes = document.getElementById('divAyudantes');
        img.src = 'ImgEstilo/AYUDANTES ARDAI_2.bmp';
        imgAyudantes.src='ImgEstilo/Nuevos Ayudantes Ardai.jpg';
     }
     //Para Galería de Fotos
     if (tipo=='Curso Badajoz Julio 2010')
     {
      var img=document.getElementById('ImgBadajozJulio2010');
      img.src='../ImgEstilo/Listado Galerias/Curso Badajoz Julio 2010_d.jpg';
     }
      if (tipo=='Curso Esgos Marzo 2010')
     {
      var img=document.getElementById('ImgEsgosMarzo2010');
      img.src='../ImgEstilo/Listado Galerias/Curso Esgos Marzo 2010_d.jpg';
     }
}

 function CambioImagenOut(tipo) {
    if (tipo=='adopcion')
    {
        var img = document.getElementById('ImgAdopcion');
        var imgAdopta = document.getElementById('divAdopta');
        img.src = 'ImgEstilo/ADOPCIONES ARDAI.bmp';
        imgAdopta.src='ImgEstilo/Adopcion Animales2.jpg';
     }
     if (tipo=='spa')
     {
        var img = document.getElementById('ImgSpa');
        var imgProtectora = document.getElementById('divProtectora');
        img.src = 'ImgEstilo/SPA ESPANA.bmp';
        imgProtectora.src='ImgEstilo/Protectora Animales2.jpg';
     }
     if(tipo=='ayudantes')
     {
        var img = document.getElementById('ImgAyudantes');
        var imgAyudantes = document.getElementById('divAyudantes');
        img.src = 'ImgEstilo/AYUDANTES ARDAI.bmp';
        imgAyudantes.src='ImgEstilo/Nuevos Ayudantes Ardai2.jpg';
     }
      //Para Galería de Fotos
     if (tipo=='Curso Badajoz Julio 2010')
     {
      var img=document.getElementById('ImgBadajozJulio2010');
      img.src='../ImgEstilo/Listado Galerias/Curso Badajoz Julio 2010_s.jpg';
     }
     if (tipo=='Curso Esgos Marzo 2010')
     {
      var img=document.getElementById('ImgEsgosMarzo2010');
      img.src='../ImgEstilo/Listado Galerias/Curso Esgos Marzo 2010_s.jpg';
     }
}

/*Deshabilito el botón derecho*/

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (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")



/*bloqueo la selección de texto*/


function disableselect(e){
return false
}
function reEnable(){
return true
}
nombreNav = navigator.appName


if ( (nombreNav != 'Netscape')) { 

    document.onselectstart=new Function ("return false")
    if (window.sidebar){
    document.onmousedown=disableselect
    document.onclick=reEnable
    }
}





