


function WriteFlash(base_url) {
  // Version check based upon the values entered above in "Globals"
  var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
  
  // Check to see if the version meets the requirements for playback
  if (hasReqestedVersion) {  // if we've detected an acceptable version
    document.getElementById('noflash-notify-wrapper').style.display = 'none';
    document.getElementById('pagewrapper').style.display = 'none';
    
    base_url_flash='/'; //Having a url in the query string on the enetica server causes a 401 otherwise : base_url_flash=base_url;
      var oeGallerytag = '<center style="background:url(\'images/loading.gif\') no-repeat center;">'
	   +'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="766" height="750" wmode="transparent">'
    +'<param name="movie" value="flash/main3.swf?pagesfile='+base_url_flash+'xml.php%3Fdo%3Dpages&cssfile='+base_url_flash+'css/flash.css"> '
    +'<param name="quality" value="high">'
    +'<param name="wmode" value="transparent">'
    +'<param name="menu" value="false">'
    +'<!--[if !IE]> <-->'
    +'<object data="flash/main3.swf?button=0&pagesfile='+base_url_flash+'xml.php%3Fdo%3Dpages&cssfile='+base_url_flash+'css/flash.css"  width="766" height="750" type="application/x-shockwave-flash" wmode="transparent">'
    +' <param name="quality" value="high">'
    +' <param name="wmode" value="transparent">'
    +' <param name="menu" value="false">'
    +' <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">'
    +' Please install flash player to view this website <a href="http://www.macromedia.com/go/getflashplayer">http://www.macromedia.com/go/getflashplayer</a>'
    +'</object>'
   +' <!--> <![endif]-->'
   +'</object>'
  +'</center>';
      
       document.write(oeGallerytag);   
      // embed the Flash Content SWF when all tests are passed

    } else {  // flash is too old or we can't detect the plugin
      var alternateContent = '';
      document.write(alternateContent);  // insert non-flash content
      var oeBrandtag = '';
  }
  
}
