// popup code voor www.amazoneadventures.nl
// copyright 2004 M. van Laatum | MIEZ.nl

//specify URL
var AC_PopUrl = "http://www.amazoneadventures.nl/info_pop.html";

//specify window features
var AC_WinFeatures = "width=300,height=300,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0";

//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause popunder to load every time page is loaded
var AC_once = 0;

function get_cookie(AC_Name) {
  var AC_search = AC_Name + "=";
  var AC_returnvalue = "";
  if (document.cookie.length > 0) {
    AC_offset = document.cookie.indexOf(AC_search);
    if (AC_offset != -1) { // if cookie exists
      AC_offset += AC_search.length;
      // set index of beginning of value
      AC_end = document.cookie.indexOf(";", AC_offset);
      // set index of end of cookie value
      if (AC_end == -1)
         AC_end = document.cookie.length;
      AC_returnvalue = unescape(document.cookie.substring(AC_offset, AC_end));
      }
   }
  return AC_returnvalue;
}

function loadornot(){
		 if (get_cookie('popunder2') == ''){
		 	loadpopunder();
			document.cookie = "popunder2=yes";
		 }
}

function loadpopunder(){
		 AC_win2 = window.open(AC_PopUrl,"ACWin",AC_WinFeatures);
		 AC_win2.focus();
		 // window.focus();
}

if (AC_once == 0)
    { loadpopunder(); }
else
	{ loadornot(); }
