var RegWindow;

function openreg($url) {
   if ((typeof(RegWindow) == "undefined") || RegWindow.closed) {
      $name = "BCFFC_Registration_Form";
      $x = (screen.width - 800) / 2;
      $y = (screen.height - 600) / 2;
      $options = "width=770,height=550,left=" + $x +  ",top=" + $y + ",screenX=" + $x + ",screenY=" + $y +
      ",resizable=no,scrollbars=yes,location=no,directories=no,status=yes,menubar=no,copyhistory=no";
      RegWindow = window.open($url, $name, $options);
   }
   RegWindow.focus();
}
function SetCookie(cookieName,cookieValue,seconds) {
   var today = new Date();
   var expire = new Date();
   expire.setTime(today.getTime() + seconds*10000); // 10 seconds
   document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString();
}
function ReadCookie(cookieName) {
   var theCookie=""+document.cookie;
   var ind=theCookie.indexOf(cookieName);
   if (ind==-1 || cookieName=="") return "";
   var ind1=theCookie.indexOf(';',ind);
   if (ind1==-1) ind1=theCookie.length;
   return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
