﻿function getFlash(flashPath, linkPath, width, height)
{
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + width + "\" height=\"" + height + "\">");
	document.write("<param name=\"movie\" value=\"" + flashPath + "\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<param name=\"FlashVars\" value=\"path=" + linkPath + "\">");
	document.write("<embed src=\"" + flashPath + "\" FlashVars=\"path=" + linkPath + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + width + "\" height=\"" + height + "\"></embed>");
	document.write("</object>");
}

function getFlashAltImg(flashPath, altImgPath, linkPath, rawLinkPath, width, height)
{
	var str_ua = navigator.userAgent.toLowerCase();
	if (str_ua.indexOf("android 1.6;") != -1)
	{
		// for Xperia X1 that doesn't recognize alternate image tag below
		document.write("<div>");
		document.write("<a href=\"" + rawLinkPath + "\">");
		document.write("<img src=\"" + altImgPath + "\" width=\"" + width + "\" height=\"" + height + "\" border=\"0\">");
		document.write("</a>");
		document.write("</div>");
	}
	else
	{
		document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + width + "\" height=\"" + height + "\">");
		document.write("<param name=\"movie\" value=\"" + flashPath + "\">");
		document.write("<param name=\"quality\" value=\"high\">");
		document.write("<param name=\"FlashVars\" value=\"path=" + linkPath + "\">");
		document.write("<!--[if !IE]>-->");
		document.write("<object type=\"application/x-shockwave-flash\" data=\"" + flashPath + "\" width=\"" + width + "\" height=\"" + height + "\">");
		document.write("<!--<![endif]-->");
		document.write("<param name=\"quality\" value=\"high\">");
		document.write("<param name=\"FlashVars\" value=\"path=" + linkPath + "\">");
		document.write("<div>");
		document.write("<a href=\"" + rawLinkPath + "\">");
		document.write("<img src=\"" + altImgPath + "\" width=\"" + width + "\" height=\"" + height + "\" border=\"0\">");
		document.write("</a>");
		document.write("</div>");
		document.write("<!--[if !IE]>-->");
		document.write("</object>");
		document.write("<!--<![endif]-->");
		document.write("</object>");
	}
}

function getFlashBlank(flashPath, linkPath, width, height)
{
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + width + "\" height=\"" + height + "\">");
	document.write("<param name=\"movie\" value=\"" + flashPath + "\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<param name=\"FlashVars\" value=\"path=" + linkPath + "&amp;target=blank\">");
	document.write("<embed src=\"" + flashPath + "\" FlashVars=\"path=" + linkPath + "&amp;target=blank\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + width + "\" height=\"" + height + "\"></embed>");
	document.write("</object>");
}

function getFlashBlankAltImg(flashPath, altImgPath, linkPath, rawLinkPath, width, height)
{
	var str_ua = navigator.userAgent.toLowerCase();
	if (str_ua.indexOf("android 1.6;") != -1)
	{
		// for Xperia X1 that doesn't recognize alternate image tag below
		document.write("<div>");
		document.write("<a href=\"" + rawLinkPath + "\" target=\"blank\">");
		document.write("<img src=\"" + altImgPath + "\" width=\"" + width + "\" height=\"" + height + "\" border=\"0\">");
		document.write("</a>");
		document.write("</div>");
	}
	else
	{
		document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + width + "\" height=\"" + height + "\">");
		document.write("<param name=\"movie\" value=\"" + flashPath + "\">");
		document.write("<param name=\"quality\" value=\"high\">");
		document.write("<param name=\"FlashVars\" value=\"path=" + linkPath + "&amp;target=blank\">");
		document.write("<!--[if !IE]>-->");
		document.write("<object type=\"application/x-shockwave-flash\" data=\"" + flashPath + "\" width=\"" + width + "\" height=\"" + height + "\">");
		document.write("<!--<![endif]-->");
		document.write("<param name=\"quality\" value=\"high\">");
		document.write("<param name=\"FlashVars\" value=\"path=" + linkPath + "&amp;target=blank\">");
		document.write("<div>");
		document.write("<a href=\"" + rawLinkPath + "\" target=\"blank\">");
		document.write("<img src=\"" + altImgPath + "\" width=\"" + width + "\" height=\"" + height + "\" border=\"0\">");
		document.write("</a>");
		document.write("</div>");
		document.write("<!--[if !IE]>-->");
		document.write("</object>");
		document.write("<!--<![endif]-->");
		document.write("</object>");
	}
}

function getFlashStatic(flashPath, width, height)
{
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + width + "\" height=\"" + height + "\">");
	document.write("<param name=\"movie\" value=\"" + flashPath + "\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<embed src=\"" + flashPath + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + width + "\" height=\"" + height + "\"></embed>");
	document.write("</object>");
}

function getFlashStaticWithBG(flashPath, width, height, bg)
{
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + width + "\" height=\"" + height + "\">");
	document.write("<param name=\"movie\" value=\"" + flashPath + "\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<param name=\"bgcolor\" value=\"" + bg + "\">");
	document.write("<embed src=\"" + flashPath + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + width + "\" height=\"" + height + "\" bgcolor=\"" + bg + "\"></embed>");
	document.write("</object>");
}

