// File: adblock.js
// Distributed by: AdBlock.org

var chip = document.cookie;
var deny = 0;  //set this to 1 to deny access with no access.  
  // A denied user will go to page sorry.html.
  // if you enable this feature you must create a page called /sorry.html

  function getCookie(name) { 
    var index = chip.indexOf(name + "=");
    if (index == -1) return null;
    index = chip.indexOf("=", index) + 1; // first character
    var endstr = chip.indexOf(";", index);
    if (endstr == -1) endstr = chip.length; // last character
    return unescape(chip.substring(index, endstr));
  }

function hidediv() {
if (document.getElementById) { 
document.getElementById('warning').style.visibility = 'hidden';
document.cookie = "disneywarned=true; PATH=/";
} 
}

function clear_cookie(){
document.cookie =  "disneywarned=; PATH=/";
}

if (document.getElementById) {
if (!getCookie("disneywarned")) {
document.write("</a><br/><div id=\"warning\" style=\"visibility:hidden; position:absolute; background: #FFFFFF; width:99%; height:2000px; body:#FF0000; p:#FF0000; left: 0%; top:50px; padding: 10px 10px 10px 10px; border: 1px solid black; \">");
document.write("<p>Important: <b>It appears that you are using AdBlocking software.</b></p>");

document.write("<p><b>PLEASE CONSIDER DONATING ~ BANDWIDTH IS COSTING US MONEY.</b></p>");

document.write("<p>This site is supported by advertising revenue.  If you are reading this site without the accompanying advertisments, you are harming the owner who provides this information at significant expense.  You may, without your knowledge, have software on your computer that deletes ads.");
document.write("  Or, if you have installed AdBlocking software, you should know that it may block much more than banner ads, rendering some sites unusable.</p>");
document.write("<p><div align=center><a href=\"javascript:hidediv()\">Click here to close this notice</a>.<br>");

document.write("<p><b>PLEASE CONSIDER DONATING ~ BANDWIDTH IS COSTING US MONEY.</b></p>");


document.write("<p><object width=\"234\" height=\"60\"><param name=\"movie\" value=\"http://widget.chipin.com/widget/id/7888548599a75029\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><param name=\"wmode\" value=\"transparent\"></param><param name=\"event_title\" value=\"Donate%20to%20support%20us\"></param><param name=\"event_desc\" value=\"spiderpaws%20needs%20money%20to%20remain%20online.\"></param><param name=\"color_scheme\" value=\"red\"></param><embed src=\"http://widget.chipin.com/widget/id/7888548599a75029\" flashVars=\"event_title=Donate%20to%20support%20us&event_desc=spiderpaws%20needs%20money%20to%20remain%20online.&color_scheme=red\" type=\"application/x-shockwave-flash\" allowScriptAccess=\"always\" wmode=\"transparent\" width=\"234\" height=\"60\"></embed></object></p>");


document.write("You will not receive it again during this session (cookies required.)</p></div></div>");

}
}

if (document.images) {
  var currImg;
  var ImgFound = 0;
  var LinkFound = 0;
  //alert("checking images..");
  for (var d=0; d < document.images.length; ++d) {
    currImg = document.images[d];
    if (currImg.src.indexOf("banner") > -1) {
     ImgFound = 1;
    }
  }

  if (!ImgFound || AdBlockTest) {
     if(deny) {	 
       location = "/banner/sorry.html";
       window.location(location);		
     } else {
	document.getElementById('warning').style.visibility = 'visible';
     }
  }

}
