// JavaScript Document

var pcj_resCookie = "SiteWidth456713";

function pcj_getCookieDomain()
{var hname = window.location.hostname; var dname = ''; var tldstart = hname.lastIndexOf('.');
  if (tldstart < 0){dname = '.' + hname;}
  else{
    if (hname.lastIndexOf('.', tldstart - 1) > -1){dname = hname.substr(hname.lastIndexOf('.', tldstart - 1));}else{dname = '.' + hname;}
  }
  return dname;
}

function pcj_setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + value +
  ((expires) ? "; expires=" + expires.toGMTString() : "") +
  ((path) ? "; path=" + path : "") +
  ((domain) ? "; domain=" + domain : "") +
  ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}
      
function pcj_getCookie(c){
	var d = document.cookie;
  if (d.length == 0){return "";}
	var p = c + "=";
	var b = d.indexOf("; " + p);
	if (b == -1){
		b = d.indexOf(p); 
		if (b != 0){return "";}
	} 
	else {b += 2;}	
	var e = d.indexOf(";", b);
	if (e == -1){e = d.length;}
	return unescape(d.substring(b + p.length, e));
}

function pcj_checkFor800() {
  var cookieVal=pcj_getCookie(pcj_resCookie);
  var hasCookie=(cookieVal.length!=0);
  var currentDT = new Date();
  var expireDT = new Date(Date.parse(currentDT.getDay() + "https://www.securepaynet.net/" + currentDT.getMonth() + "https://www.securepaynet.net/" + (currentDT.getFullYear() + 1)));
  if (cookieVal == 800){
    pcj_setCookie(pcj_resCookie, "1000", expireDT, "https://www.securepaynet.net/", pcj_getCookieDomain());
    
    hasCookie = (pcj_getCookie(pcj_resCookie).length!=0);
    if (hasCookie){window.location = window.location;}
    
  } else if (!hasCookie) {pcj_setCookie(pcj_resCookie, "1000", expireDT, "https://www.securepaynet.net/", pcj_getCookieDomain());}
}

pcj_checkFor800();

var pcj_name="Febno Technologies";
var pcj_pl_id="456713";
var pcj_url_fos="http://www.securepaynet.net/";
var pcj_args = "?ci=";
var pcj_prog_id = "febnosecure";
var pcj_inApp = "salesweb";
var pcj_url_help="http://help.securepaynet.net/";
var pcj_url_img="https://img5.wsimg.com/";
var pcj_url_mya="https://mya.securepaynet.net/";
var pcj_login_root_url="https://idp.securepaynet.net/login.aspx?ci=9106&prog_id=febnosecure&spkey=SPSWNET-M1PWCORPWEB113"
var pcj_ssoTargetKey = "target";
var pcj_isCart = false;
var pcj_cname = "ShopperId456713";
var pcj_cdomain = ".securepaynet.net";
var pcj_callov = false; var pcj_call = true;
var pcj_isMgr = false;
var pcj_idpredirect = "";
var pct_loginnameDone = false;
var pct_loginnameField;
