// variables para la visualización de imágenes ampliadas
imagen = '';
tituloi = '';
extrasi = '';
anchoi = '';
altoi = '';

function abrir(pagina,tamano){
flotante=window.open(pagina,'flotante',tamano);
}

function abrir_img(im,ti,ex,ancho,alto){
imagen=im;
tituloi=ti;
extrasi=ex;
anchoi=ancho;
altoi=alto;
masAlto=alto+11;
features = "width="+ancho+",height="+masAlto;
window.open("/motor/common/ver_imagen.htm",ancho+alto,features);
}

function abrir_video(im,ti,ancho,alto){
video=im;
titulovi=ti;
anchovi=ancho;
altovi=alto;
if (ancho == 0 ) ancho=300;
if (alto == 0 ) alto=10;
masAlto=alto+11+25;
features = "width="+ancho+",height="+masAlto; 
window.open("/common/ver_video.htm",ancho+alto,features);
}

// variables para controlar los navegadores
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);
var pantalla = null;

function CambiarFrame(url) {
    if (ie4) parent.fotoI.location.href = url;
	if (ns4) document.fotoLL.src = url;
    if (ns6) parent.document.getElementById("fotoI").src = url;
}

function DoPlayTele() {
// alert('Entre en Play'+' ns6: ' + ns6 + ' ie4: ' + ie4 + ' ns4: ' + ns4);
if (ie4) pantalla = document.win_tele;
if (ns4) pantalla = document.win_tele;
if ( pantalla != null ) {
pantalla.DoPlay();
}}

function DoPauseTele() {
// alert('Entre en Pause'+' ns6: ' + ns6 + ' ie4: ' + ie4 + ' ns4: ' + ns4);
if (ie4) pantalla = document.win_tele;
if (ns4) pantalla = document.win_tele;
if ( pantalla != null ) {
pantalla.DoPause();
}}

function DoStopTele() {
// alert('Entre en Stop'+' ns6: ' + ns6 + ' ie4: ' + ie4 + ' ns4: ' + ns4);
if (ie4) pantalla = document.win_tele;
if (ns4) pantalla = document.win_tele;
if ( pantalla != null ) {
pantalla.DoStop();
}}

function cambiaFoto(URLfoto,pie){
	if ((ie4) || (ns6)){
		var capa = document.getElementById('container');
		capa.style.visibility="hidden";
		capa.innerHTML = '<img src="'+ URLfoto +'">';
		capa.style.visibility="visible";
		var capa2 = document.getElementById('container2');
		capa2.style.visibility="hidden";
		capa2.innerHTML = '<b>'+pie+'</b>';
		capa2.style.visibility="visible";
 	} else {
		var tmp="<img src='"+ URLfoto +"'>";
		var tmp2='<b>'+pie+'</b>';
		eval('document.layers[\'container\'].document.write("<div id=foto>'+tmp+'</div>")');
		eval('document.layers[\'container2\'].document.write("<div id=foto2>'+tmp2+'</div>")');
		document.close();
}}
