function $(e) { return document.getElementById(e); }

function init (){
	photoChange();
}

function topVoiceChange(){
	var stObj = [
			{
					"name":"Wang Yang",
					"from":"China",
					"imgs":"img/student_photo01.jpg",
					"mess":"When I started the program, I was a little nervous, but all of the staff and teachers were very supportive. Learning Japanese from excellent teachers and having fun every day with new friends that I’ve met at NILS has proven to be a worthwhile experience for me. "
				},
			{
					"name":"Stas Gavenus",
					"from":"New York",
					"imgs":"img/student_photo02.jpg",
					"mess":"NILS is a really good school located in Ogori City. The teachers are friendly and help out in any way possible and people in ogori City are also kind. They talk to the students and if the student doesn't understand, they try to explain what they are talking about. I like the schoool and the town very much."
				}
		];

	var randnum = Math.floor( Math.random() * stObj.length ); 
	
	var name = stObj[randnum].name;
	var from = stObj[randnum].from;
	var mess = stObj[randnum].mess;
	var imgs = stObj[randnum].imgs;
	
	$('stName').innerHTML = name;
	$('stFrom').innerHTML = from;
	$('stMess').innerHTML = mess;
	$('stImgs').src = imgs;
	
}

function photoChange(){
	var pArr = new Array();
	pArr = [1,2,3,4,5,6,7,8,9,10];
	for(var i=1; i<=4; i++){
		var num = pArr.splice(Math.floor(Math.random() * pArr.length),1);
		var ids = 'p' + i;
		$(ids).src = 'img/photo/' + num + '.jpg';
	}
}

