/**
 * Scripts for Candy Flesh Lite
 */

function setPlayerWithoutAutoStart() {
	AudioPlayer.setup("swf/player.swf", {
	    width: 400,  
	    initialvolume: 50,  
	    transparentpagebg: "yes",
		animation: "no",
		autostart: "no",
		loop: "no",
		left: "000000",  
	    lefticon: "FFFFFF",
		loader: "999999"
	});
}

function setPlayerAutoStart(){
	AudioPlayer.setup("swf/player.swf", {
		width: 400,  
	    initialvolume: 50,  
	    transparentpagebg: "yes",
		animation: "no",
		autostart: "yes",
		loop: "no",
		left: "000000",  
	    lefticon: "FFFFFF",
		loader: "999999"
    });
}

function loadTrack(track){
	setPlayerAutoStart();
	var titleToPlayMp3 = "";
	var titleToPlay = "";
	switch (track) {
			case 1:
				titleToPlayMp3 = "01TasteLikeHoney";
				titleToPlay = "Taste like honey";
				break;
			case 2:
				titleToPlayMp3 = "02FunnyHolly";
				titleToPlay = "Funny Holly";
				break;
			case 3:
				titleToPlayMp3 = "03TheVoice";
				titleToPlay = "The voice";
				break;
			case 4:
				titleToPlayMp3 = "04KillerInYou";
				titleToPlay = "Killer in you";
				break;
			case 5:
				titleToPlayMp3 = "05Jessica";
				titleToPlay = "Jessica";
				break;
			case 6:
				titleToPlayMp3 = "06Alice";
				titleToPlay = "Alice";
				break;
			case 7:
				titleToPlayMp3 = "07BabyDoll";
				titleToPlay = "Baby doll";
				break;
			case 8:
				titleToPlayMp3 = "08DeadBorn";
				titleToPlay = "Dead born";
				break;
			case 9:
				titleToPlayMp3 = "09Desire";
				titleToPlay = "Desire";
				break;
			case 10:
				titleToPlayMp3 = "10Mistake";
				titleToPlay = "Mistake";
				break;
			case 11:
				titleToPlayMp3 = "11Laurore";
				titleToPlay = "L'aurore";
				break;
			case 12:
				titleToPlayMp3 = "12Burry";
				titleToPlay = "Burry";
				break;
			default:
				titleToPlayMp3 = "01TasteLikeHoney";
				titleToPlay = "Taste like honey";
		}
	AudioPlayer.embed("playerDiv", {
		soundFile: "mp3/" + titleToPlayMp3 + ".mp3", 
		titles: titleToPlay,
		artists: "Candy Flesh"
	});
}

function goTo(url) {
	window.open(url);
}

