function get_all_images()
{
 var all=document.getElementsByTagName('img');  
 return all;
}
    
function fade_in_fast(obj)
{    
if (obj.style.opacity<1)
{ obj.style.opacity=obj.style.opacity*1.5+0.01;
  obj.style.filter="alpha(opacity="+obj.style.opacity*100+")";
 window.setTimeout(function(){fade_in_fast(obj);},50);
}  
 else {obj.style.opacity=1;
       obj.style.filter="";
       }
}

function fade_out_fast(obj)
{    
if (obj.style.opacity>0)
{ obj.style.opacity=obj.style.opacity/1.7-0.01;
  obj.style.filter="alpha(opacity="+obj.style.opacity*100+")";
 window.setTimeout(function(){fade_out_fast(obj);},50);
}  
 else {obj.style.opacity=0;
       obj.style.filter="alpha(opacity=0)";
       }
}

function append_fade()
{           
 var all= get_all_images();
 for (var i in all)
  { 
    if (all[i]!=undefined)
    if (all[i].style!=undefined)  
    {   if (all[i].style.opacity==undefined) {all[i].style.opacity=0;}
        else 
        if (all[i].style.opacity=='') {all[i].style.opacity=0;}
    if (all[i].style.opacity==0)
    {
    all[i].style.opacity=0;
    all[i].style.filter="alpha(opacity=0)";
    if (!all[i].complete)
      {all[i].onload=function(){fade_in_fast(this);};}
      else fade_in_fast(all[i]);
     }
  } }
}

append_fade();
var mega_count_ltd=0;
var str_run=0;
function load_check(){
 if (str_run==0) {str_run=1; move_it_strip();}
append_fade();
if (mega_count_ltd<5)
{
window.setTimeout("load_check();",1000);
mega_count_ltd++;
}
}



if (window.addEventListener) {window.addEventListener("load", load_check, false);
                             }
                              else {if (window.attachEvent) {window.attachEvent("onload", load_check);
                                                            } else window.onload = load_check;
                                   };
                                   
                                   
                                   
var new_scroll_left=0;
function strip_run(variable)
{ target=document.getElementById('slider2');
  var this_target="tobefade"+(new_scroll_left-new_scroll_left%300)/300; 
  fade_out_fast(document.getElementById(this_target));
  new_scroll_left+=variable;

 if (new_scroll_left<0)  new_scroll_left=(target.scrollWidth-target.offsetWidth)-(target.scrollWidth-target.offsetWidth)%300;
 if (new_scroll_left>(target.scrollWidth-target.offsetWidth)) new_scroll_left=0;
  this_target="tobefade"+(new_scroll_left-new_scroll_left%300)/300; 
 fade_in_fast(document.getElementById(this_target));
}

function move_it_strip()
{ target=document.getElementById('slider2');
  if (target==undefined) return;
 if (navigator.userAgent.search("MSIE")>-1)
 {add=10;} else {add=0;}
    var pre2=(target.scrollLeft-new_scroll_left);
    pre=pre2*pre2;
  if  (pre>=9+add)
   { 
       target.scrollLeft-=(pre2/5).toFixed(0);
   } else {moving_status=0;
             target.scrollLeft= new_scroll_left;
          };
          window.setTimeout("move_it_strip()",50);
}   
