function ar_i (r, t, y) {
  try {
    if (y) {
      i = new Image();
      i.src = "archeck.php?"+r+"&rnd="+Math.random();
    }
    window.setTimeout("ar_i('"+r+"', "+t+", true)", t);
  } catch (e) {};
}
function ar_cc (r, b, tme) {
  var dc=document.cookie;
  j = "a"+b+"="
  i = dc.indexOf(j);
  if(i > -1) {
    lp = dc.substring(i+j.length, i+j.length+10);
    try {
      if (lp > tme) {
        parent.cboxmain.document.location = "index.php?"+r+"&sec=main"
        return true;
      }
    } catch (e) {}
  }
  window.setTimeout("ar_cc('"+r+"', "+b+", "+tme+")", 1000);
}
function ar_start (b, tme, r, t) {
  if (t < 1000) t = 5000;
  ar_i(r, t, false);
  ar_cc(r, b, tme);
}