var stage1="";
var stage2="";
var stage3="";

function playBgMusic(){
    createjs.Sound.play("fondumusica0", {loop:-1});
}
function playDialog(dialog){
	stopAllAudio();
	switch (dialog){
        case "dialogo1_b1":
            playSound("d1_b1");
            break;
        case "dialogo1_b2":
            playSound("d1_b2");
            break;
        case "dialogo1_b3":
            playSound("d1_b3");
            break;
        case "dialogo2_b1":
            playSound("d2_b1");
            break;
        case "dialogo2_b2":
            playSound("d2_b2");
            break;
        case "dialogo2_b3":
            playSound("d2_b3");
            break;
        case "dialogo3_b1":
            playSound("d3_b1");
            break;
        case "d3_informationquestions":
            playSound("d4_b1");
            break;
        case "d3_what":
            playSound("what");
            break;
        case "d3_who":
            playSound("who");
            break;
        case "d3_where":
            playSound("where");
            break;
        case "d3_which":
            playSound("which");
            break;
        case "d3_when":
            playSound("when");
            break;
        case "d3_why":
            playSound("why");
            break;
        case "d3_how":
            playSound("how");
            break;
        case "d3_whose":
            playSound("whose");
            break;
        case "d3_howmany":
            playSound("howmany");
            break;
        case "d3_howoften":
            playSound("howoften");
            break;
        case "d3_YesNoQuestion":
            playSound("yesnoquestion");
            break;
        case "d3_final":
            playSound("d3final");
            break;
        case "dialogo4_b1":
            playSound("d4_b1");
            break;
        case "dialogo4_b3":
            playSound("d4_b3");
            break;
        case "dialogo4_b4":
            playSound("d4_b4");
            break;
        case "dialogo5_b1":
            playSound("d5_b1");
            break;
        case "dialogo5_b2":
            playSound("d5_b2");
            break;
        case "dialogo5_b3":
            playSound("d5_b3");
            break;
        case "dialogo5_b4":
            playSound("d5_b4");
            break;
        case "dialogo5_b5":
            playSound("d5_b5");
            break;
        case "dialogo5_b6":
            playSound("d5_b6");
            break;
        case "dialogo5_b7":
            playSound("d5_b7");
            break;
        case "dialogo5_b8":
            playSound("d5_b8");
            break;
        case "dialogo5_b9":
            playSound("d5_b9");
            break;
        case "dialogo6_b1":
            playSound("d6_b1");
            break;
		case "dialogo6_b2":
            playSound("d6_b2");
            break;
		case "dialogo6_b3":
            playSound("d6_b3");
            break;
		case "dialogo6_b4":
            playSound("d6_b4");
            break;
        case "dialogo7_b1":
            playSound("d7_b1");
            break;
                default: 
			playSound("d1_b1");   
    }
}

function stopAllAudio(){
	createjs.Sound.stop("d1_b1");
	createjs.Sound.stop("d1_b2");
    createjs.Sound.stop("d1_b3");
    createjs.Sound.stop("d2_b1");
	createjs.Sound.stop("d2_b2");
    createjs.Sound.stop("d2_b3");
    createjs.Sound.stop("d3_b1");
    createjs.Sound.stop("d4_b1");
    createjs.Sound.stop("d5_b1");
    createjs.Sound.stop("d6_b1");
    createjs.Sound.stop("d7_b1");

}