Reuters.utils.getMetaValue = function(mn) {
	if (mn != '') {
		var mts = document.getElementsByTagName("meta");
		for (i=0; i<mts.length; i++) {
			mt = mts[i];
			if (mt.getAttribute("name") == mn) {
				return mt.getAttribute("content");
				break;
			}
		}
		return '';
	}
}

Reuters.namespace("inlinevideo");
if (typeof Reuters.inlinevideo.id == "undefined") {
	Reuters.inlinevideo.id = '';
}
if (Reuters.inlinevideo.id != '') {
	Reuters.info.heliosIds = [];
	Reuters.info.heliosIds["US"] = 1405990;
	Reuters.info.heliosIds["UK"] = 1405973;
	Reuters.info.heliosIds["IN"] = 1405991;
	Reuters.info.editionPrefix = 'US';
	if (Reuters.info.edition != 'BETAUS') {
		Reuters.info.editionPrefix = Reuters.info.edition.toUpperCase();
	}
	if ((Reuters.utils.getMetaValue("DCSext.VBC") == '') && (Reuters.utils.getQueryStringParameter(location.href, 'type') == '')) {
		document.write('<div id="article-inline-video">' + '<object type="application/x-shockwave-flash" data="http://www.reuters.com/resources_v2/flash/video_embed.swf?rcom=true&pausevideo=0&videoId=' + Reuters.inlinevideo.id + '" width="460" height="259"><param name="movie" value="http://www.reuters.com/resources_v2/flash/video_embed.swf?rcom=true&pausevideo=0&videoId=' + Reuters.inlinevideo.id +'"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><param name="wmode" value="transparent"><embed src="http://www.reuters.com/resources_v2/flash/video_embed.swf?rcom-true&pausevideo=0&videoId=' + Reuters.inlinevideo.id + '" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="460" height="259" wmode="transparent"></embed></object>' + '<p><strong>' + Reuters.inlinevideo.title + '</strong> (' + Reuters.inlinevideo.length + ') ' + Reuters.inlinevideo.type + '</p></div>');
	} else {
		document.write('<div id="article-inline-video">' + '<object type="application/x-shockwave-flash" data="/resources_v2/flash/video_embed.swf?rcom=true&LCLevel1=' + Reuters.info.heliosIds[Reuters.info.editionPrefix] + '&pausevideo=0&videoId=' + Reuters.inlinevideo.id + '" width="460" height="259"><param name="movie" value="http://www.reuters.com/resources_v2/flash/video_embed.swf?rcom=true&LCLevel1=' + Reuters.info.heliosIds[Reuters.info.editionPrefix] + '&pausevideo=0&videoId=' + Reuters.inlinevideo.id +'"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><param name="wmode" value="transparent"><embed src="http://www.reuters.com/resources_v2/flash/video_embed.swf?rcom-true&pausevideo=0&videoId=' + Reuters.inlinevideo.id + '" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="460" height="259" wmode="transparent"></embed></object>' + '<p><strong>' + Reuters.inlinevideo.title + '</strong> (' + Reuters.inlinevideo.length + ') ' + Reuters.inlinevideo.type + '</p></div>');
	}
	var d = document.createElement("div");
	d.id = "slideshow-left-rail";
	document.getElementById("articlePackage").parentNode.insertBefore(d, document.getElementById("articlePackage"));
	Reuters.utils.replaceContent("slideshow-left-rail", "/assets/sharedModuleLoader?sp=v.3&view=RSM-" + Reuters.info.editionPrefix + "-Article-Slideshow-Left&articleId=" + Reuters.info.articleId, null, null);
/*
	} else {
		document.write('<style type="text/css">#slideshowInlineLarge, #articleImage, #relatedVideo .feature .photo { display: block; }</style>');
	}
*/
}

