var npgd = Qpgd.length;
var cpgd = -1;

function anim(){
cpgd += 1;if(cpgd>=npgd){cpgd=0}; 

objImage=new Image(); eval('objImage.src="../im'  + Qpgd[cpgd] + '"'); WaitForImageIsComplete(objImage);
if (navigator.appName == "Microsoft Internet Explorer"){
eval('document.images.im'+Qpgd[cpgd]+'.style.filter="blendTrans(duration=5)"');
eval('document.images.im'+Qpgd[cpgd]+'.style.filter="blendTrans(duration=crossFadeDuration)"');
eval('document.images.im'+Qpgd[cpgd]+'.filters.blendTrans.Apply()');}
eval('document.images.im'+Qpgd[cpgd]+'.src="../im/' + Ipgd[cpgd] + '"');
if(navigator.appName=="Microsoft Internet Explorer") eval('document.images.im'+Qpgd[cpgd]+'.filters.blendTrans.Play()');

t = setTimeout('anim()', Dpgd[cpgd])
}
function WaitForImageIsComplete(objImage){if(!objImage.complete){setTimeout('WaitForImageIsComplete(objImage)',100)}}

function runGalleryShow(){
   if (document.all){
      if(document.images.SlideShow3){     
      document.images.SlideShow3.style.filter="blendTrans(duration=2)"
      document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow3.filters.blendTrans.Apply()}      
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   if(document.images.SlideShow3){document.images.SlideShow3.src = preLoad3[j3].src}
   document.images.SlideShow.src = preLoad3[j].src
      document.getElementById('didas').innerHTML= Did3[j3];
   if (document.all){
      if(document.images.SlideShow3){document.images.SlideShow3.filters.blendTrans.Play();}
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j3 = j3 + 1
   if (j3 > (p3-1)) j3=0
   j = j + 1
   if (j > (p3-1)) j=0
   j2 = j2 + 1
   if (j2 > (p3-1)) j2=0;

   preLoad3[j2].src = Pic3[j2];
   
   t = setTimeout('runGalleryShow()', slideShowSpeed3);
}


function runGalleryShow2(){
   if (document.all){     
      document.images.SlideShow3.style.filter="blendTrans(duration=2)"
      document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow3.filters.blendTrans.Apply()      
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
      document.images.SlideShow2.style.filter="blendTrans(duration=2)"
      document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow2.filters.blendTrans.Apply()      
   }
   document.images.SlideShow3.src = preLoad3[j3].src
   document.images.SlideShow.src = preLoad3[j].src
   document.images.SlideShow2.src = preLoad3[j2].src
   if (document.all){
      //document.getElementById('didas').innerHTML= Did3[j3];
      document.images.SlideShow3.filters.blendTrans.Play();
      document.images.SlideShow.filters.blendTrans.Play();
      document.images.SlideShow2.filters.blendTrans.Play();
   }
   j3 = j3 + 1
   if (j3 > (p3-1)) j3=0
   j = j + 1
   if (j > (p3-1)) j=0
   j2 = j2 + 1
   if (j2 > (p3-1)) j2=0;

   preLoad3[j2].src = Pic3[j2];
   
   t = setTimeout('runGalleryShow2()', slideShowSpeed3);
}