

/** 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_z4cQ0WvA_VGOpdPeL_div'><a href=\"http://bitcast-b.bitgravity.com/botr/wvU02GgE/videos/z4cQ0WvA-35433.mp4?e=1268359400&amp;h=7fa0b0975b2a8108ff47da893a6c1a56\" title=\"Built-In Harness Jacket\" style='display:block; width:300px; height:165px; background: #fff0f5 url(http://dog-product-videos.www.gwlittle.com/thumbs/z4cQ0WvA-320.jpg) no-repeat center center; position:relative;'><img src='http://dog-product-videos.www.gwlittle.com/staticfiles/play.png' alt='Click to play video' style='position:absolute; top:52px; left:120px; 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_z4cQ0WvA_VGOpdPeL = new botrObject.swf("http://dog-product-videos.www.gwlittle.com/staticfiles/videoplayer.swf","botr_z4cQ0WvA_VGOpdPeL","300","165","#fff0f5");
botr_z4cQ0WvA_VGOpdPeL.addVariable("playlist","none");
botr_z4cQ0WvA_VGOpdPeL.addVariable("repeat","none");
botr_z4cQ0WvA_VGOpdPeL.addVariable("autostart","false");
botr_z4cQ0WvA_VGOpdPeL.addVariable("dock","false");
botr_z4cQ0WvA_VGOpdPeL.addVariable("frontcolor","333333");
botr_z4cQ0WvA_VGOpdPeL.addVariable("title","Built-In Harness Jacket");
botr_z4cQ0WvA_VGOpdPeL.addVariable("image","http://dog-product-videos.www.gwlittle.com/thumbs/z4cQ0WvA-320.jpg");
botr_z4cQ0WvA_VGOpdPeL.addVariable("stretching","uniform");
botr_z4cQ0WvA_VGOpdPeL.addVariable("ping.script","http://dog-product-videos.www.gwlittle.com/pings/");
botr_z4cQ0WvA_VGOpdPeL.addVariable("height","165");
botr_z4cQ0WvA_VGOpdPeL.addVariable("width","300");
botr_z4cQ0WvA_VGOpdPeL.addVariable("lightcolor","999999");
botr_z4cQ0WvA_VGOpdPeL.addVariable("controlbar","bottom");
botr_z4cQ0WvA_VGOpdPeL.addVariable("displayclick","link");
botr_z4cQ0WvA_VGOpdPeL.addVariable("backcolor","fff0f5");
botr_z4cQ0WvA_VGOpdPeL.addVariable("file","http://dog-product-videos.www.gwlittle.com/jwp/z4cQ0WvA.xml");
botr_z4cQ0WvA_VGOpdPeL.addVariable("playlistsize","1");
botr_z4cQ0WvA_VGOpdPeL.addVariable("plugins","gapro-1,http://dog-product-videos.www.gwlittle.com/staticfiles/sharing.swf");
botr_z4cQ0WvA_VGOpdPeL.addVariable("gapro.accountid","UA-966869-1");
