// JavaScript Document


// Declare a new array
var rotateImg = new Array();
  // Enter the names of the images to rotate below
  rotateImg[0]="imgs/socialMedia/blogger_64.png";
  rotateImg[1]="imgs/socialMedia/delicious_64.png";
  rotateImg[2]="imgs/socialMedia/digg_64.png";
  rotateImg[3]="imgs/socialMedia/ebay_64.png";
  rotateImg[4]="imgs/socialMedia/facebook_64.png";
  rotateImg[5]="imgs/socialMedia/feed_64.png";
  rotateImg[6]="imgs/socialMedia/flickr_64.png";
  rotateImg[7]="imgs/socialMedia/friendfeed_64.png";
  rotateImg[8]="imgs/socialMedia/friendster_64.png";
  rotateImg[9]="imgs/socialMedia/furl_64.png";
  rotateImg[10]="imgs/socialMedia/google_64.png";
  rotateImg[11]="imgs/socialMedia/lastfm_64.png";
  rotateImg[12]="imgs/socialMedia/linkedin_64.png";
  rotateImg[13]="imgs/socialMedia/livejournal_64.png";
  rotateImg[14]="imgs/socialMedia/magnolia_64.png";
  rotateImg[15]="imgs/socialMedia/mixx_64.png";
  rotateImg[16]="imgs/socialMedia/myspace_64.png";
  rotateImg[17]="imgs/socialMedia/netvibes_64.png";
  rotateImg[18]="imgs/socialMedia/newsvine_64.png";
  rotateImg[19]="imgs/socialMedia/picasa_64.png";
  rotateImg[20]="imgs/socialMedia/pownce_64.png";
  rotateImg[21]="imgs/socialMedia/reddit_64.png";
  rotateImg[22]="imgs/socialMedia/stumbleupon_64.png";
  rotateImg[23]="imgs/socialMedia/technorati_64.png";
  rotateImg[24]="imgs/socialMedia/twitter_64.png";
  rotateImg[25]="imgs/socialMedia/vimeo_64.png";
  rotateImg[26]="imgs/socialMedia/webshots_64.png";
  rotateImg[27]="imgs/socialMedia/wordpress_64.png";
  rotateImg[28]="imgs/socialMedia/yelp_64.png";
  rotateImg[29]="imgs/socialMedia/youtube_64.png";

var newRotate = 0; // Declare a rotate count
var totalImgs = rotateImg.length; // Set the total number of rotation options to the array length

// Set the function to rotate the images, incrementing once for each image in the array
function cycleImgs() {
  
  // Now set the rotation to reset once it hits the last image
  if (newRotate == totalImgs) {
    newRotate = 0;
  }
  // Set the image to display based on the variable newRotate, each increment will move to the next img in the array.
  document.rotateImgs.src=rotateImg[newRotate];
  newRotate++;
  // Using the time below, set the length of time for the image to display
  // 3*1000 is 3 seconds
  // This will time out the function and change the image for every x ammount of time
  setTimeout("cycleImgs()", 3*1000);
}
window.onload=cycleImgs;
