
/*Generate a random number between 0 and max.*/

var rNum=NaN;
function randomNum(max) {
  while (isNaN(rNum)) {
    rNum=Math.floor(Math.random()*(max))
  }
  return rNum;
}

var sound = new Array
sound[0]= "../schemes/PeWspirit1.mp3"
sound[1]= "../schemes/PeWspirit2.mp3"
sound[2]= "../schemes/HEMtrees1.mp3"
sound[3]= "../schemes/HEMtrees2.mp3"
sound[4]= "../schemes/HEMtrees3.mp3"
sound[5]= "../schemes/HEMtrees4.mp3"
sound[6]= "../schemes/2112something4nothing.mp3"
sound[7]= "../schemes/PeWfreewill1.mp3"
sound[8]= "../schemes/PeWfreewill2.mp3"
sound[9]= "../schemes/PeWfreewill3.mp3"
sound[10]= "../schemes/AF2Kxanadu1.mp3"
sound[11]= "../schemes/AF2Kxanadu2.mp3"
sound[12]= "../schemes/AF2Kxanadu3.mp3"
sound[13]= "../schemes/COSbastille1.mp3"
sound[14]= "../schemes/COSbastille2.mp3"
sound[15]= "../schemes/COSbastille3.mp3"
sound[16]= "../schemes/FBNbytor1.mp3"
sound[17]= "../schemes/FBNbytor2.mp3"
sound[18]= "../schemes/FBNbytor3.mp3"
sound[19]= "../schemes/FBNbytor4.mp3"
sound[20]= "../schemes/FBNanthem.mp3"
sound[21]= "../schemes/AF2Kcloser2heart1.mp3"
sound[22]= "../schemes/AF2Kcloser2heart2.mp3"
sound[23]= "../schemes/2112overture1.mp3"
sound[24]= "../schemes/2112overture2.mp3"
sound[25]= "../schemes/2112overture3.mp3"
sound[26]= "../schemes/HEMstrangiato1.mp3"
sound[27]= "../schemes/HEMstrangiato2.mp3"
sound[28]= "../schemes/HEMstrangiato3.mp3"
sound[29]= "../schemes/HEMstrangiato4.mp3"
sound[30]= "../schemes/FBNflybynight.mp3"
sound[31]= "../schemes/DEBUTfindingmyway1.mp3"
sound[32]= "../schemes/DEBUTfindingmyway2.mp3"
sound[33]= "../schemes/DEBUTfindingmyway3.mp3"
sound[33]= "../schemes/PoWbigmoney1.mp3"
sound[34]= "../schemes/PoWbigmoney2.mp3"
sound[35]= "../schemes/PoWbigmoney3.mp3"
sound[36]= "../schemes/MPredbarchetta.mp3"
sound[37]= "../schemes/SIGsubdivisions1.mp3"
sound[38]= "../schemes/SIGsubdivisions2.mp3"
sound[39]= "../schemes/HYFtimestandstill.mp3"
sound[40]= "../schemes/PoWmystic1.mp3"
sound[41]= "../schemes/PoWmystic2.mp3"
sound[42]= "../schemes/SIGanalogkid1.mp3"
sound[43]= "../schemes/SIGanalogkid2.mp3"
sound[44]= "../schemes/GUPdew.mp3"
sound[45]= "../schemes/PoWmarathon.mp3"
sound[46]= "../schemes/GUPbodyelectric.mp3"
sound[47]= "../schemes/HYFmission1.mp3"
sound[48]= "../schemes/HYFmission2.mp3"
sound[49]= "../schemes/MPlimelight.mp3"
sound[50]= "../schemes/GUPrsa1.mp3"
sound[51]= "../schemes/GUPrsa2.mp3"
sound[52]= "../schemes/SIGnwman.mp3"
sound[53]= "../schemes/MPtomsawyer1.mp3"
sound[54]= "../schemes/MPtomsawyer2.mp3"
sound[56]= "../schemes/MPtomsawyer3.mp3"
sound[57]= "../schemes/HYFforceten1.mp3"
sound[58]= "../schemes/HYFforceten2.mp3"


/*Begin Sound Player Script*/
   soundFile=sound[randomNum(sound.length)]
/*Decide whether to use embed or bgsound.*/
   if (navigator.appName.indexOf('Microsoft')>=0) {
      document.writeln ('<bgsound src="'+soundFile+' " loop="0">')
   }else{
      document.writeln ('<embed src="'+soundFile+'" hidden=true autostart=true loop=false >')
}
