var dia1=[				
		{
        "escenario": "Azucena",
        "dia": "7",
        "bandas": 
		[
				{
					"img": "./img/d0/0.jpg",
					"url": "https://www.gigatron.biz/",
					"hora": "16:00-16:50",
					"bandID": "d1e1g1",
					"bandName": "Gigatron",
					"madrugada":"false"
				},
				{
					"img": "./img/d0/1.jpg",
					"url": "http://www.medinaazahara.es/",
					"hora": "16:00-16:50",
					"bandID": "d1e1g2",
					"bandName": "Medina Azahara",
					"madrugada":"false"
				},
				{
					"img": "./img/d0/2.jpg",
					"url": "https://facebook.com/OkerBand",
					"hora": "17:05-17:55",
					"bandID": "d1e1g3",
					"bandName": "Oker",
					"madrugada":"false"
				},
				{
					"img": "./img/d0/3.jpg",
					"url": "https://www.rosendo.es",
					"hora": "18:10-19:00",
					"bandID": "d1e1g4",
					"bandName": "Rosendo",
					"madrugada":"false"
				},
				{
					"img": "./img/d0/4.jpg",
					"url": "http://www.sepultura.com.br/",
					"hora": "19:15-20:15",
					"bandID": "d1e1g5",
					"bandName": "Sepultura",
					"madrugada":"false"
				},
				{
					"img": "./img/d0/5.jpg",
					"url": "https://www.facebook.com/pages/THE-STORM/195172290542334",
					"hora": "20:30-21:40",
					"bandID": "d1e1g6",
					"bandName": "Storm",
					"madrugada":"false"
				}
			]
		}
	];

var dia2=[				
		{
        "escenario": "Azucena",
        "dia": "7",
        "bandas": [
				{
					"img": "./img/d1/e1/1.jpg",
					"url": "http://www.backyardbabies.com/",
					"hora": "16:00-16:50",
					"bandID": "d1e1g1",
					"bandName": "Backyard Babies",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e1/2.jpg",
					"url": "http://www.destruction.de/",
					"hora": "17:05-17:55",
					"bandID": "d1e1g2",
					"bandName": "Destruction",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e1/3.jpg",
					"url": "https://metalcrusade.org",
					"hora": "18:10-19:00",
					"bandID": "d1e1g3",
					"bandName": "DEATH DTA Tours",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e1/4.jpg",
					"url": "http://www.gammaray.org/",
					"hora": "19:15-20:15",
					"bandID": "d1e1g4",
					"bandName": "Gamma Ray",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e1/5.jpg",
					"url": "http://www.obusrock.com/",
					"hora": "20:30-21:40",
					"bandID": "d1e1g5",
					"bandName": "Obus",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e1/6.jpg",
					"url": "http://wreckingcrew.com/",
					"hora": "23:00-00:30",
					"bandID": "d1e1g6",
					"bandName": "Overkill",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e1/7.jpg",
					"url": "http://www.sabaton.net/",
					"hora": "23:00-00:30",
					"bandID": "d1e1g6",
					"bandName": "Sabaton",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e1/8.jpg",
					"url": "http://sonataarctica.info/",
					"hora": "23:00-00:30",
					"bandID": "d1e1g6",
					"bandName": "Sonata Arctica",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e1/9.jpg",
					"url": "http://vitaimana.com/",
					"hora": "23:00-00:30",
					"bandID": "d1e1g6",
					"bandName": "Vita Imana",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e1/10.jpg",
					"url": "http://www.within-temptation.com/",
					"hora": "23:00-00:30",
					"bandID": "d1e1g6",
					"bandName": "Within Temptation",
					"madrugada":"false"
				},
			]
		},
		{
			"escenario": "Mark Reale",
			"dia": "7",
			"bandas": 
			[
				{
					"img": "./img/d1/e2/1.jpg",
					"url": "http://www.bluespills.com",
					"hora": "21:40-23:00",
					"bandID": "d1e2g1",
					"bandName": "Blues Pills",
					"madrugada":"false"
				},
				{
					"img": "./img/d1/e2/2.jpg",
					"url": "http://www.chinobanzai.de",
					"hora": "00:30-1:50",
					"bandID": "d1e2g2",
					"bandName": "Chino Banzai",
					"madrugada":"true"
				},
				{
					"img": "./img/d1/e2/3.jpg",
					"url": "http://www.doriaoficial.com",
					"hora": "2:05-3:05",
					"bandID": "d1e2g3",
					"bandName": "Döria",
					"madrugada":"true"
				},
				{
					"img": "./img/d1/e2/4.jpg",
					"url": "http://www.jorgesalan.com/",
					"hora": "3:20-4:30",
					"bandID": "d1e2g4",
					"bandName": "Jorge Sal&aacute;n",
					"madrugada":"true"
				},
				{
					"img": "./img/d1/e2/5.jpg",
					"url": "http://www.facebook.com/kataklysm",
					"hora": "3:20-4:30",
					"bandID": "d1e2g5",
					"bandName": "Kataklysm",
					"madrugada":"true"
				},
				{
					"img": "./img/d1/e2/6.jpg",
					"url": "http://www.operamagna.net/",
					"hora": "3:20-4:30",
					"bandID": "d1e2g6",
					"bandName": "Opera Magna",
					"madrugada":"true"
				},
				{
					"img": "./img/d1/e2/7.jpg",
					"url": "http://www.rosanegra.info/",
					"hora": "3:20-4:30",
					"bandID": "d1e2g7",
					"bandName": "Rosa Negra",
					"madrugada":"true"
				},
				{
					"img": "./img/d1/e2/8.jpg",
					"url": "http://www.facebook.com/TopoOficial",
					"hora": "3:20-4:30",
					"bandID": "d1e2g8",
					"bandName": "Topo",
					"madrugada":"true"
				},
				{
					"img": "./img/d1/e2/9.jpg",
					"url": "http://www.vilband.com/",
					"hora": "3:20-4:30",
					"bandID": "d1e2g9",
					"bandName": "V.I.L",
					"madrugada":"true"
				}
			]
		}
	];
var dia3=[
	{
        "escenario": "Azucena",
        "dia": "8",
        "bandas": [
						{
							"img": "./img/d2/e1/1.jpg",
							"url": "http://www.albertorionda.net/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g1",
							"bandName": "Alquimia",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e1/2.jpg",
							"url": "http://www.doromusic.de/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g2",
							"bandName": "Doro",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e1/3.jpg",
							"url": "http://www.edguy.net/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g3",
							"bandName": "V.I.L",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e1/4.jpg",
							"url": "http://www.orphaned-land.com/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g4",
							"bandName": "Orphaned Land",
							"madrugada":"true"
						},	
						{
							"img": "./img/d2/e1/5.jpg",
							"url": "http://www.edguy.net/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g5",
							"bandName": "V.I.L",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e1/6.jpg",
							"url": "http://www.refuge-band.de/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g6",
							"bandName": "Refuge",
							"madrugada":"true"
						},
					{
							"img": "./img/d2/e1/6.jpg",
							"url": "http://www.refuge-band.de/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g6",
							"bandName": "Refuge",
							"madrugada":"true"
						},
					{
							"img": "./img/d2/e1/6.jpg",
							"url": "http://www.refuge-band.de/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g6",
							"bandName": "Refuge",
							"madrugada":"true"
						},
					{
							"img": "./img/d2/e1/7.jpg",
							"url": "https://www.facebook.com/rockiconsone",
							"hora": "3:20-4:30",
							"bandID": "d2e1g7",
							"bandName": "Rock Icons",
							"madrugada":"true"
						},
					{
							"img": "./img/d2/e1/8.jpg",
							"url": "https://www.facebook.com/thedarknessofficial",
							"hora": "3:20-4:30",
							"bandID": "d2e1g8",
							"bandName": "The Darkness",
							"madrugada":"true"
						},
					{
							"img": "./img/d2/e1/9.jpg",
							"url": "http://www.tierrasantarock.com/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g9",
							"bandName": "Tierra Santa",
							"madrugada":"true"
						},
					{
							"img": "./img/d2/e1/10.jpg",
							"url": "http://www.turisas.com/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g10",
							"bandName": "Turisas",
							"madrugada":"true"
						},
					{
							"img": "./img/d2/e1/11.jpg",
							"url": "http://www.warcry.as/",
							"hora": "3:20-4:30",
							"bandID": "d2e1g11",
							"bandName": "Warcry",
							"madrugada":"true"
						},
				]		
	},					
	{
				"escenario": "Mark Reale",
        "dia": "8",
        "bandas": [
						{
							"img": "./img/d2/e2/1.jpg",
							"url": "http://www.angelwitchcoven.com/",
							"hora": "3:20-4:30",
							"bandID": "d2e2g1",
							"bandName": "Angel Witch",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e2/2.jpg",
							"url": "http://www.gruposasfalto.com/",
							"hora": "3:20-4:30",
							"bandID": "d2e2g2",
							"bandName": "Asfalto",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e2/3.jpg",
							"url": "http://www.azraelmetal.com/",
							"hora": "3:20-4:30",
							"bandID": "d2e2g3",
							"bandName": "Azrael",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e2/4.jpg",
							"url": "http://www.celtibeerian.com/",
							"hora": "3:20-4:30",
							"bandID": "d2e2g4",
							"bandName": "Celtibeerian",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e2/5.jpg",
							"url": "http://www.fleshgodapocalypse.com/",
							"hora": "3:20-4:30",
							"bandID": "d2e2g5",
							"bandName": "Fleshgod Apocalypse",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e2/6.jpg",
							"url": "http://www.freedom-call.net/",
							"hora": "3:20-4:30",
							"bandID": "d2e2g6",
							"bandName": "Freedom Call",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e2/7.jpg",
							"url": "http://www.recklesslove.com/",
							"hora": "3:20-4:30",
							"bandID": "d2e2g7",
							"bandName": "Reckless Love",
							"madrugada":"true"
						},
						{
							"img": "./img/d2/e2/8.jpg",
							"url": "https://www.facebook.com/pages/Zarpa/137989763334/",
							"hora": "3:20-4:30",
							"bandID": "d2e2g8",
							"bandName": "Zarpa",
							"madrugada":"true"
						},
						{
					
							"img": "./img/d2/e2/9.jpg",
							"url": "http://www.zenobia.org/",
							"hora": "3:20-4:30",
							"bandID": "d2e2g9",
							"bandName": "Zenobia",
							"madrugada":"true"
						},
				]
	}
];
var dia4=[{},{}];

var diaGrupos=[dia1,dia2,dia3,dia4];
$(document).ready(function(){
	generaTabla(0);
});	
function generaTabla(dia)
{
	var res="";			
	if(diaGrupos[dia].length==1)
	{
		$("#controls").hide();
	}
	for(var i=0;i<diaGrupos[dia].length;i++)
	{
		res+="<div class='borderTable'>";
		res+="<table style='position:relative;width:80%;' id='grupos' align=center>";
		var bandas=diaGrupos[dia][i].bandas;
		console.log(bandas);
		for(var j=0;j<bandas.length;j++)
		{			
			res+="<tr>";
			res+="<td  align=right>";
				res+="<img src='"+bandas[j].img+"' width='90%'/>";
			res+="</td>";
			res+="<td>";
					res+="<ul>";
					res+="<li style='width:50%;'>";
						// dia,escenario,grupo
						//res+="<alarm id='"+(vDia)+":"+i+":"+j+"'>";
						res+="<img src='./img/bell.png'  class='appBtn' />";
						//res+="</alarm>";
					res+="</li>";
					
					res+="<li>";
						res+="<a href='"+bandas[j].url+"' class='iconTable'>";
							res+="<img src='./img/earth.png' class='appBtn' />";
						res+="</a>";
					res+="</li>";
					res+="</ul>";
			res+="</td>";
			res+="</tr>";
			res+="<tr>";
			res+="<td colspan='2' align='center' class='bandTime'>";
			res+=bandas[j].hora;
			res+="</td>";
			res+="</tr>";
			
		}
		res+="</table>";		
		res+="</div>";
		$("#bands"+i).html(res);
		
		res="";
	}			
}