// JavaScript Document

function cambiaSeccion(arg){

	var miIframe = document.getElementById('contenido');

	switch (arg){

		case 'Gallery Artists':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'gallery_artist.php';
			break;
			
		case 'News':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'news.php';
			break;
			
		case 'Publications':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'publications.php';
			break;
			
		case 'Press':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'press.php';
			break;
			
		case 'Contact Us':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'contactus.php';
			break;
			
		case 'blank':
			//Cambia el tamaño
			miIframe.width = 1;
			miIframe.height = 1;
			//Carga la página
			contenido.location.href = 'about:blank';
			break;
			
		case 'Gallery Info 1':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			//contenido.location.href = 'gallery_info.php?id=1';
			contenido.location.href = 'gallery_info_general.php';
			break;
			
		case 'Gallery Info 2':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'gallery_info.php?id=2';
			break;
			
		case 'Gallery Info 3':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'gallery_info.php?id=3';
			break;
			
		case 'Gallery Info 4':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'gallery_info.php?id=4';
			break;
			
		case 'Exhibitions 1':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=1';
			break;
			
		case 'Exhibitions 3':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=3';
			break;
			
		case 'Upcoming 4':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=4';
			break;
			
		case 'Upcoming 5':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=5';
			break;
			
		case 'Upcoming 6':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=6';
			break;
			
		case 'Upcoming 7':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=7';
			break;
			
		case 'Current 4':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=8';
			break;
			
		case 'Current 5':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=9';
			break;
			
		case 'Current 6':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=10';
			break;
			
		case 'Current 7':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'select_city.php?id=11';
			break;
			
		case 'Graphics 1':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'graphics_about.php';
			break;
			
		case 'Graphics 2':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'graphics_artists.php';
			break;
			
		case 'newyork':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'exhibitions_select.php?city=newyork';
			break;
			
		case 'miamiponce':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'exhibitions_select.php?city=miami_leon';
			break;
			
		case 'miamiwynwood':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'exhibitions_select.php?city=miami_wynwood';
			break;
			
		case 'bsasarenales':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'exhibitions_select.php?city=bsas_are';
			break;
			
		case 'bsasarroyo':
			//Cambia el tamaño
			miIframe.width = 477;
			miIframe.height = 270;
			//Carga la página
			contenido.location.href = 'exhibitions_select.php?city=bsas_arr';
			break;

	}
}

//Imagen al pie
var imagenes = new Array("detalle2","detalle5","detalle1","detalle4","detalle6");

var actual = 0;

function rotaImagenes(){
	var cual = document.getElementById('miBody');

	cual.className = imagenes[actual];

	if(actual == (imagenes.length-1)){
		actual = 0;
	} else {
		actual++;
	}
}

function cicloImagenes(){
	window.setInterval(rotaImagenes,10000);
}
