
// --- Programming and Code Copyright Notice:
// Developed by LCC Enterprises, 2008
// Contains original JavaScript programming code
// ©2008 by LCC Enterprises.   All rights reserved.
// ---
// This installation under license for use by The Barefoot Hawaiian.

// --- Description:
// Inserts the audio controls (activex & plugins) into the Multi-media Audio Frame 

// -------------------------------------------------------------------------


// Insert Audio
//   This function inserts the Quicktime Audio Script into the web page 
//   to play a specific audio file
// -------------------------------------------------------------------------
  function insertAudio(audioFileSuffixName) {
    var QTaudioFileName    = "multimedia/audiovideofiles/BHI_Audio_"+audioFileSuffixName+".mp3";
    var QTposterMovie      = "audiovideofiles/BHI_AudioPoster.mov";
    var QTautoplayvalue    = "true";
    var QTcontrolWidth     = "120";
    var QTcontrolHeight    = "20";
    document.writeln ('<div align="center">');
    document.writeln ('    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"');
    document.writeln ('            width="'+QTcontrolWidth+'"');
    document.writeln ('            height="'+QTcontrolHeight+'"');
    document.writeln ('            align="middle"');
    document.writeln ('            codebase="http://www.apple.com/qtactivex/qtplugin.cab"');
    document.writeln ('            >');
    document.writeln ('          <param name="volume" value="255">');
    document.writeln ('          <param name="bgcolor" value="black">');
    document.writeln ('          <param name="autoplay" value="'+QTautoplayvalue+'">');
    document.writeln ('          <param name="kioskmode" value="true">');
    document.writeln ('          <param name="controller" value="true">');
    document.writeln ('          <param name="src" value="'+QTaudioFileName+'">');
    document.writeln ('          <param name="target" value="myself">');
    document.writeln ('          <param name="saveembedtags" value="true">');
    document.writeln ('      <embed');
    document.writeln ('            width="'+QTcontrolWidth+'"');
    document.writeln ('            height="'+QTcontrolHeight+'"');
    document.writeln ('            align="middle"');
    document.writeln ('            type="video/quicktime"');
    document.writeln ('            volume="255"');
    document.writeln ('            bgcolor="black"');
    document.writeln ('            autoplay="'+QTautoplayvalue+'"');
    document.writeln ('            kioskmode="true"');
    document.writeln ('            controller="true"');
    document.writeln ('            src="'+QTaudioFileName+'"');
    document.writeln ('            pluginspage="http://www.apple.com/quicktime/download/"');
    document.writeln ('            target="myself"');
    document.writeln ('            saveembedtags="true"');
    document.writeln ('            >');
    document.writeln ('       </embed>');
    document.writeln ('    </object>');
    document.writeln ('</div>');
    return true;
  }





