// In this section we set up the content to be placed dynamically on the page.
// Customize movie tags and alternate html content below.
// MAUI
if (fpiPID == 53) {
	flashPageName = 'stories-maui.swf';
}
// MOLOKAI 
else if (fpiPID == 54) {
	flashPageName = 'stories-molokai.swf';
}
// KAUAI 
else if (fpiPID == 48) {
	flashPageName = 'stories-kauai.swf';
}
// LANAI 
else if (fpiPID == 52) {
	flashPageName = 'stories-lanai.swf';
}
// BIG ISLAND 
else if (fpiPID == 50) {
	flashPageName = 'stories-big_island.swf';
}
else if (fpiPID == 26) {
	flashPageName = 'stories-oahu.swf';
}
if (!useRedirect) {    // if dynamic embedding is turned on
  if(hasRightVersion) {  // if we've detected an acceptable version
    var oeTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'
+ 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'
+ 'width="800" height="320" id="main" align="middle">'
+ '<param name="allowScriptAccess" value="sameDomain" />'
+ '<param name="movie" value="' + fpiPath + '/swf/' + flashPageName +'" />'
+ '<param name="quality" value="high" />'
+ '<param name="wmode" value="transparent" />'
+ '<embed src="' + fpiPath + '/swf/' + flashPageName+ '" quality="high" wmode="transparent" width="800" height="320"'
+ 'name="main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"'
+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
+ '</embed>'
+ '</object>';

    document.write(oeTags);   // embed the flash movie
  } else {  // flash is too old or we can't detect the plugin
    // NOTE: height, width are required!
    var alternateContent = '<IMG SRC="' + fpiPath + '/images/noFlash.jpg" HEIGHT="320" WIDTH="800" border="0" useMap="#noFlash">';

    document.write(alternateContent);  // insert non-flash content
  }
}