//Pop-under window- By Website Abstraction
//Credit notice must stay intact for use
//Visit http://wsabstract.com for this script

var popunder
b = new Array(); var a,c;a=0;c=(-1);
function bf(url) { this.url=url; }
b[a++] = new bf("http://www.job-analysis.net/cgi-bin/sl.cgi?SearchFor=web+survey");
b[a++] = new bf("http://www.job-analysis.net/cgi-bin/sl.cgi?SearchFor=employee+survey");
b[a++] = new bf("http://www.job-analysis.net/cgi-bin/sl.cgi?SearchFor=employee+survey");
b[a++] = new bf("http://www.hr-survey.com");
var i = Math.round((b.length * Math.random())-.5);
//specify page to pop-under
popunder=b[i].url

//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause popunder to load every time page is loaded
var once_per_session=1

///No editing beyond here required/////

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function loadornot(){
if (get_cookie('popunder')==''){
// loadpopunder()
document.cookie="popunder=yes"
}
}

var win2;
var StilLoop;
var xa;
function loadpopunder(){
win2=window.open(popunder,"","toolbar=0,location=0,menubar=0,scrollbars=1,resizable=1,width="+(screen.width*.75)+",height="+(screen.height*.75))
win2.onload=ProcessWindow
//StilLoop=1;
//while(StilLoop==1) { xa++; }
}

function ProcessWindow() {
win2.moveTo(1,1)
win2.blur()
window.focus()
StilLoop=0;
}

if (once_per_session==0)
loadpopunder()
else
loadornot()
