var preload=new Array();
function init(){
   cont=document.getElementById('content');
   cont_img=cont.getElementsByTagName('img');
   for(var i=0;i<cont_img.length;i++){
      if(cont_img[i].src.indexOf('.gif')!=-1){
         var img_src=cont_img[i].src.split('.gif');
         cont_img[i].source=img_src[0];
         preload[i]=new Image();
         preload[i].src=cont_img[i].source+'_over.gif';
         cont_img[i].prl=preload[i];
         cont_img[i].onmouseout=function(){
            this.src=this.source+'.gif';
         };
         cont_img[i].onmouseover=function(){
            this.src=this.prl.src;
         };
         cont_img[i-1].nextimg=cont_img[i];
         cont_img[i-1].onmouseout=function(){
            this.nextimg.src=this.nextimg.source+'.gif';
         };
         cont_img[i-1].onmouseover=function(){
            this.nextimg.src=this.nextimg.prl.src;
         };
      }
   } 
}

onload=init;