/*Random Image/Link JavaScript(tm) by Jim Matvichuk: This code may be used freely as long as this copyright notice remains with the code. : Copyright© 1997, Jim Matvichuk Jim_Matvichuk@compuserve.com All rights reserved : Last Revision: August 19, 1997 >please keep these lines on when you copy the source : made by: Nicolas - http://www.javascript-page.com */
var bands = new Array();
bands.push('http://www.uwec.edu/mus-the/images/photos/band1.jpg');
bands.push('http://www.uwec.edu/mus-the/images/photos/band2.jpg');
bands.push('http://www.uwec.edu/mus-the/images/photos/band3.jpg');
bands.push('http://www.uwec.edu/mus-the/images/photos/band4.jpg');
bands.push('http://www.uwec.edu/mus-the/images/photos/band5.jpg');
bands.push('http://www.uwec.edu/mus-the/images/photos/band6.jpg');

var choir = new Array();
choir.push('http://www.uwec.edu/mus-the/images/photos/choir1.jpg');
choir.push('http://www.uwec.edu/mus-the/images/photos/choir2.jpg');
choir.push('http://www.uwec.edu/mus-the/images/photos/choir3.jpg');
choir.push('http://www.uwec.edu/mus-the/images/photos/choir4.jpg');
choir.push('http://www.uwec.edu/mus-the/images/photos/choir5.jpg');
choir.push('http://www.uwec.edu/mus-the/images/photos/choir6.jpg');
choir.push('http://www.uwec.edu/mus-the/images/photos/choir7.jpg');
choir.push('http://www.uwec.edu/mus-the/images/photos/choir8.jpg');
choir.push('http://www.uwec.edu/mus-the/images/photos/choir9.jpg');
choir.push('http://www.uwec.edu/mus-the/images/photos/choir10.jpg');

var jazzstudies = new Array();
jazzstudies.push('http://www.uwec.edu/mus-the/images/photos/jazz1.jpg');
jazzstudies.push('http://www.uwec.edu/mus-the/images/photos/jazz2.jpg');
jazzstudies.push('http://www.uwec.edu/mus-the/images/photos/jazz3.jpg');
jazzstudies.push('http://www.uwec.edu/mus-the/images/photos/jazz4.jpg');
jazzstudies.push('http://www.uwec.edu/mus-the/images/photos/jazz5.jpg');

var orchestra = new Array();
orchestra.push('http://www.uwec.edu/mus-the/images/photos/orch1.jpg');
orchestra.push('http://www.uwec.edu/mus-the/images/photos/orch2.jpg');
orchestra.push('http://www.uwec.edu/mus-the/images/photos/orch3.jpg');
orchestra.push('http://www.uwec.edu/mus-the/images/photos/orch4.jpg');
orchestra.push('http://www.uwec.edu/mus-the/images/photos/orch5.jpg');
orchestra.push('http://www.uwec.edu/mus-the/images/photos/orch6.jpg');
orchestra.push('http://www.uwec.edu/mus-the/images/photos/orch7.jpg');
orchestra.push('http://www.uwec.edu/mus-the/images/photos/orch8.jpg');

var opera = new Array();
opera.push('http://www.uwec.edu/mus-the/images/photos/opera1.jpg');
opera.push('http://www.uwec.edu/mus-the/images/photos/opera2.jpg');
opera.push('http://www.uwec.edu/mus-the/images/photos/opera3.jpg');
opera.push('http://www.uwec.edu/mus-the/images/photos/opera4.jpg');
opera.push('http://www.uwec.edu/mus-the/images/photos/opera5.jpg');
opera.push('http://www.uwec.edu/mus-the/images/photos/opera6.jpg');
opera.push('http://www.uwec.edu/mus-the/images/photos/opera7.jpg');
opera.push('http://www.uwec.edu/mus-the/images/photos/opera8.jpg');
opera.push('http://www.uwec.edu/mus-the/images/photos/opera9.jpg');
opera.push('http://www.uwec.edu/mus-the/images/photos/opera10.jpg');

var childrenstheatre = new Array();
childrenstheatre.push('http://www.uwec.edu/mus-the/images/photos/ctheatre1.jpg');
childrenstheatre.push('http://www.uwec.edu/mus-the/images/photos/ctheatre2.jpg');
childrenstheatre.push('http://www.uwec.edu/mus-the/images/photos/ctheatre3.jpg');
childrenstheatre.push('http://www.uwec.edu/mus-the/images/photos/ctheatre4.jpg');

var theatre = new Array();
theatre.push('http://www.uwec.edu/mus-the/images/photos/theatre1.jpg');
theatre.push('http://www.uwec.edu/mus-the/images/photos/theatre2.jpg');
theatre.push('http://www.uwec.edu/mus-the/images/photos/theatre3.jpg');
theatre.push('http://www.uwec.edu/mus-the/images/photos/theatre4.jpg');
theatre.push('http://www.uwec.edu/mus-the/images/photos/theatre5.jpg');
theatre.push('http://www.uwec.edu/mus-the/images/photos/theatre6.jpg');
theatre.push('http://www.uwec.edu/mus-the/images/photos/theatre7.jpg');
theatre.push('http://www.uwec.edu/mus-the/images/photos/theatre8.jpg');

var dance = new Array();
dance.push('http://www.uwec.edu/mus-the/images/photos/dance1.jpg');
dance.push('http://www.uwec.edu/mus-the/images/photos/dance2.jpg');
dance.push('http://www.uwec.edu/mus-the/images/photos/dance3.jpg');
dance.push('http://www.uwec.edu/mus-the/images/photos/dance4.jpg');
dance.push('http://www.uwec.edu/mus-the/images/photos/dance5.jpg');
dance.push('http://www.uwec.edu/mus-the/images/photos/dance6.jpg');
dance.push('http://www.uwec.edu/mus-the/images/photos/dance7.jpg');

var main = new Array();
//make mains array all the rest of arrays totaled
	for (var i = 0; i<bands.length; i++) {
		main.push(bands[i]);
	}
	for (var i = 0; i<choir.length; i++) {
		main.push(choir[i]);
	}
	for (var i = 0; i<jazzstudies.length; i++) {
		main.push(jazzstudies[i]);
	}
	for (var i = 0; i<orchestra.length; i++) {
		main.push(orchestra[i]);
}
	for (var i = 0; i<childrenstheatre.length; i++) {
		main.push(childrenstheatre[i]);
	}
	for (var i = 0; i<theatre.length; i++) {
		main.push(theatre[i]);
	}
	for (var i = 0; i<dance.length; i++) {
		main.push(dance[i]);
	}
	for (var i = 0; i<opera.length; i++) {
		main.push(opera[i]);
	}

//This function returns a random integer from 0-length
function ranLoc(length) {
	var G_day = new Date();
	var G_seed = 1+G_day.getTime(); 
	return (parseInt(((G_seed - (parseInt(G_seed/1000,10) * 1000))/10)/100*length + 1,10)-1);	
}

function randomPicture() {
	var loc = document.location.href;
	loc = loc.toLowerCase();
	var alt = '';
	var src = '';
	//chooses which image to display depending on the location of the page
	if (loc.search('/bands/') != -1) {
		src = bands[ranLoc(bands.length)];
		alt = 'Bands Picture';
	}else if (loc.search('/choir/') != -1){
		src = choir[ranLoc(choir.length)];
		alt = 'Choir Picture';
	}else if (loc.search('/choralfest/') != -1){
		src = choir[ranLoc(choir.length)];
		alt = 'Choir Picture';
	}else if (loc.search('/cabaret/') != -1){
		src = choir[ranLoc(choir.length)];
		alt = 'Choir Picture';
	}else if (loc.search('/jazzstudies/') != -1){
		src = jazzstudies[ranLoc(jazzstudies.length)];
		alt = 'Jazz Studies Picture';
	}else if (loc.search('/jazzfestival/') != -1){
		src = jazzstudies[ranLoc(jazzstudies.length)];
		alt = 'Jazz Studies Picture';
	}else if (loc.search('/orchestra/') != -1){
		src = orchestra[ranLoc(orchestra.length)];
		alt = 'Orchestra Picture';
	}else if (loc.search('/childrenstheatre/') != -1){
		src = childrenstheatre[ranLoc(childrenstheatre.length)];
		alt = 'Childrens Theatre Picture';
	}else if (loc.search('/theatre/') != -1){
		src = theatre[ranLoc(theatre.length)];
		alt = 'Theatre Picture';
	}else if (loc.search('/dance/') != -1){
		src = dance[ranLoc(dance.length)];
		alt = 'Dance Picture';
	}else if (loc.search('/opera/') != -1){
		src = opera[ranLoc(opera.length)];
		alt = 'Opera Picture';
	}else{
		src = main[ranLoc(main.length)];
		alt = 'Image from Music and Theatre Arts Department';
	}
	document.write("<img src='"+src+"' alt='"+alt+"' width='177' height='115' />");
}