﻿function showSwf(src, width, height, host, ad, alt, parent) {
	if (DetectFlashVer(8, 0, 0)) {
		if (alt) {
			alt = document.getElementById(alt);
			if (alt) {
				alt.style.display = 'none';
			}
		}
		
		var query = document.location.search;
		query = query.replace("?", "");
		var qs = query.split("&");
		var qsKV = new Array();

		for (var i = 0; i < qs.length; i++) {
		    var pos = qs[i].indexOf("=");
		    if (pos > 0) {
		        var key = qs[i].substring(0, pos);
		        var val = qs[i].substring(pos + 1);
		        qsKV[key] = val;
		    }
		}

		var sharethis = qsKV["sharethis"];
		if (!sharethis)
		    sharethis = '';

		AC_FL_RunContent(
			'codebase', document.location.protocol + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', width.toString(),
			'height', height.toString(),
			'base', document.location.protocol + '//' + host,
			'src', src,
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'transparent',
			'devicefont', 'false',
			'bgcolor', '#ffffff',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess', 'sameDomain',
			'movie', src + (ad == null || ad.length == 0 ? '' : '?ad=' + ad) + (ad == null || ad.length == 0 ? (sharethis.length == 0 ? '' : '?sharethis=' + sharethis) : (sharethis.length == 0 ? '' : '&sharethis=' + sharethis)),
			'salign', ''
		); //end AC code
	}
	else if (parent) {
		parent = document.getElementById(parent);
		if (parent)		
			parent.style.display = 'none';
	}
}