/*
Random-Order content script
*/

//1) Specify content(s) to display and rotate
//   You can specify multiple "sets", each displayed in diff. areas of your page


//THIS is the number that must be updated to show new images.  
var randomListing=15


//NO NEED TO EIT BELOW HERE


var content=new Array() 

for (a=0;a< randomListing;a++){
var b=a+1;	
content[a]="<div class='randomImageSidebar' style='background: url(http://www.haverford.edu/KINSC/hhmi/images/frontpage/sample" + b + ".jpg) center no-repeat;'></div>";
}


var diffcontent=new Array() //sample set 2
diffcontent[0]='<a href="http://www.google.com">Google Search Engine</a>'
diffcontent[1]='<a href="http://news.bbc.co.uk">BBC News</a>'
diffcontent[2]='<a href="http://www.msnbc.com">MSNBC News</a>'


function randomorder(targetarray, spacing, numberItems){

var randomorder=new Array()
var the_one
var z=0
for (i=0;i<numberItems;i++)
randomorder[i]=i

while (z<numberItems){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!="_selected!"){	
document.write(targetarray[the_one]+spacing)
targetarray[the_one]="_selected!"
z++
}
}
}
