

/** First write the HTML fallback to the page, so it'll be there even for devices that have poor JS support. **/
document.write("<div class='botrplayer ltas-ad' id='botr_uGkpsEb8_GNeXskUc_div'><a href=\"http://bitcast-b.bitgravity.com/botr/FvhXLTz5/videos/uGkpsEb8-19311.mp4?e=1268995875&amp;h=c04c119bfe85f388fb26e0ac8673284a\" title=\"Delivered from Unforgiveness\" style='display:block; width:525px; height:315px; background: #000000 url(http://content.bitsontherun.com/thumbs/uGkpsEb8-640.jpg) no-repeat center center; position:relative;'><img src='http://content.bitsontherun.com/staticfiles/play.png' alt='Click to play video' style='position:absolute; top:127px; left:232px; border:0;' /></a></div>");






/** Define the botrObject helper functions and initialization class. **/
if (typeof(botrObject) == 'undefined') {
	/** Main botrObject object. **/
	var botrObject = {};
	/** List of all players. **/
	botrObject.players = [];
	/** See if the players can be injected when the DOM is ready. **/
	botrObject.isDomReady = function() {
		var d = document;
		if (d && d.getElementsByTagName && d.getElementById && d.body) {
			clearInterval(botrObject.domTimer);
			for(var i=0; i<botrObject.players.length; i++) {
				botrObject.writePlayer(i);
			}
			botrObject.domDone = true;
		}
	};
	/** Inject the actual player. **/
	botrObject.writePlayer = function(idx) {
		document.getElementById(botrObject.players[idx].container).innerHTML = botrObject.players[idx].getHtml();
	};
	/** Check if the right Flash version is available. **/
	botrObject.hasFlash = function () {
		var version = '0,0,0,0';
		try {
			try {
				var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
				try { axo.AllowScriptAccess = 'always'; }
				catch(e) { version = '6,0,0'; }
			} catch(e) {}
			version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
		} catch(e) {
			try {
				if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
					version = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
				}
			} catch(e) {}
		}
		var major = parseInt(version.split(',')[0]);
		var minor = parseInt(version.split(',')[2]);
		if(major > 9 || (major == 9 && minor > 97)) {
			return true;
		} else {
			return false;
		}
	};
	/** Define the botrObject player object and queue it for insertion on domReady. **/
	botrObject.swf = function (src,id,width,height,bgcolor) {
		if (!document.getElementById) { return; }
		this.source = src;
		this.id = id+'_swf';
		this.container = id+'_div';
		this.width = width;
		this.height = height;
		this.flashvars = {id:this.id};
		this.params = {
			'bgcolor':bgcolor,
			'allowfullscreen':'true',
			'allowscriptaccess':'always',
			'wmode':'opaque'
		};
		botrObject.players.push(this);
		if (botrObject.domDone && botrObject.hasFlash()) {
			var len = botrObject.players.length-1;
			setTimeout(function(){botrObject.writePlayer(len)},50);
		}
	};
	botrObject.swf.prototype = {
		/** Create the HTML string needed for the flash embed. **/
		getHtml:function() {
			var html = "";
			var fv = this.getVariables();
			if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
				html = '<embed type="application/x-shockwave-flash" src="'+ this.source +'" width="'+ this.width +'" height="'+ this.height +'"';
				html += ' id="'+ this.id +'" name="'+ this.id +'" ';
				for(var key in this.params) {
					html += [key] +'="'+ this.params[key] +'" ';
				}
				html += 'flashvars="'+ fv +'" />';
			} else {
				html = '<object id="'+ this.id +'" name="'+ this.id +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.width +'" height="'+ this.height +'">';
				html += '<param name="movie" value="'+ this.source +'" />';
				for(var key in this.params) { 
					html += '<param name="'+ key +'" value="'+ this.params[key] +'" />';
				}
				html += '<param name="flashvars" value="'+ fv +'" />';
				html += "</object>";
			}
			return html;
		},
		/** Add a flashvar to the list. **/
		addVariable: function(name,value) {
			this.flashvars[name] = encodeURIComponent(decodeURIComponent(value));
		},
		/** Return a concatenated string of flashvars. **/
		getVariables: function () {
			var pairs = new Array();
			for(var key in this.flashvars) {
				pairs[pairs.length] = key+"="+this.flashvars[key];
			}
			return pairs.join('&');
		}
	};
	if(botrObject.hasFlash()) { botrObject.domTimer = setInterval(botrObject.isDomReady,50); }
}



/** Now the class has been set up, initialize the player and inject all flashvars. **/
var botr_uGkpsEb8_GNeXskUc = new botrObject.swf("http://content.bitsontherun.com/staticfiles/videoplayer.swf","botr_uGkpsEb8_GNeXskUc","525","315","#000000");
botr_uGkpsEb8_GNeXskUc.addVariable("playlist","none");
botr_uGkpsEb8_GNeXskUc.addVariable("repeat","list");
botr_uGkpsEb8_GNeXskUc.addVariable("autostart","false");
botr_uGkpsEb8_GNeXskUc.addVariable("dock","false");
botr_uGkpsEb8_GNeXskUc.addVariable("frontcolor","ffff66");
botr_uGkpsEb8_GNeXskUc.addVariable("title","Delivered from Unforgiveness");
botr_uGkpsEb8_GNeXskUc.addVariable("image","http://content.bitsontherun.com/thumbs/uGkpsEb8-640.jpg");
botr_uGkpsEb8_GNeXskUc.addVariable("stretching","exactfit");
botr_uGkpsEb8_GNeXskUc.addVariable("ping.script","http://content.bitsontherun.com/pings/");
botr_uGkpsEb8_GNeXskUc.addVariable("height","315");
botr_uGkpsEb8_GNeXskUc.addVariable("width","525");
botr_uGkpsEb8_GNeXskUc.addVariable("lightcolor","ffffff");
botr_uGkpsEb8_GNeXskUc.addVariable("controlbar","bottom");
botr_uGkpsEb8_GNeXskUc.addVariable("displayclick","play");
botr_uGkpsEb8_GNeXskUc.addVariable("backcolor","000000");
botr_uGkpsEb8_GNeXskUc.addVariable("file","http://content.bitsontherun.com/jwp/uGkpsEb8-19314.xml");
botr_uGkpsEb8_GNeXskUc.addVariable("playlistsize","200");
