<!-- 

function abrePopup(pagina,w,h) {
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl;
	winPopup = window.open(pagina,'winPopup',settings);
	winPopup.focus();
}

function abrirPopUp(nombreVentana,ancho,alto,nombre) {
    var wventana;
	var window_height = alto;
	var window_width = ancho;
	var window_left = (screen.availWidth / 2) - (window_width / 2);
	var window_top = (screen.availHeight / 2) - (window_height /2);
	var window_dimensions = "scrollbars=no,status=no,height=" + window_height + ",width=" + window_width + ",left=" + window_left + ",top=" + window_top;
	

	wventana = window.open(nombreVentana,'tres',window_dimensions);
	
	return wventana;
}

function abrirPopUpImg(url,ancho,alto,tipo) {

	//Determinamos el tamaño de la ventana
	
	var window_width=ancho;
	var window_height=alto;
	/*if (url=='noimg.jpg'){
		window_width='165';
		window_height='100';
	}*/

     // Creamos la ventana con las dimensiones de la imagen y centrada
	var window_left = (screen.availWidth / 2) - (window_width / 2);
	var window_top = (screen.availHeight / 2) - (window_height /2);
    var window_dimensions = "width=" + window_width + ",height=" + window_height + ",left=" + window_left + ",top=" + window_top;
    new_window = window.open("","TRES",window_dimensions)
   
    // Escritura de las etiquetas HTML
    new_window.document.writeln('<html>')
    new_window.document.writeln('<head>')
    new_window.document.writeln('<title>:: TRES ::')
    new_window.document.writeln('<\/title>')
	new_window.document.writeln('<style type="text/css">a:link{font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color:#4D4333;text-decoration:none;}a:visited{font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color:#4D4333;text-decoration:none;}a:hover{font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color:#4D4333;text-decoration:underline;}</style>')
    new_window.document.writeln('<\/head>')
    
    // Nos aseguramos de que no tenemos márgenes antiestéticos
    new_window.document.writeln('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">')
    
    // Creamos la etiqueta <img> para la imagen
	new_window.document.writeln('<table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr><td valign=middle>')
	new_window.document.writeln('<table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr><td valign=middle>')
    new_window.document.writeln('<div align="center"><img src="../images/upload/' + tipo + '/' + url + '" align="center" ></div>')
	//Enlace de cerrar ventana
    new_window.document.writeln('<div align="center"><a href="javascript:window.close();">Tancar</a></div>')
	new_window.document.writeln('</td></tr></table>')
	new_window.document.writeln('</td></tr></table>')
    // Finalizar
    new_window.document.writeln('<\/body>') 
    new_window.document.writeln('<\/html>') 
    new_window.document.close()
	
}

function irAEs() {
	tmp=document.location.href;
	if(tmp.indexOf("/cat/")!=-1){
		tmp=tmp.replace("/cat","/esp");
	}
	
	document.location=tmp;
}

function irACt() {
	tmp=document.location.href;
	if(tmp.indexOf("/cat/")==-1){
		//tmp="/en"+tmp;
		tmp=tmp.replace("/esp/","/cat/");
	}
	document.location=tmp;
}
-->
