// +----------------------------------------------+ //
// |  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 = 3;
var songindx = 'song2=';

// +-------------------------+
// | Audio Switch 2: Archive |
// +-------------------------+

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/pf-abitw.mid"; 
               alts = "Another Brick in the Wall by Pink Floyd"; 
               break;
          case 2: 
               auds = "http://www.kongaloid.org/src/audio/pf-outhr.mid"; 
               alts = "Is there Anybody Out There? by Pink Floyd"; 
               break;
          case 3: 
               auds = "http://www.kongaloid.org/src/audio/pf-ggsky.mid"; 
               alts = "The Great Gig in the Sky by Pink Floyd";  
               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);">Another Brick in the Wall</a><br/>';
     ctxt += '<a href="javascript:switchaudio(2);">Is there Anybody Out There?</a><br/>';
     ctxt += '<a href="javascript:switchaudio(3);">The Great Gig in the Sky</a><br/>';
     ctxt += '<a href="javascript:switchaudio(0);">QUIET MODE (Audio Off)</a><br/>';
     oid.innerHTML = ctxt;
     }


