<!--  
function View(title,p,i,max,upfile){
  document.open();
  var j;
  document.write('<table VALIGN="middle" ALIGN="CENTER" CLASS="t1b" border="0" width="700">');
  document.write('<tr>');
  document.write('   <td align="center" colspan="3"> &nbsp;'+title+'&nbsp;&nbsp;&nbsp;('+i+'/'+max+')</td>');
  document.write('</tr>');
  document.write('<tr>');
  document.write('   <td align="right"> &nbsp;');

  if (i>1) { 
    j=i-1;
    document.write('<a href="index.php?view=View('+"'"+title+"','"+p+"'"+','+j+','+max+','+"'"+upfile+"'"+')"><img src="img/left.gif" alt="poprzedni obraz" border="0"></img></a>');
   }
  document.write('</td>');

  document.write('   <td align="center"> &nbsp;<a href="index.php?view=Viewer('+"'"+title+"','"+p+"'"+','+max+','+"'"+upfile+"'"+')"><img src="img/up.gif" alt="cofnij się do góry" border="0"></img></a></td>');

  document.write('   <td align="left"> &nbsp;');
  if (i<max) {
    j=i+1;
    document.write('<a href="index.php?view=View('+"'"+title+"','"+p+"'"+','+j+','+max+','+"'"+upfile+"'"+')"><img src="img/right.gif" alt="następny obraz" border="0"></img></a>');
   }
  document.write('</td>');

  document.write('</tr>');
  document.write('</table>');

  document.write('<XML ID="napisy" SRC="'+p+'/'+'napisy.xml"></XML>');
  
  document.write('<table VALIGN="middle" ALIGN="CENTER" CLASS="t2" border="0" DATASRC="#napisy">');
  document.write('<tr>');
  document.write('	<td VALIGN="middle" ALIGN="CENTER" CLASS="t2b" >');
  document.write('<img src="'+p+'/'+i+'.jpg" alt="" border="1"></img>');
  document.write('	 </td>');
  document.write('</tr>');

  document.write('<tr>');
  document.write('	<td VALIGN="middle" ALIGN="CENTER" CLASS="t2b" >');
  document.write('<span DATAFLD="n'+i+'"></span>');
  document.write('	 </td>');
  document.write('</tr>');

  document.write('</table>');
  document.close();
  }
  

function Viewer(title,p,max,upfile){
  document.open();
  document.write('<table VALIGN="middle" ALIGN="CENTER" CLASS="t2" border="0">');
  document.write('<tr>');
  document.write('   <td colspan="2" VALIGN="middle" ALIGN="CENTER" CLASS="t2b" >');
  document.write('      &nbsp;'+title+'&nbsp;&nbsp;&nbsp;('+max+')');
  document.write('   </td>');
  document.write('</tr>');
  document.write('<tr><td colspan="2" align="center"> &nbsp;<a href="index.php?cat='+upfile+'"><img src="img/up.gif" alt="cofnij się do galerii" border="0"></img></a></td></tr>');
  document.write('</table>');

  document.write('<div align="center">');

  var i=1;
  for (i=1;i<=max;i++) {
    document.write('<a href="index.php?view=View('+"'"+title+"','"+p+"'"+','+i+','+max+','+"'"+upfile+"'"+')"><img src="'+p+'/m'+i+'.jpg" alt="" border="1"></img></a>&nbsp;');
   }

  document.write('</div>');
  document.close();
  }
  
function PlayAvi(title,name,upfile){
  document.open();
  document.write('<table VALIGN="middle" ALIGN="CENTER" border="0">');
  document.write('<tr>');
  document.write('   <td colspan="2" VALIGN="middle" ALIGN="CENTER" CLASS="t2b" >');
  document.write('      &nbsp;'+title);
  document.write('   </td>');
  document.write('</tr>');
  document.write('<tr><td colspan="2" align="center"> &nbsp;<a href="index.php?cat='+upfile+'"><img src="img/up.gif" alt="cofnij się do góry" border="0"></img></a></td></tr>');
  document.write('</table>');
  document.write('<table align="center">');
  document.write('<tr><td>');

  document.write('<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" height="480" width="640">');
  document.write('<param name="width" value="640" /><param name="height" value="480" /><param name="url" value="'+name+'" />');
  document.write('<embed height="575" src="foto/akm.avi" type="application/x-mplayer2" width="640"></embed>');
  document.write(' </object>');

  document.write('</td></tr>');
  document.write('</table>');
  }



function PlayYouTube(title,name,upfile){
  document.open();
  document.write('<table VALIGN="middle" ALIGN="CENTER" border="0">');
  document.write('<tr>');
  document.write('   <td colspan="2" VALIGN="middle" ALIGN="CENTER" CLASS="t2b" >');
  document.write('      &nbsp;'+title);
  document.write('   </td>');
  document.write('</tr>');
  document.write('<tr><td colspan="2" align="center"> &nbsp;<a href="index.php?cat='+upfile+'"><img src="img/up.gif" alt="cofnij się do góry" border="0"></img></a></td></tr>');
  document.write('</table>');
  document.write('<table align="center">');
  document.write('<tr><td>');
  //  document.write('<object>');
  document.write('<iframe title="YouTube video player" class="youtube-player" type="text/html" width="620" height="374" src="'+name+'" frameborder="0" allowFullScreen></iframe>');
  //  document.write('</object>');
  document.write('</td></tr>');
  document.write('</table>');
  }

function Vimeo(title,name,upfile){
  document.open();
  document.write('<table VALIGN="middle" ALIGN="CENTER" border="0">');
  document.write('<tr>');
  document.write('   <td colspan="2" VALIGN="middle" ALIGN="CENTER" CLASS="t2b" >');
  document.write('      &nbsp;'+title);
  document.write('   </td>');
  document.write('</tr>');
  document.write('<tr><td colspan="2" align="center"> &nbsp;<a href="index.php?cat='+upfile+'"><img src="img/up.gif" alt="cofnij się do góry" border="0"></img></a></td></tr>');
  document.write('</table>');
  document.write('<table align="center">');
  document.write('<tr><td>');
  //  document.write('<object>');
  document.write('<iframe src="http://player.vimeo.com/video/'+name+'?title=0&amp;byline=0&amp;portrait=0&amp;color=000000&amp;autoplay=1" width="500" height="375" frameborder="0"></iframe>');
  //  document.write('</object>');
  document.write('</td></tr>');
  document.write('</table>');
  }


//-->

