<!--
function getCookie(NameOfCookie){
    if (document.cookie.length > 0) {              
    begin = document.cookie.indexOf(NameOfCookie+"=");       
    if (begin != -1) {           
      begin += NameOfCookie.length+1;       
      end = document.cookie.indexOf(";", begin);
      if (end == -1) end = document.cookie.length;
        return unescape(document.cookie.substring(begin, end));
    } 
  }
  return null;
}

function Transfer(){
	if (document.cookie == '') return false; 
	uname = getCookie('uname');
	if (uname != null) document.stage.SetVariable("uname", getCookie('uname'));
	email = getCookie('email');
	if (email != null) document.stage.SetVariable("email", getCookie('email'));
}

/*
*****************************************************************************************
name = name of the cookie
value = value of the cookie
[expires] = expiration date of the cookie (defaults to end of current session)
[path] = path for which the cookie is valid (defaults to path of calling document)
[domain] = domain for which the cookie is valid (defaults to domain of calling document)
* an argument defaults when it is assigned null as a placeholder
* a null placeholder is not required for trailing omitted arguments
*****************************************************************************************
*/
function setCookie(name, value, expires, path, domain) {
    var the_date = new Date("December 31, 2023");
    var set_date = the_date.toGMTString();
    var curCookie = name + "=" + escape(value) +
      ("; expires=" + set_date) +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "");
  document.cookie = curCookie;
}
// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist

function userAccess(u){
	setCookie("uname",u) ;
}
function emailAccess(e){
	setCookie("email",e) ;
}
//-->