var terimg=new Array ("10A-s.jpg","30A-s.jpg","50A-s.jpg","6100-s.jpg","6200-s.jpg","7551-s.jpg","alpha-s.jpg","fox-s.jpg","pf2c-s.jpg","gf4c-s.jpg","golf-s.jpg","charlie-s.jpg","juliet-s.jpg","npa-s.jpg","oscar-s.jpg","pca-s.jpg","juliet-pk-s.jpg","romeo-pk-s.jpg","romeo-s.jpg","serie7000DIN-s.jpg","serie7000-s.jpg","spa-s.jpg","tango-s.jpg","x-frz-s.jpg","x-fsc-s.jpg","golf-easy-s.jpg","tau-6-s.jpg","tau-10-s.jpg","tau-joy-s.jpg","safe01-s.gif","safe02-s.gif","base0-s.jpg","top-s.jpg","tiny-blind-s.jpg","victor-s.jpg","hanito-s.jpg","f4-s.jpg","f8-s.jpg");

var tertext=new Array ("10A","30A","50A","6100","6200","7551","Alpha","FOX","PF2C","GF4C","Golf","Charlie","Juliet","NPA","Oscar","PCA","Juliet-PK","Romeo-PK","Romeo","Serie7000DIN","Serie7000","SPA","Tango","X-FRZ","X-FSC","Golf&ndash;Easy","&tau;&ndash;6","&tau;&ndash;10","&tau;&ndash;Joy","Sec. switches","Sec. switches","Base","Top","Tiny Blind","Victor","Hanito","F4","F8");

var terurl=new Array ("index.php?entry=slip_ring_collectors","index.php?entry=slip_ring_collectors","index.php?entry=slip_ring_collectors","index.php?entry=foot_switches","index.php?entry=foot_switches","index.php?entry=position_limit_switches","index.php?entry=pendant_control_stations","index.php?entry=rotary_limit_switches","index.php?entry=rotary_limit_switches","index.php?entry=rotary_limit_switches","index.php?entry=anemometers","index.php?entry=pendant_control_stations","index.php?entry=joysticks","index.php?entry=pendant_control_stations","index.php?entry=rotary_limit_switches","index.php?entry=pendant_control_stations","index.php?entry=joysticks","index.php?entry=joysticks","index.php?entry=joysticks","index.php?entry=position_limit_switches","index.php?entry=position_limit_switches","index.php?entry=pendant_control_stations","index.php?entry=position_limit_switches","index.php?entry=position_limit_switches","index.php?entry=position_limit_switches","index.php?entry=anemometers","index.php?entry=radio_remote_controls","index.php?entry=radio_remote_controls","index.php?entry=radio_remote_controls","index.php?entry=safety","index.php?entry=safety","index.php?entry=rotary_limit_switches","index.php?entry=rotary_limit_switches","index.php?entry=radio_remote_controls","index.php?entry=victor","index.php?entry=vazeni","index.php?entry=radio_remote_controls","index.php?entry=radio_remote_controls");

var aint;
var bunka=0;
var poradi_bunek=new Array (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
var TER_array=new Array ();

function rnd (maximum) {
   var x=Math.floor(Math.random()*++maximum);
   return x;
}

function zmen_poradi () {
poradi_bunek=poradi_bunek.sort(function () {return Math.random()-0.5});
}

function obrazek (a0) {
do {
   var jetam=false;
   var vyber=rnd(terimg.length-1);
   for (var j in TER_array)
      if (vyber==TER_array[j])
         jetam=true;
}
while (jetam);
TER_array.push(vyber);
document.getElementsByTagName("TD")[poradi_bunek[a0]].childNodes[0].href=terurl[vyber];
document.getElementsByTagName("TD")[poradi_bunek[a0]].childNodes[0].childNodes[0].src="../images/terimg/"+terimg[vyber];
document.getElementsByTagName("TD")[poradi_bunek[a0]].childNodes[0].childNodes[2].innerHTML=tertext[vyber];
if (bunka<15)
   bunka= ++a0;
else {
   bunka=0;
   clearInterval(aint);
   zmen_poradi ();
   for(var i=0; i<TER_array.length; ++i)
      TER_array.pop();
   }
}

function start () {
aint=setInterval("obrazek(bunka)",150);
setInterval(function(){aint=setInterval('obrazek(bunka)',150)},35000);
}

function qqq (a,b) {
if (a){
   document.getElementById("colY-0").style.visibility="visible";
   document.getElementById("colY-0").getElementsByTagName("IMG")[0].src="../images/transparent/"+b+".gif";
   }
else
   document.getElementById("colY-0").style.visibility="hidden";   
}
