// JavaScript Document
function DoNote(N) {
ShowNote(N);
audioStop();
var A = eval('document.note_'+N.id);
//alert(A);
//A.play();
audioPlay(A);
}

function ShowNote(N) {
// put all notes to normal first
HideNotes()
// now show the set note
N.src="guitar-tuner-files/kbd-w-selected.gif";
}

function HideNotes() {
c0.src="guitar-tuner-files/kbd-w.gif";
d0.src="guitar-tuner-files/kbd-w.gif";
e0.src="guitar-tuner-files/kbd-w.gif";
f0.src="guitar-tuner-files/kbd-w.gif";
g0.src="guitar-tuner-files/kbd-w.gif";
a0.src="guitar-tuner-files/kbd-w.gif";
b0.src="guitar-tuner-files/kbd-w.gif";
c1.src="guitar-tuner-files/kbd-w.gif";
d1.src="guitar-tuner-files/kbd-w.gif";
e1.src="guitar-tuner-files/kbd-w.gif";
f1.src="guitar-tuner-files/kbd-w.gif";
g1.src="guitar-tuner-files/kbd-w.gif";
a1.src="guitar-tuner-files/kbd-w.gif";
b1.src="guitar-tuner-files/kbd-w.gif";
c2.src="guitar-tuner-files/kbd-w.gif";
d2.src="guitar-tuner-files/kbd-w.gif";
e2.src="guitar-tuner-files/kbd-w.gif";


}

function audioStop(){
document.note_c0.stop();
document.note_d0.stop();
document.note_e0.stop();
document.note_f0.stop();
document.note_g0.stop();
document.note_a0.stop();
document.note_b0.stop();
document.note_c1.stop();
document.note_d1.stop();
document.note_e1.stop();
document.note_f1.stop();
document.note_g1.stop();
document.note_a1.stop();
document.note_b1.stop();
document.note_c2.stop();
document.note_d2.stop();
document.note_e2.stop();
}

function audioPlay(A){
   if(audioOn){
      if (A != null){
            if (navigator.appName == 'Netscape') A.play();
            else{
               if (document.M == null){
                  document.M = false; var m;
                  for(m in A) if (m == "ActiveMovie"){
                     document.M = true; break;
                     }
                  }
               if (document.M) A.SelectionStart = 0;
               if (document.M) A.play();
            }
      }
   }
}
