
      //---------------------------------------------------------------------//
      // 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/shema/images/incono_shema.jpg"/></div>¡¡BIENVENIDOS A LA ESCUELA SHEMA!!<br />Somos un grupo de cristianos con ganas de cambiar el mundo! Creamos la Escuela con la idea de contagiar ese sentimiento a otros jóvenes con inquietud cristiana. Anímate y participa de nuestro proyecto apuntándote a alguna de las actividades que ofrecemos.<br />Un abrazo en Cristo.</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();
    
