function CookieDef(expires,path,domain,secure)
{
  this.secure = secure;
  this.path = path;
  this.domain = domain;
  this.getValue = getCookie;
  this.setValue = setCookie;
  this.expire = deleteCookie;
  if (expires == 0) {
    this.expires = "";
  } else {
    var today_date = new Date();
	 var expire_seconds = today_date.getTime() + (expires * 24 * 60 * 60  * 1000);
    today_date.setTime(expire_seconds);
    this.expires = today_date.toGMTString();
  }
}
function getCV(offset) {
  var endstr = document.cookie.indexOf(";", offset);
  if (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 getCV(j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return "";
}
function setCookie(name,value)
{
  document.cookie = name + "=" + escape(value) +
    ((this.expires == "") ? "" : ("; expires=" + this.expires)) +
    ((this.path == "") ? "" : ("; path=" + this.path)) +
    ((this.domain == "") ? "" : ("; domain=" + this.domain)) +
    ((this.secure == true) ? "; secure" : "");
}
function deleteCookie(name) {
  document.cookie = name + "=" + "" + "; expires=Thu,01-Jan-70 00:00:01 GMT";
}

function WA_cookieRedirect(CookieObj,Location,Alike,CookieName,CookieValue,RedirectTo)     {
  if ((CookieObj.getValue(CookieName)==CookieValue)==Alike)     {
    window.open(RedirectTo,'WebAssistTerms','status=no,directories=no,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,width=100,height=100,top=1,screenY=1,left=1,screenX=1')

  }
}
//function below for email
{
emaillink=("<img src='http://www.vtc.com/?affiliate=33'width='1' height='1' border=0 >")
emailuk=('sales@' + 'apex-web.co.uk')
emailus=('sales@' + 'apex-web.us')
nameuk=('sales@apex-web.co.uk')
nameus=('sales@apex-web.us')
}