




/*
     FILE ARCHIVED ON 18:26:19 Jun 23, 2016 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 4:01:53 Nov 4, 2016.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
(function (window) {
		var a = (new Date().getTime()) - 1420070400000;
		eval("window.a2cnffg4ua = a");

		var miiscript = [];
		window.miiscript = miiscript;
		var miiqueryargs=[];
		window.miiqueryargs = miiqueryargs;
		function addMIIScript(urlkey)
		{
				if("true"=="true")
					console.log("inline addMIIScript k=" + urlkey);
				window.miiscript.push(urlkey);
				window.miiqueryargs.push("");
		}
		window.addMIIScript = addMIIScript;

		
})(window);


/*
* BlockAdBlock 3.2.1
* Copyright (c) 2015 Valentin Allaire <!--valentin.allaire@sitexw.fr -->
* Released under the MIT license
* /web/20160623182619/https://github.com/sitexw/BlockAdBlock
*/

		(function(window) {
				var BlockAdBlock = function(options) {
						this._options = {
								checkOnLoad:		false,
								resetOnEnd:			false,
								loopCheckTime:		50,
								loopMaxNumber:		5,
								baitClass:			'pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links',
								baitStyle:			'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;',
								debug:				false
						};
						this._var = {
								version:			'3.2.1',
								bait:				null,
								checking:			false,
								loop:				null,
								loopNumber:			0,
								event:				{ detected: [], notDetected: [] }
						};
						if(options !== undefined) {
								this.setOption(options);
						}
						var self = this;
						var eventCallback = function() {
								setTimeout(function() {
										if(self._options.checkOnLoad === true) {
												if(self._options.debug === true) {
														self._log('onload->eventCallback', 'A check loading is launched');
												}
												if(self._var.bait === null) {
														self._creatBait();
												}
												setTimeout(function() {
														self.check();
												}, 1);
										}
								}, 1);
						};
						if(window.addEventListener !== undefined) {
								window.addEventListener('load', eventCallback, false);
						} else {
								window.attachEvent('onload', eventCallback);
						}
				};
				BlockAdBlock.prototype._options = null;
				BlockAdBlock.prototype._var = null;
				BlockAdBlock.prototype._bait = null;
	
				BlockAdBlock.prototype._log = function(method, message) {
						console.log('[BlockAdBlock]['+method+'] '+message);
				};
	
				BlockAdBlock.prototype.setOption = function(options, value) {
						if(value !== undefined) {
								var key = options;
								options = {};
								options[key] = value;
						}
						for(var option in options) {
								this._options[option] = options[option];
								if(this._options.debug === true) {
										this._log('setOption', 'The option "'+option+'" he was assigned to "'+options[option]+'"');
								}
						}
						return this;
				};
	
				BlockAdBlock.prototype._creatBait = function() {
						var bait = document.createElement('div');
						bait.setAttribute('class', this._options.baitClass);
						bait.setAttribute('style', this._options.baitStyle);
						this._var.bait = window.document.body.appendChild(bait);
		
						this._var.bait.offsetParent;
						this._var.bait.offsetHeight;
						this._var.bait.offsetLeft;
						this._var.bait.offsetTop;
						this._var.bait.offsetWidth;
						this._var.bait.clientHeight;
						this._var.bait.clientWidth;
		
						if(this._options.debug === true) {
								this._log('_creatBait', 'Bait has been created');
						}
				};
				BlockAdBlock.prototype._destroyBait = function() {
						window.document.body.removeChild(this._var.bait);
						this._var.bait = null;
		
						if(this._options.debug === true) {
								this._log('_destroyBait', 'Bait has been removed');
						}
				};
	
				BlockAdBlock.prototype.check = function(loop) {
						if(loop === undefined) {
								loop = true;
						}
		
						if(this._options.debug === true) {
								this._log('check', 'An audit was requested '+(loop===true?'with a':'without')+' loop');
						}
		
						if(this._var.checking === true) {
								if(this._options.debug === true) {
										this._log('check', 'A check was canceled because there is already an ongoing');
								}
								return false;
						}
						this._var.checking = true;
		
						if(this._var.bait === null) {
								this._creatBait();
						}
		
						var self = this;
						this._var.loopNumber = 0;
						if(loop === true) {
								this._var.loop = setInterval(function() {
										self._checkBait(loop);
								}, this._options.loopCheckTime);
						}
						setTimeout(function() {
								self._checkBait(loop);
						}, 1);
						if(this._options.debug === true) {
								this._log('check', 'A check is in progress ...');
						}
		
						return true;
				};
				BlockAdBlock.prototype._checkBait = function(loop) {
						var detected = false;
		
						if(this._var.bait === null) {
								this._creatBait();
						}
		
						if(window.document.body.getAttribute('abp') !== null
						|| this._var.bait.offsetParent === null
						|| this._var.bait.offsetHeight == 0
						|| this._var.bait.offsetLeft == 0
						|| this._var.bait.offsetTop == 0
						|| this._var.bait.offsetWidth == 0
						|| this._var.bait.clientHeight == 0
						|| this._var.bait.clientWidth == 0) {
								detected = true;
						}
						if(window.getComputedStyle !== undefined) {
								var baitTemp = window.getComputedStyle(this._var.bait, null);
								if(baitTemp && (baitTemp.getPropertyValue('display') == 'none' || baitTemp.getPropertyValue('visibility') == 'hidden')) {
										detected = true;
								}
						}
		
						if(this._options.debug === true) {
								this._log('_checkBait', 'A check ('+(this._var.loopNumber+1)+'/'+this._options.loopMaxNumber+' ~'+(1+this._var.loopNumber*this._options.loopCheckTime)+'ms) was conducted and detection is '+(detected===true?'positive':'negative'));
						}
		
						if(loop === true) {
								this._var.loopNumber++;
								if(this._var.loopNumber >= this._options.loopMaxNumber) {
										this._stopLoop();
								}
						}
		
						if(detected === true) {
								this._stopLoop();
								this._destroyBait();
								this.emitEvent(true);
								if(loop === true) {
										this._var.checking = false;
								}
						} else if(this._var.loop === null || loop === false) {
								this._destroyBait();
								this.emitEvent(false);
								if(loop === true) {
										this._var.checking = false;
								}
						}
				};
				BlockAdBlock.prototype._stopLoop = function(detected) {
						clearInterval(this._var.loop);
						this._var.loop = null;
						this._var.loopNumber = 0;
		
						if(this._options.debug === true) {
								this._log('_stopLoop', 'A loop has been stopped');
						}
				};
	
				BlockAdBlock.prototype.emitEvent = function(detected) {
						if(this._options.debug === true) {
								this._log('emitEvent', 'An event with a '+(detected===true?'positive':'negative')+' detection was called');
						}
		
						var fns = this._var.event[(detected===true?'detected':'notDetected')];
						for(var i in fns) {
								if(this._options.debug === true) {
										this._log('emitEvent', 'Call function '+(parseInt(i)+1)+'/'+fns.length);
								}
								if(fns.hasOwnProperty(i)) {
										fns[i]();
								}
						}
						if(this._options.resetOnEnd === true) {
								this.clearEvent();
						}
						return this;
				};
				BlockAdBlock.prototype.clearEvent = function() {
						this._var.event.detected = [];
						this._var.event.notDetected = [];
		
						if(this._options.debug === true) {
								this._log('clearEvent', 'The event list has been cleared');
						}
				};
	
				BlockAdBlock.prototype.on = function(detected, fn) {
						this._var.event[(detected===true?'detected':'notDetected')].push(fn);
						if(this._options.debug === true) {
								this._log('on', 'A type of event "'+(detected===true?'detected':'notDetected')+'" was added');
						}
		
						return this;
				};
				BlockAdBlock.prototype.onDetected = function(fn) {
					//	console.log("onDetected type=" + (typeof fn))
						return this.on(true, fn);
				};
				BlockAdBlock.prototype.onNotDetected = function (fn) {
					//	console.log("onNotDetected type="+(typeof fn))
						return this.on(false, fn);
				};
	
				window.BlockAdBlock = BlockAdBlock;
	
				if(window.blockAdBlock === undefined) {
						window.blockAdBlock = new BlockAdBlock({
								checkOnLoad: true,
								resetOnEnd: true
						});
				}
		})(window);
		(function MIIScriptCtrl(window) {
				var MIILogging = "true"=="true"?true:false;
				var request;
				var bDetected;
				var adseq=0;

				window.MIIScriptCtrl = this;
				this.log = function (msg) {
						if (MIILogging)
								console.log(msg);
				}
				var MESSAGE_USER = function(){

						var usingXRE = "1"=="1"?1:0;  // 0 is false, 1 is true
						var messages = [["<h1 style='font-size: 50px'>Here's The Thing With Ad Blockers</h1><p><strong>We get it:</strong> Ads can be a drag. But that's how we can afford to continue to operate our website. Please consider adding our website to the 'whitelist' on your ad-blocker. Thanks!</p>", "<h1 style='font-size: 50px'>Hello there!<h1><p>We noticed that you still have your ad-blocker active on our website. Please consider adding our website to the 'whitelist' on your ad-blocker so we can continue to provide you with awesome content. Thanks!</p>"],
														[""]]; //  An arry of messages
						var displayType = ["modal","modal"]; // Variations can be 'popup', 'modal', and 'embedded' 
						var showMessageWhen = [["visit", "2"],["visit","5"]]; //  Variations can be for 1st value: 'visit', 'day', 2nd value: any integer
						var cookieName = ["ABO","ABO"];
						var cookieExpires = ["expires=3600","expires=31536000"];
						var cookieID = ["","1091848548b280"];
						var cookieVer = ["","COOKIE_VER"];
						var subname = ["8673118783",eval("window.a2cnffg4ua")];
						var hostkey = [".caribbean-on-line.com",".trb.tv"];
						var hostalias = ["bfcdaf5c2d621.caribbean-on-line.com","a2cnffg4ua.trb.tv"];
						var miiheaders = ["","MIIHEADER"];
						var keymax = ["0",""];
						var mikey = ["mikey","mikey"];
						var mikeyEnabled = [[0],eval("[]")];
						var aboon = ["1","ABOENABLED"];
						return{
								messages: messages[usingXRE],
								displayType: displayType[usingXRE],
								showMessageWhen: showMessageWhen[usingXRE],
								cookieName: cookieName[usingXRE],
								cookieExpires: cookieExpires[usingXRE],
								cookieID: cookieID[usingXRE],
								cookieVer: cookieVer[usingXRE],
								subname: subname[usingXRE],
								hostkey: hostkey[usingXRE],
								hostalias: hostalias[usingXRE],
								miiheaders: miiheaders[usingXRE],
								keymax: keymax[usingXRE],
								mikey:	mikey[usingXRE],
								mikeyEnabled:	mikeyEnabled[usingXRE],
								aboon:	aboon[usingXRE]
						};
				}();
				
				this.log("window.subname ID = " +MESSAGE_USER.subname);
				this.log("creating new MIIScriptCtrl object from BlockAdBlock.js");
				// setDetected are called as anonymous functions so do not know who their 'this' is...
				function babSetDetected() {
						mIIScriptCtrl = window.MIIScriptCtrl;
						mIIScriptCtrl.log("BlockAdBlock detected an ad blocker");
						mIIScriptCtrl.bDetected = true;
						mIIScriptCtrl.initCookie();
						mIIScriptCtrl.addMIIScript(0);
						mIIScriptCtrl.popall(); // BlockAdBlock has finished, clear the stack
				}
				function bsbSetNotDetected()
				{
						mIIScriptCtrl = window.MIIScriptCtrl;
						mIIScriptCtrl.log("BlockAdBlock did not detected an ad blocker");
						mIIScriptCtrl.bDetected = false;
						mIIScriptCtrl.initCookie();
						mIIScriptCtrl.addMIIScript(0);
						mIIScriptCtrl.popall(); // BlockAdBlock has finished, clear the stack
				}

				blockAdBlock.onDetected(babSetDetected).onNotDetected(bsbSetNotDetected);

				function getCookie(cname) {
						var name = cname + "=";
						var ca = document.cookie.split(';');
						for(var i = 0; i <ca.length; i++) {
								var c = ca[i];
								while (c.charAt(0)==' ') {
								    c = c.substring(1);
								}
								if (c.indexOf(name) == 0) {
								    return c.substring(name.length,c.length);
								}
						}
						return "";
				}
				function parseString(cookieString)
				{
					return cookieString.split('|');
				}
				this.initCookie = function () 
				{ 
						var expires = MESSAGE_USER.cookieExpires;
						var id = MESSAGE_USER.cookieID;
						if(!id)
							id = MESSAGE_USER.subname;

						var visit_count = 0;
						var datetime_last_visit = 0; // This is currently a unix timestamp
						var parts = []; 
						var cookie = getCookie(MESSAGE_USER.cookieName);
						if(cookie != "")
						{
							parts = parseString(cookie);
							visit_count = parts[5];
							datetime_last_visit = parts[6]; // This is currently a unix timestamp
						}
						window.MIIScriptCtrl.log("datetime_last_visit="+datetime_last_visit);
						cookie = MESSAGE_USER.cookieName + "=" + MESSAGE_USER.cookieVer+"|"+id+"|"+MESSAGE_USER.subname+"|"+(mIIScriptCtrl.bDetected?"1":"0")+"|"+MESSAGE_USER.aboon+"|"+visit_count+"|"+datetime_last_visit+"|; " + expires + ";domain="+MESSAGE_USER.hostkey+";path=/";
						window.MIIScriptCtrl.log("ABO cookie = "+cookie);
						document.cookie = cookie;
						if(MESSAGE_USER.aboon == "1" && mIIScriptCtrl.bDetected == "1")
							createMessage(cookie);
				}
				
				function createMessage(cookieStr){
					// get the values from cookie
					var cookie = parseString(cookieStr);
					var abo_enabled = cookie[4];
					var visit_count = cookie[5];
					var datetime_last_visit = cookie[6]; // This is currently a unix timestamp

					mIIScriptCtrl.log("abo_enabled: " + abo_enabled + " visit_count: " + visit_count + " datetime_last_visit: " + datetime_last_visit);

					mIIScriptCtrl.log("javascript timestamp: " + new Date(Number(datetime_last_visit)).toGMTString());

					var showWhen = 0;
					try
					{
						showWhen=parseInt(MESSAGE_USER.showMessageWhen[1]);
					} catch(err) {}
					var messageToShow = Math.floor(visit_count / showWhen);
					switch(MESSAGE_USER.showMessageWhen[0]){
						case "visit":							
							if(messageToShow < MESSAGE_USER.messages.length){
								displayMessage(messageToShow);
								updateCookie(cookie);
								mIIScriptCtrl.bDetected = false;
							}
							break;

						case "day":
							var today = new Date().getTime();							
							if(datetime_last_visit < today && messageToShow < MESSAGE_USER.messages.length){								
								mIIScriptCtrl.bDetected = false;
								if(!sameDay(Number(datetime_last_visit), today)){
									displayMessage(messageToShow);
									updateCookie(cookie);
								}							
							}
							break;

						default:
							break;
					}
				}

				function sameDay(lastVisit, today){
					var lastTime = new Date(lastVisit);
					var now = new Date(today);

					return lastTime.getMonth === now.getMonth && lastTime.getDate() === now.getDate() && lastTime.getFullYear() === now.getFullYear();
				}

				function updateCookie(cookie){
					// increase visit_count by 1 and update datetime_last_visit to now
					cookie[5] = Number(cookie[5]) + 1;
					cookie[6] = new Date().getTime();
					
					// put cookie value back together
					var updated_cookie = cookie.join("|");

					mIIScriptCtrl.log("Cookie value: " + updated_cookie);

					document.cookie = updated_cookie;
				}

				function displayMessage(messageIndex){
					switch(MESSAGE_USER.displayType){
						case "popup":
							window.alert(MESSAGE_USER.messages[messageIndex]);
							break;

						case "modal":
							createModal(messageIndex);
							showModal(messageIndex);
			
							break;

						case "embeded":
							break;

						default:
							break;
					}

				}

				function showModal(messageIndex){
					var modal = document.getElementById("modal" + messageIndex);
					modal.style.display="block";
					window.onclick = function(event){
						if(event.target == modal){
							modal.style.display = "none";
						}
					}
					var close = document.getElementsByClassName("close" + messageIndex)[0];
					close.onclick = function(){
						modal.style.display="none";
					}
				}

				function createModal(messageIndex){					
					var modal = document.createElement("div");
					modal.id = "modal" + messageIndex;
					modal.className = "modal";
					modal.style.cssText = "display:none;position:fixed;z-index:999;padding-top:100px;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4);";

					var modal_content = document.createElement("div");
					modal_content.className = "modal-content";
					modal_content.style.cssText = "background-color:#fefefe;margin:auto;padding:20px;border:1px solid #888;width:50%;";

					var close = document.createElement("span");
					close.className = "close" + messageIndex;
					close.style.cssText = "color:#aaa;float:right;font-size:28px;font-weight:bold;cursor:pointer";
					var close_text = document.createTextNode("x");
					close.appendChild(close_text);

					var message = document.createElement("div");
					message.style.cssText = "width: 80%; margin: 0 auto; text-align: center;";
					message.innerHTML = MESSAGE_USER.messages[messageIndex]
					
					// piece it all together.
					modal_content.appendChild(close);
					modal_content.appendChild(message);
					modal.appendChild(modal_content);

					document.body.appendChild(modal);
				}				
				
				this.push = function (urlkey, queryargs) {
						this.log("BlockAdBlock not ready yet; pushing urlkey onto stack: " + urlkey+" stack size="+(window.miiscript.length+1));

						window.miiscript.push(urlkey);
						window.miiqueryargs.push(queryargs);
				}
				this.pop = function () {
						var urlkey = window.miiscript.pop();
						this.log("popping src from stack: " + urlkey);
						this.addMIIScript(urlkey, miiqueryargs.pop());
						return;
				}
				this.popall = function () {
						this.popImages();
						while (this.isMIIscript())
								this.pop();
				}
				this.isMIIscript = function () {
						return (window.miiscript.length > 0);
				}
				this.popImages = function()
				{
						var keymaxStr = MESSAGE_USER.keymax;
						var keymax = 0;
						try
						{
							keymax = parseInt(keymaxStr);
						} catch (err) {}
						for (var i=1; i<=keymax; i++)
						{
								var ele = document.getElementById(MESSAGE_USER.mikey + i);
								if (ele) ele.src = getURL(i);
						}
				}
				function addMIIScript(urlkey, queryargs)
				{
						if (typeof this.bDetected == 'undefined') {
								this.log("downloaded addMIIScript k="+urlkey);
								this.push(urlkey, queryargs);
								return;
						}
						
						if(typeof window.mIIScriptCtrl.bFirstScript == "undefined" && !window.mIIScriptCtrl.bDetected)
						{
							// the first time thru this function, if there is no ad blocker installed,
							//	we need to change all miadsbygoogle class names back to the original adsbygoogle classname
							window.MIIScriptCtrl.bFirstScript = false;
							var x = document.getElementsByClassName("miadsbygoogle");
							var len = x.length;
							window.MIIScriptCtrl.log("miadsbygoogle count=" + len);
							for (var i = 0; i < len; i++)
							{
									// changing the class name removes the element from 
									//	the x array so we always change the element at index 0
									x[0].className = "adsbygoogle"; 
							}
							x = document.getElementsByClassName("adsbygoogle");
							window.MIIScriptCtrl.log("adsbygoogle count=" + x.length);
						}

						var url = window.MIIScriptCtrl.getURL(urlkey);
						if (typeof url === 'undefined') {
								window.MIIScriptCtrl.log("getURL returned undefined");
								return;
						}
						if (typeof queryargs == 'string' && queryargs != "")
								url += queryargs + "&";

						var js = document.createElement('script');
						js.type = 'text/javascript';
						js.charset = 'UTF-8';
						if (url && url != "") {
								window.MIIScriptCtrl.log("addMIIScript url: " + url);
								js.src = url;
						}	
						else return;

						var head = document.getElementsByTagName('head')[0];
						head.appendChild(js);
						window.MIIScriptCtrl.log("appended script src=" + url);
				}
				this.log("Adding addMIIScript as window function");
				window.addMIIScript = addMIIScript;

				this.getURL = function (urlkey) {
						var urlHashMap = 
						{
								
						}
						if (!urlkey)
						{				
								this.log("window.mIIScriptCtrl.bDetected: "+window.mIIScriptCtrl.bDetected);
								var strDet = window.mIIScriptCtrl.bDetected?"1":"0";
								// Note: MESSAGE_USER.subname (i.e. window.a2cnffg4ua) is the page view transaction ID that will be part of every request for this page, 
								//	followed by a sequence number - zero in this case indicating that it is the initial request from the page
								//	that relates the transaction ID to the referrer.
								var str = "//"+MESSAGE_USER.hostalias+"/js/"+MESSAGE_USER.subname+"/0/"+strDet+"/?"+ ((new Date().getTime()) - 1454302800000) + "=" + MESSAGE_USER.subname+"&c=feaa61ba668ea";
								return str;
						}
						mIIScriptCtrl = window.MIIScriptCtrl;
						this.log("getURL bDetected="+mIIScriptCtrl.bDetected);
						
						var override = window.mIIScriptCtrl.bDetected;
						if(!MESSAGE_USER.mikeyEnabled[urlkey-1])
						{
							override = false
						}
						urlkey2 = (override ? 'a' : 'b') + urlkey;
						var decoded = atob(urlHashMap[urlkey2]);
						if(window.mIIScriptCtrl.bDetected)
						{
							decoded = decoded.replace("MIITRANID",MESSAGE_USER.subname);
							window.MIIScriptCtrl.log("adseq="+adseq);
							decoded = decoded.replace("MIIADSEQ",++adseq);
							decoded = decoded.replace("MIIKEY",urlkey);
						}
						this.log("returning for key " + urlkey2 + " value=" + decoded);
						return decoded;
				}

				this.createXMLHttpRequest = function () {
						try { return new XMLHttpRequest(); } catch (e) { }
						try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { }
						try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { }
						return null;
				}
				request = this.createXMLHttpRequest();
				function sendMIIReq(fp, callback) {
						if (request == null)
								this.log("XMLHttpRequest not supported");
						else {
								request.onreadystatechange = function () {
										var DONE = this.DONE || 4;
										if (this.readyState === DONE) {
												window.MIIScriptCtrl.log("responseText length = " + this.responseText.length);
												//	window.MIIScriptCtrl.log("responseText = "+this.responseText);
												//		addMIIScript(null, this.responseText);
												if (typeof callback == 'function' && callback != "")
												{
													window.MIIScriptCtrl.log('callback envoked');
													callback(this.responseText);
												}
										}
								};
								//	request.open('GET', '//ecf.usssa.com/abo/header/', true);
								//	request.setRequestHeader('X-mii-abo', encodeURI(fp));
								request.open('GET', '//'+MESSAGE_USER.hostalias+'/', true);
								request.setRequestHeader(MESSAGE_USER.miiheaders, fp);
								request.send(null);  // No data needs to be sent along with the request.

						}
				}
				window.sendMIIReq = sendMIIReq;
				window.onload = function asyncOnLoad()
				{
								// do here anything that needs to be done after the body has loaded
				}
	
		})(window);


