     /* 
     code by PIT @ 2010 www.qwertonformica.cz 
     tested on: Safari2-3,MSIE6-8,Firefox3
     */
     var curObj = 1;
     var swapBgPcs = 2;
     var countObj = 3;
     var startTimeInt = 120;
     var stopTimeInt = 5000;
     var curOpacity = 11;
     var opacityClassArr = new Array('opintX','opint0','opint1','opint2','opint3','opint4','opint5','opint6','opint7','opint8','opint9','opint10');
     
     // preload
     if (document.images) {
       pcs1 = new Image();      pcs1.src = "../pcs/pcs_layout/xpruh1.jpg";
       pcs2 = new Image();      pcs2.src = "../pcs/pcs_layout/xpruh2.jpg";
       pcs3 = new Image();      pcs3.src = "../pcs/pcs_layout/xpruh3.jpg";
     }
     
     function changeOpacity (objInt) {
       if (document.getElementById) {
         document.getElementById('pcs1').className = opacityClassArr[objInt];
       }
       
       if (curOpacity>0) {
         if (curOpacity>1) {
           curOpacity = curOpacity-1;
           if (curOpacity==9) { // change bg
             document.getElementById('animationBox').style.background="url(../pcs/pcs_layout/xpruh"+swapBgPcs+".jpg) 50% 0 no-repeat";
           }
           nextCall = setTimeout("changeOpacity(curOpacity)",startTimeInt);
         } else {
           curOpacity = 10;
           if (swapBgPcs==countObj) {
             swapBgPcs = 1;
           } else {
             swapBgPcs = swapBgPcs+1;
           }
           if (curObj<countObj) {
             curObj = curObj+1;
           } else {
             curObj = 1;
           }
           document.getElementById('pcs1').style.background="url(../pcs/pcs_layout/xpruh"+curObj+".jpg) 50% 0 no-repeat";
           nextCall = setTimeout("changeOpacity(curOpacity)",stopTimeInt);
         }
       } else { // walk to next photo -> change direction
         curOpacity = 11;
         nextCall = setTimeout("changeOpacity(curOpacity)",stopTimeInt);
       }
       
     }