function setCookie(nombre, valor, fechaExp) { 
  document.cookie = nombre + "=" + escape(valor) + 
     ((fechaExp == null) ? "" : (";expires=" + fechaExp.toGMTString())) 
}

function getCookie(nombre) {
  var search = nombre + "="
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) {
      offset += search.length
      end = document.cookie.indexOf(";", offset)
      if ( end == -1)
        end = document.cookie.length
      return unescape(document.cookie.substring(offset, end))
    }
  }
}

function registrar(valor) {
  var hoy = new Date()
  expira = new Date()
  expira.setTime(hoy.getTime() + 1000*60*60*24*365)
  setCookie("datito", valor, expira)
}
function redireccionar() {
var url640x480 = "";
var url800x600 = "espanol/home_800.php";
var url1024x768 = "espanol/home_1024.php";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url640x480;
}




