
      //---------------------------------------------------------------------//
      // This file is automatically generated.  Any changes here will be     //
      // overwriten by WP-Greet-Box configuration options.                   //
      //---------------------------------------------------------------------//

      var wpgb_cookie_exp = 365;
      var wpgb_greetings = new Array();
    
        var wpgb_default_timeout = 0;
        var wpgb_default_greeting = '<div id="greet_block"><div class="greet_block"><div class="greet_text"><div class="greet_image"><img src="http://www.parroquiasanmiguelarcangel.es/web/images/icono_sanmi.png"/></div>Si por casualidad has llegado hasta aquí, pasa, ¡sé siempre bienvenido!<br />Somos un grupo de adultos, jóvenes, mayores y niños del barrio de San Isidro de Madrid, enamorados de Cristo, con grandes deseos de compartir gratis todo aquello que gratis se nos ha regalado.<br />¿Te gustaría compartir esta aventura con nosotros, la experiencia de sentirte amado y acogido incondicionalmente? ¿Te apasiona el trato con niños y adolescentes, el teatro, la música, la naturaleza y acompañar y luchar en favor de los más necesitados? ¡Este puede ser tu lugar!<br />En la parroquia de San Miguel encontrarás personas entusiastas por la vida y el Evangelio, soñadores de un mundo nuevo.<br />¿Te has sentido solo alguna vez? La Iglesia, que es madre y hogar, te abre sus puertas. Siempre existen motivos para sonreír.  Caminar al lado de otros es una alegría y privilegio que compartimos en la parroquia. Quizás necesites hablar o confesarte con un sacerdote, conocer gente nueva, o simplemente experimentar la alegría de vivir.<br />¡No lo dudes! Te esperamos en la parroquia de San Miguel Arcángel.<br />¡Cristo tiene sed de ti!</div><div class="greet_block_close"><a onclick="wpgb_close()">X</a></div></div><div style="clear:both"></div></div>';
      
      function wpgb_get_cookie(c_name) {
        if (document.cookie.length>0) {
          c_start=document.cookie.indexOf(c_name + "=");
          if (c_start!=-1) {
            c_start=c_start + c_name.length+1;
            c_end=document.cookie.indexOf(";",c_start);
            if (c_end==-1) c_end=document.cookie.length;
            return unescape(document.cookie.substring(c_start,c_end));
          }
        }
        return "";
      }
      
      function wpgb_set_cookie(c_name,value,expiredays) {
        var exdate = new Date();
        exdate.setDate(exdate.getDate()+expiredays);
        document.cookie=c_name+ "=" +escape(value)+";path="+"/"+
        ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
      }
      
      function wpgb_delete_cookie ( c_name )
      {
        var now = new Date ();
        now.setTime ( now.getTime() - 1 );
        document.cookie = c_name += "=; expires=" + now.toGMTString();
      }
      
      function wpgb_close() {
        var wpgb_el = document.getElementById("greet_block");
        if(wpgb_el)
          wpgb_el.style.display = "none";
      }

      function wpgb_get_delta(ref) {
        var visit_delta;
        var visit_last = wpgb_get_cookie("wpgb_visit_last-"+ref);

        if(visit_last==null || visit_last=="") {
          visit_delta = -1;
        }
        else {
          visit_last = new Date(visit_last);
          visit_delta = Math.round((new Date() - visit_last)/(1000 * 60));
        }
        return visit_delta;
      }
      
      function wpgb_display() {
        for(var i in wpgb_greetings){
          if(document.referrer.indexOf(i) > -1) {
            var visit_delta = wpgb_get_delta(i);

            wpgb_set_cookie("wpgb_visit_last-"+i,new Date(),wpgb_cookie_exp);
            if(visit_delta < 0 || visit_delta >= wpgb_greetings[i]["timeout"]) {
              document.write(wpgb_greetings[i]["message"]);
              return;
            }
          }
        }

        var visit_delta = wpgb_get_delta("default");

        wpgb_set_cookie("wpgb_visit_last-default",new Date(),wpgb_cookie_exp);
        if(wpgb_default_greeting != null && wpgb_default_greeting != ""
          &&(visit_delta < 0 || visit_delta >= wpgb_default_timeout)
        ) {
          document.write(wpgb_default_greeting);
        }
      }
      
      wpgb_display();
    
