//This script created the random images for the EMC.com Homepage

function rotateImg() {
  var num0 = Math.round(Math.random() * 6); //change the number start at zero (0) for the number of images to rotate. Currently there are 5 images, so the number value should be 4.

//this is to set up the individual links that correspond to the masthead image - capable of having multiple links - (name image starting with 0), the script will find the neccessary images.

  var captionArray = new Array();
	captionArray[0] = "/ilm/" ;
	captionArray[1] = "/ilm/" ;
	captionArray[2] = "/ilm/" ;
	captionArray[3] = "/ilm/" ;	
	captionArray[4] = "/ilm/" ;
	captionArray[5] = "/ilm/" ;
	captionArray[6] = "/ilm/" ;	

//image map coordinate for the text caption link.	

  var imageMapArray = new Array();
    imageMapArray[0] = "0,0,702,160";
	imageMapArray[1] = "0,0,702,160";	
	imageMapArray[2] = "0,0,702,160";
	imageMapArray[3] = "0,0,702,160";
	imageMapArray[4] = "0,0,702,160";	
	imageMapArray[5] = "0,0,702,160";
	imageMapArray[6] = "0,0,702,160";

  var w = "";
	w += "<map name=\"masthead\"><area href='" + captionArray[num0] + "' coords='" + imageMapArray[num0] + "' /></map>";
	w += "<img src=\"/local/ko/KR/images/frontpage/new_photos_050404/" + num0 + ".jpg\" width=\"702\" height=\"160\" alt=\"Information Lifecycle Management\"  border=\"0\" usemap=\"#masthead\" />";		

  var mastImage = new csspObj('mainImg');

  if(document.layers) {
    mastImage.setProperty('innerHTML',w);
  	  document.open();
      document.write(w);
      document.close();
  } else {
 mastImage.innerHTML = w;
  }
}


