
var image_count = 0, 
    dhtmlok = false,
    images_needed = 0;

function initialize(count) {

    images_needed = count; 

} // end function initialize

function count_images() {

   if (++image_count == images_needed) {
      dhtmlok = true;
   } 

} // end function count_images


function changeImage(name, newsrc) {

   if (dhtmlok) {
      document.images[name].src = newsrc;
   } 
   
   
} // end function changeImage


function changeImagewithCopy(name, newsrc, name2, newsrc2) {

   if (dhtmlok) 
   {
      document.images[name].src = newsrc;
      document.images[name2].src = newsrc2;
   } 

} // end function changeImagewithCopy