
function GetCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (("" + endstr) == "" || endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return GetCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}

function SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {
  var exp = new Date();
  exp.setTime (exp.getTime() - 1);  // This cookie is history
  var cval = GetCookie (name);
  if (cval != null)
    document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var ullogin_id;
var ulcst_uid;
var ulcst_pwd;
var ulcst_fname;
var ulcst_lname;
var ulcst_email;
var ulcst_country;
var ulcst_company;
var ulcst_zipcode;
var ulcst_state;
var ulcst_city;
var ulcst_address1;
var ulcst_phone;
var ulcst_fax;
var ulcst_job;
var ulcst_birthday;
var ulcst_sex;
var ulcst_companysize;
var ulcst_companyurl;

ullogin_id=GetCookie("ullogin_id");
ulcst_uid=GetCookie("ulcst_uid");
ulcst_pwd=GetCookie("ulcst_pwd");
ulcst_fname=GetCookie("ulcst_fname");
ulcst_lname=GetCookie("ulcst_lname");
ulcst_email=GetCookie("ulcst_email");
ulcst_country=GetCookie("ulcst_country");
ulcst_company=GetCookie("ulcst_company");
ulcst_title=GetCookie("ulcst_title");
ulcst_zipcode=GetCookie("ulcst_zipcode");
ulcst_state=GetCookie("ulcst_state");
ulcst_city=GetCookie("ulcst_city");
ulcst_address1=GetCookie("ulcst_address1");
ulcst_phone=GetCookie("ulcst_phone");
ulcst_fax=GetCookie("ulcst_fax");
ulcst_job=GetCookie("ulcst_job");
ulcst_birthday=GetCookie("ulcst_birthday");
ulcst_sex=GetCookie("ulcst_sex");
ulcst_companysize=GetCookie("ulcst_scompanysize");
ulcst_companyurl=GetCookie("ulcst_companyurl");
/*
<!---
//var expdate = new Date ();
//expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000)); // 24 hrs from now
//SetCookie ("ccpath", "http://www.ulead.com", expdate);
//SetCookie ("tempvar", "This is a temporary cookie.");
//SetCookie ("personid", "This cookie requires secure communications",expdate,"/",null,true);
//document.write (document.cookie + "<br>");
//DeleteCookie ("ccpath");
--->
*/