HTML JavaScript DHTML




if (document.images){
     var pic1_init= new Image();
     pic1_init.src="home.gif";
    
     var pic1_new= new Image();
     pic1_new.src="home1.gif"; 
}
function change_it(the_name){
     if (document.images){
          document.images[the_name].src= eval(the_name+"_new.src");
     }
}
function change_back(the_name)
{
     if (document.images)
     {
          document.images[the_name].src= eval(the_name+"_init.src");
     }
}