
var imagenes_ar = new Array();
imagenes_ar[1] = {"imgs": 
						new Array("imagenes/represor.jpg","imagenes/soldados.jpg","imagenes/uocra.jpg"),
				  "etis":
				  		new Array("Foto: Ex represor Miguel Etchecolatz","Foto: Soldados","Foto: Uocra"),
				  "punt":
				  		0 }
function cambiarImagen( IdReproductor, Posicion ){
	//alert("IdReproductor: " + IdReproductor + " Posicion: " + Posicion + " Url: " + imagenes_ar[IdReproductor][Posicion] );
	var imagen_repro = document.getElementById("imagen_id_"+IdReproductor);
	imagen_repro.src = imagenes_ar[IdReproductor]["imgs"][Posicion];
	var etiqueta = document.getElementById("etiqueta_id_"+IdReproductor);
	etiqueta.innerHTML = imagenes_ar[IdReproductor]["etis"][Posicion];
	var enlace = document.getElementById("enlace_imagen_id"+IdReproductor+"_"+imagenes_ar[IdReproductor]["punt"]);
	enlace.className = "";
	imagenes_ar[IdReproductor]["punt"] = Posicion;
	enlace = document.getElementById("enlace_imagen_id"+IdReproductor+"_"+imagenes_ar[IdReproductor]["punt"]);
	enlace.className = "seleccionado";
}
function anteriorImagen( IdReproductor ){
	var punteroImagen = imagenes_ar[IdReproductor]["punt"];
	punteroImagen --;
	if ( punteroImagen < 0 ){
		punteroImagen = imagenes_ar[IdReproductor]["imgs"].length - 1;
	}
	cambiarImagen( IdReproductor, punteroImagen );
}
function siguienteImagen( IdReproductor ){
	var punteroImagen = imagenes_ar[IdReproductor]["punt"];
	punteroImagen ++;
	if ( punteroImagen >= imagenes_ar[IdReproductor]["imgs"].length ){
		punteroImagen = 0;
	}
	cambiarImagen( IdReproductor, punteroImagen );
}

function ampliarFoto( id ){
	$( '#dialog' ).dialog('close');
	var ruta = document.getElementById("imagen_id_"+id).src;
	var titulo = $("#foto_title_id_"+id ).attr("alt");
	var ventana = document.getElementById("dialog");
	ventana.innerHTML = "<center><img src='"+ruta+"' /><p>"+titulo+"</p></center>";
	$( "#dialog" ).dialog( "option", "title", "Foto ampliada" );
	$( '#dialog' ).dialog( "option", "position", 'top' );
	$( '#dialog' ).dialog('open');
}
function ampliarFotoBreves( id ){
	$( '#dialog' ).dialog('close');
	var ruta = $("#imgbreve_id_"+id ).attr("ruta");
	var titulo = $("#titulobreve_id_"+id ).attr("alt");
	var ventana = document.getElementById("dialog");
	ventana.innerHTML = "<center><img src='"+ruta+"' /><p>"+titulo+"</p></center>";
	$( "#dialog" ).dialog( "option", "title", "Foto ampliada" );
	$( '#dialog' ).dialog( "option", "position", 'top' );
	$( '#dialog' ).dialog('open');
}
      $(function() {
            	

				// Dialog			
				$('#dialog').dialog({
					autoOpen: false,
					resizable: false,
					width: 'auto',
					zIndex:3999,
					buttons: {}
				});
				// Dialog Link
				$('#dialog_link').click(function(){
					$('#dialog').dialog('open');
					return false;
				});

            	
				$("#amazon_scroller2").amazon_scroller({
                    scroller_title_show: 'true',
                    scroller_time_interval: '5000',
                    scroller_window_background_color: "none",
                    scroller_window_padding: '10',
                    scroller_border_size: '0',
                    scroller_border_color: '#CCC',
                    scroller_images_width: '100',
                    scroller_images_height: '80',
                    scroller_title_size: '12',
                    scroller_title_color: 'black',
                    scroller_show_count: '2',
                    directory: 'img'
                });
                	

            });
            
            
            
			function publicarPopup(){
				URL = "sociales/publicar.php";
				ancho = "310";
				alto = "270";
				H = Number(screen.height - Number(ancho)) / 2;
				L = Number(screen.width - Number(alto)) / 2; 

				pop_up = window.open(URL,"PopupPublicar","status=yes,scrollbars=no,resizable=no,height="+alto+",width="+ancho+",top="+H+",left="+L);
			}

