var Cookie = {
  set: function(name, value, daysToExpire) {
    var expire = '';
    if (daysToExpire != undefined) {
      var d = new Date();
      d.setTime(d.getTime() + (86400000 * parseFloat(daysToExpire)));
      expire = '; expires=' + d.toGMTString();
    }
    return(document.cookie = escape(name) + '=' + escape(value || '') + expire);
  },
  get: function(name) {
    var cookie = document.cookie.match(new RegExp('(^|;)\\s*' + escape(name) + '=([^;\\s]*)'));
    return(cookie ? unescape(cookie[2]) : null);
  },
  erase: function(name) {
    var cookie = Cookie.get(name) || true;
    Cookie.set(name, '', -1);
    return cookie;
  },
  accept: function() {
    if (typeof navigator.cookieEnabled == 'boolean') {
      return navigator.cookieEnabled;
    }
    Cookie.set('_test', '1');
    return(Cookie.erase('_test') === '1');
  }
};
try{
	if(top != self) {
		if(Cookie.get("codigo_recomendacion") == null) {
			if(window.location.href != "http://www.lan.com/es_cl/sitio_personas/about_us/sostenibilidad_lan/index.html" && window.location.href != "http://www.lan.com/en_us/sitio_personas/minisitios/sustainability_in_lan/index.html" && window.location.href != "http://www.lan.com/en_us/sitio_personas/about_us/trabajar_en_lan/index.html") {	
				window.location="http://www.lan.com/error_document/advertencia.html";
				}
			}
		}
	}
catch(err) {
	console.log(err);
	}



