function $(objectId) {  
     if(document.getElementById && document.getElementById(objectId)) {  
    // W3C DOM  
       return document.getElementById(objectId);  
     }   
     else if (document.all && document.all(objectId)) {  
    // MSIE 4 DOM  
       return document.all(objectId);  
     }   
     else if (document.layers && document.layers[objectId]) {  
    // NN 4 DOM.. note: this won't find nested layers  
       return document.layers[objectId];  
     }   
     else {  
       return false;  
    }  
} 
var goid=0; 
var t=0; 
var imglen; 
  function ImgArray(len) 
  { 
   this.length=len; 
   } 
  ImgName=new ImgArray(7); 
ImgName[0]="images/s1.jpg"; 
ImgName[1]="images/s2.jpg"; 
ImgName[2]="images/s3.jpg"; 
ImgName[3]="images/s4.jpg"; 
ImgName[4]="images/s5.jpg"; 
ImgName[5]="images/s6.jpg"; 
ImgName[6]="images/s7.jpg"; 
ImgName[7]="images/s8.jpg"; 

imglen=ImgName.length; 
var d=document; 
if (d.images){ 
  if(!d.dxypp) var dxypp=new Array(); 
  var j=d.dxypp.length; 
  for(var ii=0;ii<imglen;ii++){ 
      d.dxypp[j].src=ImgName[ii]; 
    } 
} 
  function playImg() 
  { 
    
    //t_end=document.player.intsec.value; 
    t_end=2000;
 if (t==imglen) 
    { 
     t=0; 
    } 
    else 
    {t++;} 
if (t==imglen) 
    { 
     t_end=2000; 
   } 
 if (goid==0){ 
   if(document.all){ 
   $("theimg").style.filter="blendTrans(Duration=1)"; 
   $("theimg").filters[0].apply(); 
   $("theimg").src=ImgName[t]; 
   tIndex=t; 
   $("theimg").filters[0].play(); 
   }else{ 
   $("theimg").src=ImgName[t]; 
   } 
  } 
  mytimeout=setTimeout("playImg()",t_end); 
   } 
function go(id){ 
    if (id==1){ 
    t=1; 
     goid=0; 
     playImg(); 
     } 
    else if(id==2){ 
     goid=1; 
     t=1; 
     } 
    else if(id==3){  
     goid=1; 
     t-=1; 
     if (t<=imglen) $("theimg").src=ImgName[t];    
 } 
 else if(id==4){ 
  goid=1; 
  t+=1; 
   if (t>0 && t<=imglen){$("theimg").src=ImgName[t];} 
   else{ 
   t=1; 
   goid=1; 
   playImg(); 
   } 
 } 
 else{ 
  goid=0; 
  t=1; 
  playImg(); 
  } 
   
} 

