function SetCookie(sName, sValue,ch)
{
  
  var date;
  var s;
  var i;
  date = new Date();
  date.setTime(date.getTime()+1*24*60*60*1000);
  
  s=GetCookie(sName);
  if (s && (""+s)!="undefined")
  {
  
     i=s.indexOf(","+sValue+",")
     
     if (i<0 && ch)
        s=s+sValue+",";
     else
     {
        if (!ch && i>=0)
        {
           s=s.replace(","+sValue,"");
           
           if (s==",")
              s="";
        }
     }   
     
  }
  else
     if (ch) s=","+sValue+",";
  
  if (s)
     document.cookie = sName + "=" + escape(s) + "; expires=" + date.toGMTString()+"; path=/";
  else
     document.cookie = sName + "=" + escape(s) + "; expires=Fri, 31 Dec 1999 23:59:59 GMT; path=/";
 
}

function GetCookie(sName)
{
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0]) 
      return unescape(aCrumb[1]);
  }
  
  return null;
}

function Sel(ch)
{ for (j=0;j<document.forms.length;j++)
  {
   for (i=0;i<document.forms[j].length;i++)
      document.forms[j][i].checked=ch;
   }
      
}