// +----------------------------------------------+ //
// |  Copyright©2008, Steven Douglas Huddleston   | //
// |             All Rights Reserved              | //
// | No portion of this code can be copied, used, | //
// | published or reproduced in any way without   | //
// | the expressed written consent of the author. | //
// +----------------------------------------------+ //

var audiopreset = 1;
var songindx = 'song5=';

// +-------------------------------+
// | Audio Switch 5: Archive Index |
// +-------------------------------+

function switchaudio(audioselect) {

     if (audioselect) {
          document.cookie = "audio=1; path=/";
          document.cookie = songindx + audioselect + "; path=/";
          imgs = "http://www.kongaloid.org/src/img/audio1.gif";
          }
     else
          {
          document.cookie = "audio=0; path=/";
          imgs = "http://www.kongaloid.org/src/img/audio0.gif";
          }

     switch (audioselect) {
          case 1: 
               auds = "http://www.kongaloid.org/src/audio/c_brahms.mid"; 
               alts = "Cans & Brahms by Yes"; 
               break;
          case 2: 
               auds = "http://www.kongaloid.org/src/audio/dustwind.mid"; 
               alts = "Dust in the Wind by Kansas"; 
               break;
          case 3: 
               auds = "http://www.kongaloid.org/src/audio/onward.mid"; 
               alts = "Onward by Yes";  
               break;
          case 4: 
               auds = "http://www.kongaloid.org/src/audio/agnstwnd.mid"; 
               alts = "Against The Wind by Bob Seger";  
               break;
         default: 
              auds = ""; 
              alts = "Music Off";}

     document.getElementById('audio').src = auds;
     document.getElementById('audlf').src = imgs;
     document.getElementById('audrg').src = imgs;
     document.getElementById('audlf').alt = alts;
     document.getElementById('audrg').alt = alts;
     }

// +------------+
// | Audio Menu |
// +------------+

function selectaudio(oid) {
     ctxt = '<a href="javascript:switchaudio(1);">Cans & Brahms</a><br/>';
     ctxt += '<a href="javascript:switchaudio(2);">Dust in the Wind</a><br/>';
     ctxt += '<a href="javascript:switchaudio(3);">Onward</a><br/>';
     ctxt += '<a href="javascript:switchaudio(4);">Against The Wind</a><br/>';
     ctxt += '<a href="javascript:switchaudio(0);">QUIET MODE (Audio Off)</a><br/>';
     oid.innerHTML = ctxt;
     }

