var iedom=document.all||document.getElementById
var actual_height=''
var cross_scroll
var pageloaded=0
var topoffset = -2480
function ietruebody(){
  return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


function getposOffset(what, offsettype){
  var totaloffset=(offsettype=="left")? what.offsetLeft: what.offsetTop;
  var parentEl=what.offsetParent;
  while (parentEl!=null)  {
    totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
    parentEl=parentEl.offsetParent;
  }
return totaloffset;
}

function scrollimages(){
  if (pageloaded && !(window.opera))  {   

    if (iedom&&parseInt(gallery_image_block1.style.top) < gallery_height)          gallery_image_block1.style.top = parseInt(gallery_image_block1.style.top) + 1 + "px";          
    else            gallery_image_block1.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block2.style.top) < gallery_height)          gallery_image_block2.style.top = parseInt(gallery_image_block2.style.top) + 1 + "px";          
    else            gallery_image_block2.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block3.style.top) < gallery_height)          gallery_image_block3.style.top = parseInt(gallery_image_block3.style.top) + 1 + "px";          
    else            gallery_image_block3.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block4.style.top) < gallery_height)          gallery_image_block4.style.top = parseInt(gallery_image_block4.style.top) + 1 + "px";          
    else            gallery_image_block4.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block5.style.top) < gallery_height)          gallery_image_block5.style.top = parseInt(gallery_image_block5.style.top) + 1 + "px";          
    else            gallery_image_block5.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block6.style.top) < gallery_height)          gallery_image_block6.style.top = parseInt(gallery_image_block6.style.top) + 1 + "px";          
    else            gallery_image_block6.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block7.style.top) < gallery_height)          gallery_image_block7.style.top = parseInt(gallery_image_block7.style.top) + 1 + "px";          
    else            gallery_image_block7.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block8.style.top) < gallery_height)          gallery_image_block8.style.top = parseInt(gallery_image_block8.style.top) + 1 + "px";          
    else            gallery_image_block8.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block9.style.top) < gallery_height)          gallery_image_block9.style.top = parseInt(gallery_image_block9.style.top) + 1 + "px";          
    else            gallery_image_block9.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block10.style.top) < gallery_height)          gallery_image_block10.style.top = parseInt(gallery_image_block10.style.top) + 1 + "px";          
    else            gallery_image_block10.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block11.style.top) < gallery_height)          gallery_image_block11.style.top = parseInt(gallery_image_block11.style.top) + 1 + "px";          
    else            gallery_image_block11.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block12.style.top) < gallery_height)          gallery_image_block12.style.top = parseInt(gallery_image_block12.style.top) + 1 + "px";          
    else            gallery_image_block12.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block13.style.top) < gallery_height)          gallery_image_block13.style.top = parseInt(gallery_image_block13.style.top) + 1 + "px";          
    else            gallery_image_block13.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block14.style.top) < gallery_height)          gallery_image_block14.style.top = parseInt(gallery_image_block14.style.top) + 1 + "px";          
    else            gallery_image_block14.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block15.style.top) < gallery_height)          gallery_image_block15.style.top = parseInt(gallery_image_block15.style.top) + 1 + "px";          
    else            gallery_image_block15.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block16.style.top) < gallery_height)          gallery_image_block16.style.top = parseInt(gallery_image_block16.style.top) + 1 + "px";          
    else            gallery_image_block16.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block17.style.top) < gallery_height)          gallery_image_block17.style.top = parseInt(gallery_image_block17.style.top) + 1 + "px";          
    else            gallery_image_block17.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block18.style.top) < gallery_height)          gallery_image_block18.style.top = parseInt(gallery_image_block18.style.top) + 1 + "px";          
    else            gallery_image_block18.style.top = topoffset + "px"          if (iedom&&parseInt(gallery_image_block19.style.top) < gallery_height)          gallery_image_block19.style.top = parseInt(gallery_image_block19.style.top) + 1 + "px";          
    else            gallery_image_block19.style.top = topoffset + "px"    
  }
  scrolltimeout = setTimeout("scrollimages()",45)
  
}

function is_netscape(a, b) {
  while (b.parentNode)
  if ((b = b.parentNode) == a)
    return true;
  return false;
}

function stopscroll(e){
  if ((window.event&&!scrollmain.contains(event.toElement)) || (e && e.currentTarget && e.currentTarget!= e.relatedTarget && !is_netscape(e.currentTarget, e.relatedTarget)))     
    if (window.scrolltimeout) clearTimeout(scrolltimeout)  
}

function BeginImageScroll(){  
  if (iedom)  {
    scrollmain=document.getElementById? document.getElementById("scrollcontainer") : document.all.scrollcontainer
    gallery_height=parseInt(scrollmain.style.height)
    mainobjoffset=getposOffset(scrollmain, "top")
    gallery_image_block1=document.getElementById? document.getElementById("gallery_image1") : document.all.gallery_image1    gallery_image_block2=document.getElementById? document.getElementById("gallery_image2") : document.all.gallery_image2    gallery_image_block3=document.getElementById? document.getElementById("gallery_image3") : document.all.gallery_image3    gallery_image_block4=document.getElementById? document.getElementById("gallery_image4") : document.all.gallery_image4    gallery_image_block5=document.getElementById? document.getElementById("gallery_image5") : document.all.gallery_image5    gallery_image_block6=document.getElementById? document.getElementById("gallery_image6") : document.all.gallery_image6    gallery_image_block7=document.getElementById? document.getElementById("gallery_image7") : document.all.gallery_image7    gallery_image_block8=document.getElementById? document.getElementById("gallery_image8") : document.all.gallery_image8   
    gallery_image_block9=document.getElementById? document.getElementById("gallery_image9") : document.all.gallery_image9
    gallery_image_block10=document.getElementById? document.getElementById("gallery_image10") : document.all.gallery_image10
    gallery_image_block11=document.getElementById? document.getElementById("gallery_image11") : document.all.gallery_image11
    gallery_image_block12=document.getElementById? document.getElementById("gallery_image12") : document.all.gallery_image12
    gallery_image_block13=document.getElementById? document.getElementById("gallery_image13") : document.all.gallery_image13
    gallery_image_block14=document.getElementById? document.getElementById("gallery_image14") : document.all.gallery_image14
    gallery_image_block15=document.getElementById? document.getElementById("gallery_image15") : document.all.gallery_image15
    gallery_image_block16=document.getElementById? document.getElementById("gallery_image16") : document.all.gallery_image16
    gallery_image_block17=document.getElementById? document.getElementById("gallery_image17") : document.all.gallery_image17
    gallery_image_block18=document.getElementById? document.getElementById("gallery_image18") : document.all.gallery_image18
    gallery_image_block19=document.getElementById? document.getElementById("gallery_image19") : document.all.gallery_image19    
    
    actual_height = gallery_image_block1.offsetHeight

    scrollmain.onmousemove=function(e){      stopscroll(e)     
    }

    scrollmain.onmouseout=function(e){      scrollimages();       
    }
  }
  pageloaded=1
  scrollimages();
}