/*
	Functions to allow your flash to be automatically activated in Internet Explorer 
	Adapt example below
*/

/**
* Standard workaround for embedding Flash in web pages to avoid activation clicking
* in Internet Explorer.
* @param height of flash box
* @param width of flash box
* @param wmode: Doesn't work on Firefox (as of 2006-09-26), so set it to "" for Firefox
*/   
function embedPictureStrip(swfName,width, height, wmode, organismTypeAndId, featuredArticleId)
{
	// Check for correct flash version
	if(flashinstalled != null && flashinstalled == 2 && flashversion != null && flashversion >= 8)
	//if(true)
	{
		var embedWmode ="";
		if(wmode.length > 0) embedWmode = " wmode=\"opaque\"";
		document.write("\n");
		document.write("<object type=\"application/x-shockwave-flash\" data=\"lib/client/" + swfName + "?lzproxied=false\" width=\"" + width + "\" height=\"" + height + "\" onmouseover=\"expandPicStrip();\" onmouseout=\"collapsePicStrip();\" id=\"pictureStrip\">\n");
		document.write("<param name=\"movie\" value=\"lib/client/" + swfName + "?lzproxied=false\">\n");
		document.write("<param name=\"quality\" value=\"high\">\n");
		if(organismTypeAndId != "undefined")
			document.write("<param name=\"FlashVars\" value=\"organismId=" + organismTypeAndId + "\">\n");
		else
			document.write("<param name=\"FlashVars\" value=\"articleId=" + featuredArticleId + "\">\n");
		document.write("<param name=\"scale\" value=\"noscale\">\n");
		document.write("<param name=\"salign\" value=\"LT\">\n");
		document.write(wmode + "\n");
		document.write("<param name=\"menu\" value=\"false\">\n");
		document.write("<embed src=\"lib/client/" + swfName + "?lzproxied=false\" quality=\"high\" scale=\"noscale\" salign=\"LT\"" + embedWmode + " width=\"" + width + "\" height=\"" + height + "\" onmouseover=\"expandPicStrip();\" onmouseout=\"collapsePicStrip();\" menu=\"false\" id=\"pictureStripEmbed\" " + (organismTypeAndId > 0 ? "FlashVars=\"organismId=" + organismTypeAndId + "\"" : "FlashVars=\"articleId=" + featuredArticleId + "\"") + "FlashVars=\"organismId=" + organismTypeAndId + "\"/>\n");
		document.write("</object>\n");
	}
	else
	{
		if(height > 500) height = 521;
		else height = 480;
		document.write("<div style=\"height: 100%;padding: 200px 30px 50px 30px;background-image: URL('design/images/picturestrip_" + height + "_imitation.png');\">");
		document.write("Du trenger en nyere versjon av Adobe Flash Player for &aring; se bildene i bildestripen.\nG&aring; til <a href=\"http://www.adobe.com/go/getflashplayer\">nedlastingssiden for Flash player</a>.");
		document.write("</div>");
	}
}
/*
<embed src="/map/flash/varsel_13.swf" quality="high" bgcolor="#ffffff" width="370" height="387" name="varsel01" align="middle" 
                                    allowScriptAccess="sameDomain" type="application/x-shockwave-flash" 
                                    pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="mapLevel=1&cropId=-1&pestId=-1&weatherStationId=-1&tcpPort=80&baseURL=vips.planteforsk.no"/> 
*/




