Don't like ads? PRO users don't see any ads ;-)
Guest

javgall

By: a guest on Apr 15th, 2012  |  syntax: HTML  |  size: 2.98 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3.   <head>
  4.     <title></title>
  5.     <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  6.      <style type="text/css">
  7.   <!--
  8.    #nahledy {margin-bottom: 10px;}
  9.    #nahledy img {width: 51.4px; height:39px ; padding: 1px;}
  10.    #obrazek {width:640px; height: 480px;}
  11.    input {margin:10px; border-radius:10px;}
  12.    #navigace {width:640px; text-align: center; }
  13.    .skryt {display:none;}
  14.  //-->
  15.     </style>
  16.   <script type="text/javascript">
  17.   <!--
  18.  var cf = 1;
  19.   function zobrazFoto(i) {
  20.   cf = i;
  21.   if (i < 10) {i= "0"+i;}
  22.   document.getElementById("fotka").src="javascript/foto/fotky/"+i+".jpg";
  23.   document.getElementById("cislo").innerHTML=i;
  24.   if (cf>=1){document.getElementById("predchozi").style.display = '';}
  25.   if (cf<=11) {document.getElementById("dalsi").style.display = '';}
  26.   if (cf==12) {document.getElementById("dalsi").style.display = 'none';}
  27.   if (cf==1) {document.getElementById("predchozi").style.display = 'none';}
  28.   }
  29.   function dalsi(){
  30.     if (cf<=11){
  31.     cf++;
  32.     document.getElementById("cislo").innerHTML=cf;
  33.     zobrazFoto(cf);
  34.     }
  35.     else {
  36.       cf = 1;
  37.       zobrazFoto(cf);
  38.     }
  39.     document.getElementById("predchozi").style.display = '';
  40.     if (cf==12){document.getElementById("dalsi").style.display = 'none';}
  41.     else{document.getElementById("dalsi").style.display = '';}
  42.   }
  43.    function predchozi(){
  44.     if (cf>1){
  45.     cf--;
  46.     document.getElementById("cislo").innerHTML=cf;
  47.     zobrazFoto(cf);
  48.     }
  49.     else {
  50.       cf = 12;
  51.       zobrazFoto(cf);
  52.     }
  53.     if (cf==1){document.getElementById("predchozi").style.display = 'none';}
  54.     else{document.getElementById("predchozi").style.display = '';}
  55.     document.getElementById("dalsi").style.display = '';
  56.   }
  57.   var play;
  58.   function prehrat(){
  59.   play=setInterval("dalsi()",1000);
  60.   document.getElementById("play").style.display = 'none';
  61.   document.getElementById("stop").style.display = '';
  62.   }
  63.   function stop(){
  64.    clearInterval(play);
  65.    document.getElementById("stop").style.display = 'none';
  66.    document.getElementById("play").style.display = '';
  67.   }
  68.   if (cf==1) {document.getElementById("predchozi").style.display = 'none';}
  69.  //-->
  70.  
  71.      </div>
  72.   </head>
  73.   <body>
  74.   <div id="obsah">
  75.       <div id="navigace">
  76.      <input type="button" value="&lt;&lt;" onclick="predchozi()" style="float: left; " id="predchozi">
  77.      <input type="button" value="PLAY" onclick="prehrat()" id="play" style="">
  78.      <input type="button" value="STOP" onclick="stop()" style="display: none; " id="stop">
  79.      <input type="button" value="&gt;&gt;" onclick="dalsi()" style="float:right;" id="dalsi">
  80.      <div>Fotografie číslo <span id="cislo">09</span></div>
  81.      </div>
  82.      <div id="obrazek">
  83.      <img src=".jpg" alt="" height="480" width="640" id="fotka">  
  84.       </div>
  85.      </div>
  86.   </body>
  87. </html>