function ShowVideo(VideoName) { 
  window.open("news/news-vplayer.html?videofile="+VideoName,"VideoPlayer","scrollbars=yes,resizable=yes,width=420,height=440");
}

function ShowPict(PictName) { 
  window.open("other/other-picture.html?picfile="+PictName,"Viewer","scrollbars=yes,resizable=yes,width=1000,height=600");
}

function ShowPhoto(PhotoName,Leng) { 
   window.open("gallery/gallery-photo.html?file="+PhotoName+"&leng="+Leng,"PhotoViewer","scrollbars=yes,resizable=yes,width=800,height=600");
}


//------------------------------- functions -------------------

function DefVideo( leng,imagen,titulo,fecha,descr,video, alink ){
	
if (leng=='en')  { txMsg='See video online (broadband recommended)'; txTop='top'; txSee='See video directly at website';} 
			else { txMsg='Ver video (conexi&oacute;n de banda ancha recomendada)'; txTop='arriba'; txSee='Ver video directamente en website'}
if (video=='') 	 { txVideo=''; } 
			else { txVideo='<a href="#" onclick="javascript:ShowVideo(\''+video+'\');">'+txMsg+'</a>';}
if (alink=='') 	 { txLink=''; } 
			else { txLink='<a href="'+alink+'" target="_blank">'+txSee+'</a>';}

document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>');
document.write('      <td width="220" align="center"><img src="'+imagen+'" width="144" height="147" /></td>');
document.write('      <td><p class="titles">');
document.write(titulo+'<br />');
document.write('        <span class="highlights">'+fecha+'</span>  </p>');
document.write('        <p>'+descr+'</p>');
document.write('        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bookfooter"><tr>');
document.write('              <td width="21"><img src="images/logo-video.gif" width="21" height="21" /></td>');
document.write('              <td>'+txVideo+'</td>');
document.write('              <td>'+txLink+'</td>');
document.write('              <td align="right"><img src="images/ico-top.gif" width="21" height="21" /></td>');
document.write('              <td width="15" align="left"><a href="#top">'+txTop+'</a></td>');
document.write('    	</tr></table>');
document.write('      </td>')
document.write('</tr></table>');
}


function DefOther( leng,imagen,titulo,fecha,descr,nfile,tipo,alink ){
	
icon = (tipo=='pdf') ? 'images/logo-pdf.gif' : 'images/logo-photo.gif';	
if (leng=='en') { txIcon=(tipo=='pdf')?'Download Article':'See Article';                  txOn='See Online';   txTop='top'; } 
           else { txIcon=(tipo=='pdf')?'Descargar Art&iacute;culo':'Ver Art&iacute;culo'; txOn='Ver en linea'; txTop='arriba'; } 
txHref = (tipo=='pdf') ? nfile:"javascript:ShowPict('"+nfile+"');";
txOnline = (alink=="") ? " ": '<a href="'+alink+'" target="_blank">'+txOn+'</a>';
txIconIe = (alink=="") ? " ": '<img src="images/logo-ie.gif" width="21" height="21" />';

document.write('<tr><td height="30" colspan="2"><a name="other-label" id="other-label"></a></td></tr>');
document.write('<tr>');
document.write('  <td colspan="2">');
document.write('     <table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('     <tr>');
document.write('  		  <td width="220"><img src="'+imagen+'" alt="'+titulo+'" /></td>');
document.write('          <td><p><span class="titles">'+titulo+'<br />'+fecha+'</span></p>');
document.write('              <p>'+descr+'</p>');
document.write('              <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bookfooter">');
document.write('              <tr>');
document.write('                   <td width="21"><img src="'+icon+'" alt="see document" width="21" height="21" /> </td>');
document.write('                   <td width="140"><a href="'+txHref+'"  target="_blank">'+txIcon+'</a></td>');
document.write('                   <td width="15" align="center">|</td>');
document.write('                   <td width="21">'+txIconIe+'</td>');
document.write('                   <td width="140">'+txOnline+'</td>');
document.write('                   <td align="right"><img src="images/ico-top.gif" alt="arrow go to top" width="21" height="21" /></td>');
document.write('                   <td width="15" align="left"><a href="#top">'+txTop+'</a></td>');
document.write('              </tr>');
document.write('              </table></td>');
document.write('      </tr>');
document.write('      </table></td>');
document.write('</tr>');
}

function DefNews(leng, fecha, imagen,titulo,descr,nfile,tipo,alink ){
	DefOther( leng,imagen,titulo,fecha,descr,nfile,tipo,alink );
}
