// flash_hero.js
// Gavin Leader
// Ascentium Corporation
// 2-16-2006

// This script writes html code to embed the Flash Hero images for the Office 2007 preview pages

// Important information:
// 1) In order to work properly, the script assumes that "productName" has been declared earlier in the pages' script
// 2) There is an intro scene in the flash document that is bypassed if the user is navigating between tabs on the same product. Thus,
//      the script looks for "showIntro=n" in the page's query string.

function showIntro()
{
    var queryString = window.location.search;
    var parsedQueryString = queryString.split("=");
    if (parsedQueryString[1] == "n")
	return true;
    else
        return false;
}

if (showIntro())
    productName += "&amp;showIntro=n";
	
	//alert("Testing: "+productName);

document.writeln("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='578' height='180' id='o12' align='middle'>");
document.writeln("<param name='allowScriptAccess' value='sameDomain' />");
document.writeln("<param name='flashVars' value='productName=" + productName + "' />");
document.writeln("<param name='movie' value='/poland/office/office2007/media/subpage.swf' />");
document.writeln("<param name='menu' value='false' />");
document.writeln("<param name='quality' value='high' />");
document.writeln("<param name='bgcolor' value='#ffffff' />");
document.writeln("<embed src='/poland/office/office2007/media/subpage.swf' flashVars='productName=" + productName + "' quality='high'   menu='false' bgcolor='#ffffff' width='578' height='180' name='o12' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.writeln("</object>");