// JavaScript Document

function abrirImagen (URL){
   window.open(URL,"ventana1","width=540,height=640,scrollbars=NO")
}

function abrirImagenPhp (URL){
   window.open(URL,"ventana1","width=540,height=540,scrollbars=NO")
}

function imagen_pop (img_path, popwidth, popheight, descripcion_img){
	var color_fondo_pop="#CCCCCC"
	var titulo="Imagen blasten.com"

	function detectar_existente(obj){
		return (typeof obj !="undefined")
	}

	function pop_img(img_path, popwidth, popheight, descripcion_img){

	function posicion(){
		izquierda_=(detectar_existente(window.screenLeft))?
		screenLeft+document.body.clientWidth/2-popwidth/2 :
		detectar_existente(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
		superior_=(detectar_existente(window.screenTop))?
		screenTop+document.body.clientHeight/2-popheight/2 :
		detectar_existente(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
		if (window.opera){
			izquierda_-=screenLeft
			superior_-=screenTop
		}
	}

	posicion()
	var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,left='+izquierda_+',top='+superior_
	var contenido=(color_fondo_pop.indexOf(".")!=-1)?'background="'+color_fondo_pop+'"' : 'bgcolor="'+color_fondo_pop+'"'
	if (typeof pop_ventana=="undefined" || pop_ventana.closed){
		pop_ventana=window.open("","",winattributes)
	}else{
		pop_ventana.resizeTo(popwidth, popheight+30)
	}
	pop_ventana.document.open()
	pop_ventana.document.write('<html><title>'+titulo+'</title><body '+contenido+'><img src="'+img_path+'" style="margin-bottom:0.5em"<br>'+descripcion_img+'</body></html>')
	pop_ventana.document.close()
	pop_ventana.focus()
	}
}