// ADSET_EXPORTABLE
// exitpop_adset calls
<!-- begin ajax ep-->
function GetParmEP(name) {
   SCH = document.location.search;
   SCH = "?&" + SCH.substring(1,SCH.length);
   // alert('SCH = ' + SCH);
   var start = SCH.indexOf("&" + name+"=");
   var len = start+name.length+2;
   if ((!start) && (name != SCH.substring(0,name.length))) return("");
   if (start == -1) return "";
   var end = SCH.indexOf("&",len);
   if (end == -1) end = SCH.length;
   // alert('finished getting parm ' + name);
   return unescape(SCH.substring(len,end));
}
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 delay = (argc > 4) ? argv[4] : null;
        var secure = (argc > 5) ? argv[5] : false;
        document.cookie = name + "=" + escape (value) +
        ((expires == null) ? "" : ("; expires=" + expires)) +
        ((path == null) ? "" : ("; path=" + path)) +
        ((delay == null) ? "" : ("; delay=" + delay)) +
        ((secure == true) ? "; secure" : "");
}
function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if the cookie exists
      offset += search.length
      end = document.cookie.indexOf(";", offset); // set the index of beginning value
      if (end == -1) // set the index of the end of cookie value
        end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
    }
  }
  return returnvalue;
}
function isDefined(ckVar) {
  var DEFINED_V=true;
  function handleError() {
  DEFINED_V=false;
  return true;
  }
  var oldOnError=window.onerror;
  window.onerror=handleError;
  try { 
  	eval(ckVar);
  }catch (e) 
  { DEFINED_V=false;
  }
  window.onerror=oldOnError;
  return DEFINED_V;
}
function varIsDefined(variable) {
  return (typeof(window[variable]) == "undefined") ?  false: true;
}
var temp;


if(!varIsDefined('current_aff')) {  var current_aff = ""; }
if(!varIsDefined('exitPop')) {  var exitPop; }
exitPop = true;


/* get the np var, maintain as cookie */
if(!varIsDefined('np')) { var np='N'; }
temp = GetParmEP('np');
if(temp == 'Y') {
  np = 'Y';
  SetCookie("np",np);
} else {
  temp = get_cookie('np');
  if(temp == 'Y') {
    np = 'Y';
  }
}

  

temp = GetParmEP('b');
if(temp != "") {
  // noop
} else {
  temp = GetParmEP('af');
}
if(temp != "") {
  // noop
} else {
  temp = GetParmEP('affiliate');
}

if(temp != "") {
  current_aff = temp;
}
if( (current_aff == null) || (current_aff == "") ){
  current_aff = get_cookie('affiliate');
}


/*
// alert(document.location.pathname);
var dir = document.location.pathname;
dir = dir.substring(1,dir.length);
var i=1;
var lastIndex = -1;
var loopcount = 0;
var i = dir.lastIndexOf("/");
dir = dir.substring(0,i);

var host = document.location.hostname;
*/

<!-- jquery ajax ext-->
document.write('<scr' + 'ipt language="JavaScript" type="text/javascript" src="http://secure.w3track.com/newtrk/SHOW_JS_CP.php"></scr' + 'ipt>');
document.write('<scr' + 'ipt language="JavaScript" type="text/javascript" src="/eScripts/jquery/jquery.js"></scr' + 'ipt>');
document.write('<scr' + 'ipt language="JavaScript" type="text/javascript" src="/eScripts/launch_exitpop_adset_v2.js"></scr' + 'ipt>');
