/*
	Flasunt JS Embed
	requested by 	*/
if(typeof itdr=="undefined") var itdr={};
if(typeof itdr.classes=="undefined") itdr.classes={};
if(typeof itdr.classes.Flaunt =="undefined") itdr.classes.Flaunt = new function () {
	var is_ie = /*@cc_on!@*/ false;
	/*
		blogshow's swf requires version 8 of the flash player.  if the user does not have flash 8
		don't bother them with all the update hockus-pocus, it will just confuse them.
		instead, we'll deliver an html/ajax version that they can't tell apart anyhow
		*/
	function hasFlash() {
		var major_required = 8;
		var minor_required = 0;
		var major_detected = 0;
		var minor_detected = 0;
		var version;
		var mso;
		if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") {
			version = navigator.plugins["Shockwave Flash"].description;
			if (typeof version!="undefined") {
				version = version.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
				major_detected = parseInt(version.replace(/^(.*)\..*$/, "$1"), 10);
				minor_detected = /r/.test(version) ? parseInt(version.replace(/^.*r(.*)$/, "$1"), 10) : 0;
			}
		} else if (window.ActiveXObject) {
			try {
				var mso = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
			} catch(e) {
				try {
					var mso = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
					major_detected = 6;
					minor_detected = 0;
					mso.AllowScriptAccess = "always";
				} catch (e) {
					if (major_detected==6) return false;
				}
				try {
					var mso = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				} catch(e) {}
			}
			if (typeof mso=="object") {
				var version = mso.GetVariable("$version");
				if(typeof version!="undefined") {
					version = version.replace(/^\S+\s+(.*)$/, "$1").split(",");
					major_detected = parseInt(version[0], 10);
					minor_detected = parseInt(version[2], 10);
				}
			}
		}
		return major_detected>major_required || ( major_detected==major_required && minor_detected>=minor_required ) ? true : false;
	};
	/*
		this is the main public function that runs each time the javascript is embedded
		it takes in the query string from the last js file
		and parses it.
		then, if flash > 8 is available, it embeds flash, otherwise, delivers the
		html version
		*/
	this.embed = function(obj) {
		var xhtml = '<div class="Flaunt" id="flaunt-object-' + obj.id + '">';
		if (hasFlash()) {
			var swf_uri = "http://danielchinphotography.com/flaunt/flaunt-core/swf/interface-loader.swf";

			xhtml += '<object style="outline:none"';
			if (is_ie) xhtml += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
			else xhtml += ' type="application/x-shockwave-flash" data="' + swf_uri + '"';
			xhtml += ' width="' + obj.width + '" height="' + obj.height + '">';
			if (is_ie) xhtml += '<param name="movie" value="' + swf_uri + '" />';
			xhtml += '<param name="base" value="http://danielchinphotography.com/flaunt/"; />';
			xhtml += '<param name="bgcolor" value="#ffffff" />';
			xhtml += '<param name="flashvars" value="namespace=flaunt&homeuri=' + escape("/page/" + obj.id + "/") + '&embedded=1&thumbnailheight=40&autohide=0&autoplay=0" />';
			xhtml += '<param name="allowFullScreen" value="true" />';
			xhtml += '</object>';
		} else {
			if (obj.protected) {
				xhtml += '<span>This Slideshow is Password Protected</span>';
				xhtml += '<a href="" target="_blank">Login</a>';
			} else {
				for (var i=0; i<obj.images.length; ++i) {
					var src = obj.images[i];
					xhtml += '<img src="' + src + '" />';
				}
			}
		}
		xhtml += '</div>';
		document.writeln(xhtml);
	};
};
itdr.classes.Flaunt.embed({
	id: "405f",
	width: 770,
	height: 553,
	protected: false,
	images: [
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0805240042-4060.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0805240180-4061.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0805240191-4062.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0805240206-4063.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0806210035-4064.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0806210137-4065.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0806210164-4066.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0806210166-4067.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0806210172-4068.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0807120153-4069.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0807120200-406a.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0807120266-406b.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0807190031-406c.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0807190216-406d.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0808010027-406e.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/080801106-406f.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0808010110-4070.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0808010263-4071.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0808010307-4072.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0808010315-4073.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0808020021-4074.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/0808020032-4075.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/200808010004-4076.jpg',
		'http://danielchinphotography.com/flaunt/flaunt-data/storage/405f/200808010006-4077.jpg'
	]
})