var iWebkit;if(!iWebkit){iWebkit=window.onload=function(){iWebkit.checkboxHeight="25";iWebkit.radioHeight="25";iWebkit.autolistNumVisible=10;function b(){var d=document.getElementsByTagName("a");for(var e=0;e<d.length;e++){if(d[e].className.match("noeffect")){}else{d[e].onclick=function(){window.location=this.getAttribute("href");return false}}}}function c(){window.scrollTo(0,0.9)}iWebkit.popup=function(){window.scrollTo(0,9999);var e=document.getElementById(arguments[0]);var f=e.getElementsByClassName("confirm_screen")[0];f.className="confirm_screenopen";var d=document.getElementById("cover");d.className="cover";d.style.height=document.height+"px"};iWebkit.closepopup=function(){var e=arguments[0].toElement;var f=false;do{e=e.parentNode;if(e.tagName.toLowerCase()=="div"&&e.className.toLowerCase()=="popup"){f=true;break}}while(e.parentNode);if(f===false){return false}var g=e.getElementsByClassName("confirm_screenopen")[0];g.className="confirm_screenclose";var d=document.getElementById("cover");d.className="nocover";d.style.height=0};function a(){var g=document.getElementsByTagName("ul");for(var f=0;f<g.length;f++){var h=g[f];if(h.getAttribute("class").search(/(autolist)/)===-1){continue}var d=h.getElementsByTagName("li");if(d.length<=iWebkit.autolistNumVisible){continue}h.numitems=d.length;h.visibleitems=0;var e=h.getElementsByClassName("autolisttext")[0];e.onclick=function(i){var j=this.parentNode;j.showItems(j.visibleitems+iWebkit.autolistNumVisible);return false};h.showItems=function(l){var j=this.getElementsByTagName("li");var m=0;for(var k=0;k<j.length;k++){j[k].className=j[k].className.replace(/hidden/g,"");if(k>=l){j[k].className=j[k].className+" hidden"}else{m+=1}}this.visibleitems=m;e.className=e.className.replace(/hidden/g,"");if(m>=(j.length-1)){e.className=e.className+" hidden"}};h.showItems(iWebkit.autolistNumVisible)}}iWebkit.init=function(){b();c();a();var h=document.getElementsByTagName("input"),j=[],g,i,k;for(var f=0;f<h.length;f++){if(h[f].type==="checkbox"||h[f].type==="radio"){j[f]=document.createElement("span");j[f].className=h[f].type;if(h[f].checked){if(h[f].type==="checkbox"){var e="0 -"+(iWebkit.checkboxHeight*2)+"px";j[f].style.backgroundPosition=e}else{e="0 -"+(iWebkit.radioHeight*2)+"px";j[f].style.backgroundPosition=e}}h[f].parentNode.insertBefore(j[f],h[f]);h[f].onchange=iWebkit.clear;j[f].onmouseup=iWebkit.check;document.onmouseup=iWebkit.clear}}h=document.getElementsByTagName("select");for(f=0;f<h.length;f++){if(h[f]){i=h[f].getElementsByTagName("option");k=i[0].childNodes[0].nodeValue;g=document.createTextNode(k);for(var d=0;d<i.length;d++){if(i[d].selected){g=document.createTextNode(i[d].childNodes[0].nodeValue)}}j[f]=document.createElement("span");j[f].className="select";j[f].id="select"+h[f].name;j[f].appendChild(g);h[f].parentNode.insertBefore(j[f],h[f]);h[f].onchange=iWebkit.choose}}};iWebkit.pushed=function(){var d=this.nextSibling;if(d.checked&&d.type==="checkbox"){this.style.backgroundPosition="0 -"+iWebkit.checkboxHeight*3+"px"}else{if(d.checked&&d.type==="radio"){this.style.backgroundPosition="0 -"+iWebkit.radioHeight*3+"px"}else{if(!d.checked&&d.type==="checkbox"){this.style.backgroundPosition="0 -"+iWebkit.checkboxHeight+"px"}else{this.style.backgroundPosition="0 -"+iWebkit.radioHeight+"px"}}}};iWebkit.check=function(){var f=this.nextSibling;if(f.checked&&f.type==="checkbox"){this.style.backgroundPosition="0 0";f.checked=false}else{if(f.type==="checkbox"){this.style.backgroundPosition="0 -"+iWebkit.checkboxHeight*2+"px"}else{this.style.backgroundPosition="0 -"+iWebkit.radioHeight*2+"px";var g=this.nextSibling.name;var e=document.getElementsByTagName("input");for(var d=0;d<e.length;d++){if(e[d].name===g&&e[d]!==this.nextSibling){e[d].previousSibling.style.backgroundPosition="0 0"}}}f.checked=true}};iWebkit.clear=function(){var e=document.getElementsByTagName("input");for(var d=0;d<e.length;d++){if(e[d].type==="checkbox"&&e[d].checked){e[d].previousSibling.style.backgroundPosition="0 -"+iWebkit.checkboxHeight*2+"px"}else{if(e[d].type==="checkbox"){e[d].previousSibling.style.backgroundPosition="0 0"}else{if(e[d].type==="radio"&&e[d].checked){e[d].previousSibling.style.backgroundPosition="0 -"+iWebkit.radioHeight*2+"px"}else{if(e[d].type==="radio"){e[d].previousSibling.style.backgroundPosition="0 0"}}}}}};iWebkit.choose=function(){var e=this.getElementsByTagName("option");for(var f=0;f<e.length;f++){if(e[f].selected){document.getElementById("select"+this.name).childNodes[0].nodeValue=e[f].childNodes[0].nodeValue}}};iWebkit.init()}};// Example:


// writeCookie("myCookie", "my name", 24);

// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.

/*function writeCookie(name, value, hours)

{

  var expire = "";

  if(hours != null)

  {

    expire = new Date((new Date()).getTime() + hours * 3600000);

    expire = "; expires=" + expire.toGMTString();

  }

  document.cookie = name + "=" + escape(value) + expire;

}

// Example:

// alert( readCookie("myCookie") );

function readCookie(name)

{

  var cookieValue = "";

  var search = name + "=";

  if(document.cookie.length > 0)

  { 

    offset = document.cookie.indexOf(search);

    if (offset != -1)

    { 

      offset += search.length;

      end = document.cookie.indexOf(";", offset);

      if (end == -1) end = document.cookie.length;

      cookieValue = unescape(document.cookie.substring(offset, end))

    }

  }

  return cookieValue;
}*/
function GenerateEpisodes(array, comment, streamable)
{
	if(streamable=="no")
	{
		var x;
		for(x in array)
		{
			if(array[x]!="blank"){
				document.write('<li class="menu"><a href="../../download.php?d=' + array[x] + '"><span class="name">Episode ' + x + '</span><span class="comment">' + comment + '</span><span class="Arrow"></span></a></li>');
			}
		}
	}
	else
	{
		var x;
		for(x in array)
		{
			if(array[x]!="blank")
			{
			 	document.write('<li class="menu"><a href="../../download.php?d=' + array[x] + '&amp;s=y"><span class="name">Episode ' + x + '</span><span class="comment">' + comment + '</span><span class="Arrow"></span></a></li>');
			}
		}
	}
}

function MenuItem(location, name, comment, root, download)
{
	if(comment==null)
	{
		comment="";
	}
	if((location.substr(-5)!=".html" || location.substr(-4)!=".php") && root==null)
	{
		root="";
	}
	
	if(location.substr(-5)==".html" || location.substr(-4)==".php" || download == false)
	{
		document.write('<li class="menu"><a href="'+location+'"><span class="name">' + name + '</span><span class="comment">' + comment + '</span><span class="arrow"></span></a></li>');
	}
	else
	{
		document.write('<li class="menu"><a href="'+root+'download.php?d='+location+'"><span class="name">' + name + '</span><span class="comment">' + comment + '</span><span class="arrow"></span></a></li>');
	}
}

function TextBox(text, style)
{
	if(style!=null)
	{
		style='<p style="'+style+'">';
	}
	else
	{
		style='<p>';
	}

	document.write('<li class="textbox">' + style + text + '</p></li>');
}
function DonationBtn()
{
	document.write('<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_donations"><input type="hidden" name="business" value="bokthegolem@gmail.com"><input type="hidden" name="lc" value="US"><input type="hidden" name="currency_code" value="USD"><input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest"><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></form>');
}

function DonationBtnSmall()
{
	document.write('<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_donations"><input type="hidden" name="business" value="bokthegolem@gmail.com"><input type="hidden" name="lc" value="US"><input type="hidden" name="currency_code" value="USD"><input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_SM.gif:NonHostedGuest"><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></form>');
}
	
function Tooltip( id, style, text)
{
	document.write('<div id="' + id + '" class="balloonstyle" style="' + style + '">' + text + '</div>');
}


	


