


// hide   // ok, we have a JavaScript browser
  var browserOK = false;
  var pics;

  browserOK = document.images;
  pics = new Array();

var objCount = 0;

function preload(name, first, second, third) {  
  if (browserOK) {     
    pics[objCount] = new Array(4);
    pics[objCount][0] = new Image();
    pics[objCount][0].src = first;
    pics[objCount][1] = new Image();
    pics[objCount][1].src = second;
	pics[objCount][2] = new Image();
    pics[objCount][2].src = third;
    pics[objCount][3] = name;
    objCount++;
  }
}

// imageID,imageName,imageID2,imageName2
function on(name){
  i = 0; n = 0;
  if (browserOK) {
     for (i = 0; i < objCount; i++) {
      if (document.images[pics[i][3]] != null)
        if (name != pics[i][3]) { 
          // set back all other images
          document.images[pics[i][3]].src = pics[i][0].src;
        } else {
           // show the second image
		  document.images[pics[i][3]].src = pics[i][1].src;
		  	// show the second image for corresponding text or globe
	   	  n = i;
			}// end else 
			} // end for
			// document.write("the number is " + n)
			
		
		if ( n < 6 ) { document.images[pics[12][3]].src = pics[n+6][1].src; }
		// else { document.images[pics[n-5][3]].src = pics[n-5][1].src;}	
	} // end if
} // end function



function down(name){
  i = 0; n = 0;
  if (browserOK) {
     for (i = 0; i < objCount; i++) {
      if (document.images[pics[i][3]] != null)
        if (name != pics[i][3]) { 
          // set back all other images
          document.images[pics[i][3]].src = pics[i][0].src;
        } else {
           // show the second image
	   document.images[pics[i][3]].src = pics[i][2].src;
	   n = i;	// show the second image for corresponding text or globe
	
			}// end else 
			} // end for
		if ( n < 6 ) { document.images[pics[12][3]].src = pics[n+6][2].src; }
		// else { document.images[pics[n-5][3]].src = pics[n-5][2].src;}	
	} // end if
} // end function




function off(){
  if (browserOK) {
     for (i = 0; i < objCount; i++) {
      // set back all images
      if (document.images[pics[i][3]] != null) 
	  	document.images[pics[i][3]].src = pics[i][0].src;
      
    }
  }
}


// preload images - you have to specify which images should be preloaded
// and which Image-object on the web-page they belong to (this is the first
// argument). 

preload("globe-na", "images/globe-na-off.jpg", "images/globe-na-ov.jpg", "images/globe-na-dn.jpg");			// 0	
preload("globe-sa", "images/globe-sa-off.jpg", "images/globe-sa-ov.jpg", "images/globe-sa-dn.jpg");			// 1
preload("globe-asia", "images/globe-asia-off.jpg", "images/globe-asia-ov.jpg", "images/globe-asia-dn.jpg");	// 2	
preload("globe-australia", "images/globe-aust-off.jpg", "images/globe-aust-ov.jpg", "images/globe-aust-dn.jpg");// 3
preload("globe-europe", "images/globe-euro-off.jpg", "images/globe-euro-ov.jpg", "images/globe-euro-dn.jpg");// 4
preload("globe-africa", "images/globe-africa-off.jpg", "images/globe-africa-ov.jpg", "images/globe-africa-dn.jpg");	// 5	

preload("txt-na", "images/txt-block-off.jpg", "images/txt-na-ov.jpg", "images/txt-na-dn.jpg");				// 6	
preload("txt-sa", "images/txt-block-off.jpg", "images/txt-sa-ov.jpg", "images/txt-sa-dn.jpg");				// 7
preload("txt-asia", "images/txt-block-off.jpg", "images/txt-asia-ov.jpg", "images/txt-asia-dn.jpg");		// 8
preload("txt-australia", "images/txt-block-off.jpg", "images/txt-aust-ov.jpg", "images/txt-aust-dn.jpg");	// 9
preload("txt-europe", "images/txt-block-off.jpg", "images/txt-euro-ov.jpg", "images/txt-euro-dn.jpg");		// 10
preload("txt-africa", "images/txt-block-off.jpg", "images/txt-africa-ov.jpg", "images/txt-africa-dn.jpg");	// 11
preload("txt-block", "images/txt-block-off.jpg", "", "");		// 12
