// JavaScript Document
function openPicture(ruta,title,text,lang)
{
if (!text) text ='';
rutaLang =(!lang)? '../' : '' ;
my_window= window.open("","Gallery","status=0,resizable=1,width=500,height=550, scrollbars=yes,top=5,left=5");
//alert(ruta);
src=ruta.replace("-thumb","");
code = '<html><head><title>'+title+'</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="'+rutaLang+'css/general.css"><meta http-equiv="Page-Enter" content="blendTrans(Duration=1.0)"></head>';
table='<table width="10%" border="0" cellspacing="0" cellpadding="0" align="left"><tr><td align="left"><img src='+src+' ></td></tr><tr><td  align="center" background="'+rutaLang+'images/menu/sup-menu_r2_c1.gif" class="gallery_text" style="padding:2px 2px 2px 2px; ">'+text+'</td></tr></table>';
my_window.document.write(code+'<body topmargin="0" leftmargin="0">'+table+'</body>');
//setTimeout("FitPic(my_window);",1000);
setTimeout("FitPic(my_window);",3000);
setTimeout("FitPic(my_window);",8000);
setTimeout("FitPic(my_window);",14000);
}
function FitPic(theWindow) { 
       iWidth = theWindow.document.images[0].width+30 ; 
	   iHeight = theWindow.document.images[0].height+80 ;  
	   if(iHeight > 550) iHeight = 550; 
       theWindow.resizeTo(iWidth, iHeight);
      // self.focus(); 
     }
