// Funcion para abrir ventanas centradas

function IrA(opcion) {
    switch (opcion) {
	 case "INI": 
//	   window.open("index.html", "_self");
	   window.location.href="index.asp";	   
	   break;
	 case "GAL":   
	   window.location.href="galerias.asp";
	   break;
	 case "MUES":   
	   window.location.href="muestras.asp";
	   break;
	 case "PROD":   
	   window.location.href="producciones.asp";
	   break;
	 case "QUIEN":   
	   window.location.href="quienes.asp";
	   break;
	 case "LINK":   
	   window.location.href="link.asp";
	   break;
	 case "CUADROS":   
	   window.location.href="cuadros.asp";
	   break;
	 case "FOTOS":   
	   window.location.href="fotos.asp";
	   break;
	 case "DIAPO":   
	   window.location.href="diaporamas.asp";
	   break;
	 case "CONT":   
	   alert("Disculpe las molestias, estamos trabajando");
	   break;		
// --------------------------------------------------------------------------------
// ------------------------------------------------------------[G A L E R I A S]---
// --------------------------------------------------------------------------------

// ---------------------------------------------------------------[VALLE LUNA 2010]---
     case "GAL_VALLELUNA_IMG":   
	   abrirVentana("ValleLuna2010/index.html","",900,550,",resizable");
	   break;
     case "GAL_VALLELUNA_VIAJE":   
	   abrirVentana("ValleLuna2010Viaje/index.html","",900,550,",resizable");
	   break;
	   
// ---------------------------------------------------------------[HUECHULAFQUEN]---
     case "GAL_PAIMUN_IMG":   
	   abrirVentana("Paimun/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAIMUN_VIAJE":   
	   abrirVentana("Paimun viaje/index.html","",900,550,",resizable");
	   break;
// ------------------------------------------------------------------------[PAISAJES]---
     case "GAL_PAI_ALUMINE":   
	   abrirVentana("Paisajes/Alumine/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_CAVIAHUE":   
	   abrirVentana("Paisajes/Caviahue/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_CURRUHUE":   
	   abrirVentana("Paisajes/Curruhue/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_PUEL":   
	   abrirVentana("Paisajes/Lagunas Puel/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_LONCO":   
	   abrirVentana("Paisajes/Lonco Luan/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_MOQUEHUE":   
	   abrirVentana("Paisajes/Moquehue/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_NONTHUE":   
	   abrirVentana("Paisajes/Nonthue/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_PAIMUN":   
//	   abrirVentana("Paisajes/Paimun/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_PPINOS":   
	   abrirVentana("Paisajes/Primeros Pinos/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_PULMARI":   
	   abrirVentana("Paisajes/Pulmari/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_QUILLEN":   
	   abrirVentana("Paisajes/Quillen/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_RUCA":   
	   abrirVentana("Paisajes/Ruca Choroi/index.html","",900,550,",resizable");
	   break;
     case "GAL_PAI_TRAFUL":   
	   abrirVentana("Paisajes/Traful/index.html","",900,550,",resizable");
	   break;

// -----------------------------------------------------------------[RECUADROS]---
     case "GAL_REC_IMG":   
	   abrirVentana("Recuadros/index.html","",900,550,",resizable");
	   break;
// --------------------------------------------------------------------------------
// ----------------------------------------------------[P R O D U C C I O N E S]---
// --------------------------------------------------------------------------------

// ---------------------------------------------------------------[Festival Mas Alla]---
     case "DOCU_EL_ANDEN_IMG":   
	   abrirVentana("ElAndenI/index.html","",900,550,",resizable");
	   break;

// ---------------------------------------------------------[AUDIENCIA MAPUCHE]---
     case "PROD_MAPU_AUD":   
	   	   window.location.href="prod_mapu_audiencia.asp";
	   break;
     case "PROD_MAPU_AUD_IMG":   
	   abrirVentana("Audiencia Mapuche/index.html","",900,550,",resizable");
	   break;

// ---------------------------------------------------------[RUCACHOROI - Valle]---
     case "PROD_MAPU":   
	   	   window.location.href="rucachoroi.asp";
	   break;
// ---------------------------------------------------------[RUCACHOROI - Valle]---
     case "Ruca_Valle_IMG":   
	   abrirVentana("rucaValle/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------[RUCACHOROI - Salon]---
     case "Ruca_Salon_IMG":   
	   abrirVentana("rucaSalon/index.html","",900,550,",resizable");
	   break;
// -----------------------------------------------------[RUCACHOROI - TRREMPAIN]---
     case "Ruca_TRREMPAIN_IMG":   
	   abrirVentana("rucaTRREMPAIN/index.html","",900,550,",resizable");
	   break;
// ----------------------------------------------------------[RUCACHOROI - Leņa]---
     case "Ruca_Lena_IMG":   
	   abrirVentana("rucaLena/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------[RUCACHOROI - CALFIQUITRA]---
     case "Ruca_CALFIQUITRA_IMG":   
	   abrirVentana("rucaCALFIQUITRA/index.html","",900,550,",resizable");
	   break;
	   

// ---------------------------------------------------[OT Hablemos de la pareja]---
     case "OT_pareja_IMG":   
	   abrirVentana("OT hablemos de la pareja/index.html","",900,550,",resizable");
	   break;

// ----------------------------------------------------[OT Desgracia con Suerte]---
     case "OT_desgracia_IMG":   
	   abrirVentana("OT desgracia con suerte/index.html","",900,550,",resizable");
	   break;

// -------------------------------------------------------------------[PINTURAS]---
     case "PROD_PINTURAS_IMG":   
	   abrirVentana("PinturasTela/index.html","",900,550,",resizable");
	   break;
// -------------------------------------------------------------------[ATADITOS]---
     case "PROD_ATADITOS_IMG":   
	   abrirVentana("Ataditos/index.html","",900,550,",resizable");
	   break;
// -------------------------------------------------------------------[CIRUELA]---
     case "PROD_CIRUELA_IMG":   
	   abrirVentana("Ciruela/index.html","",900,550,",resizable");
	   break;
// -------------------------------------------------------------------[EMBARAZO]---
     case "PROD_EMBARAZO_IMG":   
	   abrirVentana("Embarazo/index.html","",900,550,",resizable");
	   break;
// -----------------------------------------------------[XXIII Encuentro Mujer]---
     case "PROD_23ENCMUJ_IMG":   
	   abrirVentana("EncuentroNacionalMujerXXIII/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------------[FLOR DE LIS]---
     case "PROD_REVUELTA_IMG":   
	   abrirVentana("Sin Sosten/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------------[FLOR DE LIS]---
     case "PROD_FLORLIS_IMG":   
	   abrirVentana("Flor de Lis/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------------[RIDICULADY]---
     case "PROD_RIDICULADY_IMG":   
	   abrirVentana("Ridiculady/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------------[CHOCOS BLUES]---
     case "PROD_CHOCOSBLUES_IMG":   
	   abrirVentana("Chocos Blues/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------[CONCIERTO AMI 2009]---
     case "PROD_CONCIERTO_AMI09":   
	   window.location.href="music_conciertoAMI09.asp";
	   break;
     case "PROD_CONCAMI09_220_IMG":   
	   abrirVentana("ConcAMI09_220/index.html","",900,550,",resizable");
	   break;
     case "PROD_CONCAMI09_BC_IMG":   
	   abrirVentana("ConcAMI09_BC/index.html","",900,550,",resizable");
	   break;
     case "PROD_CONCAMI09_NORMA_IMG":   
	   abrirVentana("ConcAMI09_norma/index.html","",900,550,",resizable");
	   break;
     case "PROD_CONCAMI09_GARCIA_IMG":   
	   abrirVentana("ConcAMI09_garcia/index.html","",900,550,",resizable");
	   break;
     case "PROD_CONCAMI09_WENDY_IMG":   
	   abrirVentana("ConcAMI09_wendy/index.html","",900,550,",resizable");
	   break;
     case "PROD_CONCAMI09_ROCKE_IMG":   
	   abrirVentana("ConcAMI09_rocke/index.html","",900,550,",resizable");
	   break;
     case "PROD_CONCAMI09_MALEN_IMG":   
	   abrirVentana("ConcAMI09_malen/index.html","",900,550,",resizable");
	   break;
     case "PROD_CONCAMI09_JEREZ_IMG":   
	   abrirVentana("ConcAMI09_jerez/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------------[EXPRESION CF]---
     case "PROD_EXPRESIONCF_IMG":   
	   abrirVentana("expresionCF/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------------[FIESTA PANICA]---
     case "PROD_FIESTAPANICA_IMG":   
	   abrirVentana("fiesta Panica/index.html","",900,550,",resizable");
	   break;
	   

// --------------------------------------------------------------------------------
// ------------------------------------------------------------[M U E S T R A S]---
// --------------------------------------------------------------------------------

// -------------------------------------------------------------------------[BARRO]---	   
     case "MUES_BARRO":   
	   window.location.href="muestra_barro.asp";
	   break;
     case "MUES_BARRO_IMG":   
	   abrirVentana("barro/index.html","",900,550,",resizable");
	   break;


// ---------------------------------------------------------------[Intervencion - Vuelta al Perro]---
     case "TOTEM_intervencion":   
	   window.location.href="muestra_totem.asp";
	   break;
     case "TOTEM_intervencion_fotos":   
	   abrirVentanaScrollRet('totem/index.html', '', 900, 550);
	   break;

// ---------------------------------------------------------------[OSDE - Travesia]---
     case "OSDE_travesia":   
	   window.location.href="muestra_travesia.asp";
	   break;
     case "OSDE_travesia_fotos":   
	   abrirVentanaScrollRet('MuestraTravesia/index.html', '', 900, 550);
	   break;


// ---------------------------------------------------------------[FotoPerformance]---
     case "VGD":   
	   window.location.href="muestra_vgd.asp";
	   break;
     case "VGD_dig":   
	   abrirVentanaScrollRet('vgdDig/index.html', '', 900, 550);
	   break;
     case "vgd_BW":   
	   abrirVentanaScrollRet('vgdBW/index.html', '', 900, 550);
	   break;
      case "vgd_ret":   
	   abrirVentanaScrollRet('vgdRet/index.html', '', 900, 550);
	   break;
     case "vgd_devolucion":   
	   abrirVentanaScrollRet('vgd/devolucion.asp', '', 700, 600);
	   break;
	   

// ---------------------------------------------------------------[TALERO 2010]---
      case "Talero":   
	   window.location.href="muestra_talero.asp";
	   break;
      case "talero_laPampa":   
	   abrirVentanaScrollRet('torreTaleroPampa/index.html', '', 900, 550);
	   break;
      case "talero_museo":   
	   abrirVentanaScrollRet('torreTaleroMuseo/index.html', '', 900, 550);
	   break;

// ---------------------------------------------------------------[STEFANI 2010]---
      case "Stefani":   
	   window.location.href="muestra_stefani.asp";
	   break;
      case "Stefani_nota":   
	   abrirVentanaScrollRet('stefani/nota.asp', '', 700, 600);
	   break;
      case "Stefani_fotos":   
	   abrirVentanaScrollRet('stefani_sv/index.html', '', 900, 550);
	   break;
      case "Stefani_muestra":   
	   abrirVentanaScrollRet('stefani_muestra/index.html', '', 900, 550);
	   break;


// ---------------------------------------------------------------[CONRADO 2010]---
      case "LocosCuerdos":   
	   window.location.href="muestra_locosCuerdos.asp";
	   break;
     case "FestConr_2010_IMG":   
	   abrirVentana("FestivalConrado/index.html","",900,550,",resizable");
	   break;
     case "MUES_2009_IMG_MUES":   
	   abrirVentana("Taller2009/Muestra Fotos/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------------[CONRADO 2010]---
      case "FestConr_2010":   
	   window.location.href="muestra_FestConrado2010.asp";
	   break;
     case "FestConr_2010_IMG":   
	   abrirVentana("FestivalConrado/index.html","",900,550,",resizable");
	   break;
     case "MUES_2009_IMG_MUES":   
	   abrirVentana("Taller2009/Muestra Fotos/index.html","",900,550,",resizable");
	   break;

// ---------------------------------------------------------------[MUESTRA 2009]---
      case "MUES_2009":   
	   window.location.href="muestra_2009.asp";
	   break;
     case "MUES_2009_IMG":   
	   abrirVentana("Taller2009/Fertilizame/index.html","",900,550,",resizable");
	   break;
     case "MUES_2009_IMG_MUES":   
	   abrirVentana("Taller2009/Muestra Fotos/index.html","",900,550,",resizable");
	   break;


// ---------------------------------------------------------------[MARCHA MAPUCHE]---
      case "MUES_MARCHA_MAPUCHE":   
	   window.location.href="muestra_marcha_mapuche.asp";
	   break;
     case "MUES_MARCHA_MAPUCHE_IMG":   
	   abrirVentana("MarchaMapuche/index.html","",900,550,",resizable");
	   break;

// ---------------------------------------------------------------[INTERCULTURAL]---
      case "MUES_INTERCULTURAL":   
	   window.location.href="muestra_intercultural.asp";
	   break;
     case "MUES_INTERCULTURAL_FOTO_IMG":   
	   abrirVentana("Barrio Intercultural/index.html","",900,550,",resizable");
	   break;
      case "MUES_INTERCULT_ADOBE":   
	   window.location.href="muestra_intercult_barro.asp";
	   break;
     case "MUES_INTERCULT_ADOBE_FOTO_IMG":   
	   abrirVentana("Barrio Intercultural Adobe/index.html","",900,550,",resizable");
	   break;

// ---------------------------------------------------------------[CASINO MAGIC]---
     case "MUES_CASINO_IMG":   
	   abrirVentana("ConcursoCasinoMagic/fotos/index.html","",900,550,",resizable");
	   break;
     case "MUES_CASINO_PREM":   
	   abrirVentana("ConcursoCasinoMagic/Concurso/index.html","",900,550,",resizable");
	   break;


// ---------------------------------------------------------------[MUESTRA HOMENAJE]---
      case "MUES_HOMENAJE":   
	   window.location.href="muestra_homenaje.asp";
	   break;
     case "MUES_HOMENAJE_FOTO_IMG":   
	   abrirVentana("Muestra Homenaje/fotos/index.html","",900,550,",resizable");
	   break;
     case "MUES_HOMENAJE_MUESTRA_IMG":   
	   abrirVentana("Muestra Homenaje/Muestra/index.html","",900,550,",resizable");
	   break;


// ---------------------------------------------------------------[CARLOS FUENTEALBA]---
     case "MUES_CARLOSFUENTEALBA2_I_IMG":   
	   abrirVentana("FuentealbaII/index.html","",900,550,",resizable");
	   break;
// ---------------------------------------------------------------[CARLOS FUENTEALBA]---
     case "MUES_CARLOSFUENTEALBA":   
	   window.location.href="muestra_carlosfuentealba.asp";
	   break;
     case "MUES_CF_ABRIL2007_IMG":   
	   abrirVentana("CarlosFuentealba/Abril 2007/index.html","",900,550,",resizable");
	   break;
     case "MUES_CF_MAYO2007_IMG":   
	   abrirVentana("CarlosFuentealba/Mayo 2007/index.html","",900,550,",resizable");
	   break;
     case "MUES_CF_6MESES_IMG":   
	   abrirVentana("CarlosFuentealba/Seis Meses/index.html","",900,550,",resizable");
	   break;
     case "MUES_CF_ANIVERSARIO_IMG":   
	   abrirVentana("CarlosFuentealba/Aniversario/index.html","",900,550,",resizable");
	   break;
     case "MUES_CF_INICIOJUICIO_IMG":   
	   abrirVentana("CarlosFuentealba/Inicio del Juicio/index.html","",900,550,",resizable");
	   break;
     case "MUES_AMI_CF_IMG":   
	   abrirVentana("CarlosFuentealba/AMI Carlos Fuentealba/index.html","",900,550,",resizable");
	   break;
     case "MUES_CF_SENTENCIA_IMG":   
	   abrirVentana("CarlosFuentealba/Sentencia/index.html","",900,550,",resizable");
	   break;


// -------------------------------------------------------------------[BARCELONA]---
     case "MUES_BARCELONA":   
	   window.location.href="muestra_barcelona.asp";
	   break;
     case "MUES_BAR_CHALLACO":   
	   abrirVentana("barcelona/CHALLACO - Vivir para Vivir/index.html","",900,550,",resizable");
	   break;
     case "MUES_BAR_UNIV":   
	   abrirVentana("barcelona/Universidad Challaco/index.html","",900,550,",resizable");
	   break;
     case "MUES_BAR_COMUNIDAD":   
	   abrirVentana("barcelona/Pueblos Originarios/index.html","",900,550,",resizable");
	   break;
     case "MUES_BAR_TEATRO":   
	   abrirVentana("barcelona/Obras de Teatro/index.html","",900,550,",resizable");
	   break;
     case "MUES_BAR_FABRICA":   
	   abrirVentana("barcelona/Recuperando lo Nuestro/index.html","",900,550,",resizable");
	   break;

// -------------------------------------------------------------------------[RAGIKO]---	   
     case "MUES_RAGIKO":   
	   window.location.href="muestra_ragiko.asp";
	   break;
     case "MUES_RAGIKO_IMG":   
	   abrirVentana("Ragiko/index.html","",900,550,",resizable");
	   break;

// --------------------------------------------------------------------------------
// --------------------------------------------------------[D I A P O R A M A S]---
// --------------------------------------------------------------------------------

// ---------------------------------------------------------------------[TALERO]---
     case "DIAPO_TALERO":   
   	    abrirVentanaScrollRet('diapo_Talero.asp', '', 800, 650)
	   break;
// --------------------------------------------------------------------[STEFANI]---
     case "DIAPO_STEFANI":   
   	    abrirVentanaScrollRet('stefani.asp', '', 700, 600)
	   break;
// --------------------------------------------------------------------[RAZONES]---
     case "DIAPO_RAZONES":   
   	    abrirVentanaScrollRet('razones.asp', '', 700, 600)
	   break;
// ------------------------------------------------------------------------[HOY]---
     case "DIAPO_HOY":   
   	    abrirVentanaScrollRet('hoy.asp', '', 700, 600)
	   break;
// ------------------------------------------------------------------[EL MOSCON]---
     case "DIAPO_MOSCON":   
   	    abrirVentanaScrollRet('elMoscon.asp', '', 700, 600)
	   break;
// -------------------------------------------------------------------[ANGUSTIA]---
     case "DIAPO_ANGUSTIA":   
   	    abrirVentanaScrollRet('angustia.asp', '', 700, 600)
	   break;
// -------------------------------------------------------------------[ANGUSTIA]---
     case "DIAPO_BARRO":   
   	    abrirVentanaScrollRet('barro.asp', '', 700, 600)
	   break;

// --------------------------------------------------------------------------------
// -------------------------------------------------------[F O T O S  A U T O R]---
// --------------------------------------------------------------------------------

// ------------------------------------------------------------------[POR FECHA]---
     case "AUTOR_X_FECHA":   
   	    window.location.href='autorxfecha.asp';
	   break;


	   
	 default:
	    window.location.href=opcion;	 
	}	
}


function abrirVentana(url, name, width, height,adic) {
  var win;
  var str = "status=no,scrollbars=no,height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
	str += adic;
  }
  return window.open(url, name, str);
}

function abrirVentanaScroll(url, name, width, height) 
{
  var str = "scrollbars=yes, height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  window.open(url, name, str);
}

function abrirVentanaScrollRet(url, name, width, height) 
{
  var str = "scrollbars=yes, height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  return window.open(url, name, str);
}

function abrirDialogo(win, pagina, ancho, alto)
{
  return win.showModalDialog(pagina,'', 'center:yes;dialogWidth:' + ancho.toString() + ';dialogHeight:' + alto.toString());
}


function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage 	== undefined) {
		return;
	}
	var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}

