/***********************************************
* JavaScript Sound effect- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

var soundfile="sidebar.wav" //path to sound file, or pass in filename directly into playsound()

function playsound(soundfile){
if (document.all && document.getElementById){
document.getElementById("soundeffect").src="" //reset first in case of problems
document.getElementById("soundeffect").src=soundfile
}
}

function bindsound(tag, soundfile, masterElement){
if (!window.event) return

var source=event.srcElement

while (source!=masterElement && source.tagName!="HTML"){
  if (source.tagName==tag.toUpperCase()){
     playsound(soundfile)
     break
  }
  source=source.parentElement
  }
}


function ClickSound()
{

 if (document.all)
 {
     playsound(soundfile)
 }
 else
 { 
     EvalSound('sound1')
 }

}



function EvalSound(soundobj) {
  var thissound= eval("document."+soundobj);
  thissound.Play();
}


