function getSource(position) 
{ 
	//Update: The number to the number of random images
	var num_main_images = 10; 
	//Update: The number of the set folder
	var num_set_folder = 11; 
	//Update: The number to the number of headlines
	var num_headlines = 10; 
	var headline_links= new Array(num_headlines);
	//Update: Ordered list of the links for the headlines. If there is no link, put in 'None' or leave it blank for that headline.
	headline_links[0]=""; 
	headline_links[1]="";
	headline_links[2]=""; 
	headline_links[3]="";
	headline_links[4]="";
	headline_links[5]="";
	headline_links[6]="";
	headline_links[7]="";
	headline_links[8]="";
	headline_links[9]="";

	var random_main_image=getRandom(num_main_images);
	var random_headlines=getRandom(num_headlines);
	
	if(position == "main_image"){
		if( num_set_folder == 8 && random_main_image == 8 )
			return '<a href=\"http://www.iit.edu/publications/iit_magazine/fall2005/\"><img src=\"images_homepage/random/set' + num_set_folder + '/photo_' + random_main_image + '.jpg\" width=\"228\" height=\"322\" border=\"0\" alt=\"Illinois Institute of Technology\" /></a>' 
		else{
			if( num_set_folder == 7 )
				return '<a href=\"http://www.iit.edu/%7Einternat/internatfest/intfest.php\"><img src=\"images_homepage/random/set' + num_set_folder + '/photo_' + random_main_image + '.jpg\" width=\"228\" height=\"322\" border=\"0\" alt=\"Illinois Institute of Technology\" /></a>';
			else				
				return '<img src=\"images_homepage/random/set' + num_set_folder + '/photo_' + random_main_image + '.jpg\" width=\"228\" height=\"322\" border=\"0\" alt=\"Illinois Institute of Technology\" />' 
		}
	}
	else{
		if(headline_links[random_headlines-1] != "None" && headline_links[random_headlines-1] != "" && headline_links[random_headlines-1] != undefined){
			return '<a href=\"' + headline_links[random_headlines-1] +'\"><img src=\"images_homepage/headlines/headline' + random_headlines + '.gif" width=\"400\" height=\"32\" vspace=\"0\" border=\"0\" /></a>' 
		}
		else
			return '<img src=\"images_homepage/headlines/headline' + random_headlines + '.gif" width=\"400\" height=\"32\" vspace=\"0\" border=\"0\" />' 
	}
}

//Update: The number to the number of student profiles
var num_student_profiles = 18; 

var random_student_profiles = (getRandom(num_student_profiles)) - 1;
var max_length_profile_text = 90; //number of characters
<!-- var max_length_profile_text = 120; //number of characters //-->
function printSnapshot(position) 
{ 
if(position == "snapshot_image")
	return '<a href=\"javascript:MM_openBrWindow(\'popups/student_snapshot.html?' + random_student_profiles + '&' + num_student_profiles + '\',\'Snapshot\',\'width=500,height=620,scrollbars=yes,top=50,left=50,resizable=yes\')\" class=\"bodytext\"><img src=\"images_homepage/snapshots/' + all_students[random_student_profiles].photo  + '\" alt=\"Student Snapshot\"width=\"125\" height=\"82\" vspace=\"10\" border=\"0\"></a>';
else{
	if(position == "snapshot_name")
		return all_students[random_student_profiles].name;
	else{
		if(position == "snapshot_graduationDate")
			return all_students[random_student_profiles].graduationDate;
		else{
			if(position == "snapshot_major")
				return all_students[random_student_profiles].major;
			else{
				if(position == "snapshot_profile"){
					var profile_char_at_max = all_students[random_student_profiles].profile.charAt(max_length_profile_text);
					while (profile_char_at_max != ' ')
					{
						max_length_profile_text++;
						profile_char_at_max = all_students[random_student_profiles].profile.charAt(max_length_profile_text);
					}
					return all_students[random_student_profiles].profile.substring(0,max_length_profile_text);
				}
				else{
					
					var length_profile_text = all_students[random_student_profiles].profile.length; 
					var profile_text_divide = length_profile_text/8;
					profile_text_divide = Math.round (profile_text_divide);
					var num_para_profile = new Array();
					
					paragraphs_profile = all_students[random_student_profiles].profile.split('<br><br>');
					
					var num_paragraphs_profile = paragraphs_profile.length;
					var window_height = 330 + profile_text_divide + (num_paragraphs_profile*42);
					
					return '<a href=\"javascript:MM_openBrWindow(\'popups/student_snapshot.html?' + random_student_profiles + '&' + num_student_profiles + '\',\'Snapshot\',\'width=500,height=' + window_height + ',scrollbars=yes,top=50,left=50,resizable=yes\')\" class=\"bodytext\">more...</a>'
				}
			}

		}
	}
}
} 

function getRandom(number) 
{ 
	return Math.floor(Math.random() * number) + 1; 
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}