function setCookie(name, value, days)
 { 
  var expdate = new Date(); 
  expdate.setTime(expdate.getTime() + days*24*60*60*1000); 

  document.cookie = name+"="+escape(value)+"; expires="+expdate.toGMTString(); 
 };

function getCookie(name)
 {
  var prefix = name+"=";
  var begin = document.cookie.indexOf("; "+prefix);

  if (begin==-1)
   {
    begin = document.cookie.indexOf(prefix);
    if (begin!=0) return null;
   }
  else
   {
    begin += 2;
   }

  var end = document.cookie.indexOf(";",begin);

  if (end == -1)
   {
    end = document.cookie.length;
   }

  return unescape(document.cookie.substring(begin + prefix.length, end));
 }

function changetitle()
{
 if (sw>0)
   {
    document.title=stitle
    nextact=3800
   }
 else
   {
    document.title="Gesto Communications"
    nextact=2000
   };

 sw*=(-1);
 window.setTimeout('changetitle();', nextact);
};

function startpf2005()
{
 GCPF2005=getCookie("GestoCommPF2005");
 if (GCPF2005=="yes")
  {
  }
 else
  {
   setCookie ("GestoCommPF2005", "yes", 90);

   chriwin=window.open("/data/pf2005.htm","winPF2005",
   "left="+(screen.width/2-290)+",top="+(screen.height/2-129)+",width=580,height=258,"+
   "menubar=no,directories=no,toolbar=no,location=no,status=no,scrollbars=no,resizable=no");
  };
};

function starttitle()
{
 sw=1;
 changetitle();
};
