//Check if IE
var ie = false;
if(navigator.appName == "Microsoft Internet Explorer" && navigator.platform.indexOf('Mac') > -1){
	ie = true;
}


//Random Front IMG
var count = 0;
var front = new Array();
front[0] = "front0";
front[1] = "front1";
front[2] = "front2";
function getFront(){
	if(count > 2){
		count = 0;
	}
	document.getElementById("frontIMG").className = front[count];
	count++;
	setTimeout('getFront()',6000);
}

//Random Page IMG
var ran = new Array();
function getRan(){
	mathran = Math.floor(Math.random() * 6);
	document.getElementById("ranIMG").style.background= "url(../css/img/random/ran" + mathran + ".jpg)";
}


//Validation

//e-Mail
function validateForm () {
  if (document.email.emailBox.value == "")
	{
	alert("Please Enter Your Email");
	document.email.emailBox.focus();
	return (false);
	}
}

//Snail Mail
function validateSMForm () {
	alert("Sorry, but I'm not working right now. Please email all requests to rhunt@csusm.edu");
	window.close();
}

//Non IEMac Methods
if (ie==false){

//Color Method - Random text colors
var color=new Array()
color[0]="654942";
color[1]="494089";
color[2]="4a6bbe";
color[3]="00769b";
color[4]="8fa628";
color[5]="00769b";
color[6]="d1006c";
color[7]="fc9712";
color[8]="fd362b";
color[9]="950000";
color[10]="a5034b";

function random () {
	return Math.floor(Math.random() * 11);
	}

function replace(){
document.getElementById('rightLargeColumn').innerHTML = document.getElementById('rightLargeColumn').innerHTML.replace(/Center ARTES/gi,"<span style=\"color:#" + color[random()] + "\">" + "Center " + "</span>" + "<span style=\"color:#" + color[random()] + "\">" + "A" + "</span><span style=\"color:#" + color[random()] + "\">" + "R" + "</span><span style=\"color:#" + color[random()] + "\">" + "T" + "</span><span style=\"color:#" + color[random()] + "\">" + "E" + "</span><span style=\"color:#" + color[random()] + "\">" + "S" + "</span>");
document.getElementById('rightLargeColumn').innerHTML = document.getElementById('rightLargeColumn').innerHTML.replace(/<h2 class=\"center\">/gi,"<h2 style=\"color:#" + color[random()] + ";\" class=\"center\">");
}

}