function Attach(tid,tname,pos,genre)
{
	var winAttach = window.open("upload_sample.asp?tid=" + tid + "&tname=" + tname + "&pos=" + pos + "&genre=" + genre,"","width=425,height=220,top,top=" + ((screen.height/2)-215) + ",left=" + ((screen.width/2)-175) + ",scrollbars=no");

}
function AddSong(pos,genre)
{
	var winSong = window.open("Select_Track.asp?pos=" + pos + "&genre=" + genre,"winSong","width=350,height=430,top,top=" + ((screen.height/2)-215) + ",left=" + ((screen.width/2)-175) + ",scrollbars=yes");
}
function switchTrack(pos1, pos2)
{
	document.frmTop10.action = "Top_Ten_Switch.asp";
	document.frmTop10.switch1.value=pos1;
	document.frmTop10.switch2.value=pos2;
	document.frmTop10.submit();
}
function Modifier(TrackID,pos,genre){
	var winAttach = window.open("Modifier_Sample.asp?TrackID=" + TrackID + "&pos=" + pos + "&genre=" + genre,"","width=250,height=220,top,top=" + ((screen.height/2)-215) + ",left=" + ((screen.width/2)-175) + ",scrollbars=yes");
}
var winSample = '';
var prevSong;
/***********************************************
* 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="" //path to sound file, or pass in filename directly into playsound()

function playsound(soundfile, nom){
if (prevSong != nom && document.all && document.getElementById){
//alert(prevSong + " et " + nom);
if(prevSong){document.images(prevSong).src="_img/ecouter.jpg"}; //reset first in case of problems
document,prevSong = nom;
document.images(nom).src="_img/ecouter_stop.jpg" //reset first in case of problems
document.getElementById("soundeffect").src="" //reset first in case of problems
document.getElementById("soundeffect").src=soundfile

}else{
	//alert(prevSong + " et " + nom);
	prevSong='';
	document.images(nom).src="_img/ecouter.jpg" //reset first in case of problems
	document.getElementById("soundeffect").src="" //reset first in case of problems
}
}

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
}
}