﻿// JScript File

randomColor =function () {

	colors = new Array(2);
	colors[0] = "#609522"; // green
	colors[1] = "#EFAB00"; // orange
	colors[2] = "#54559B"; // blue
    //colors[3] = "#E1011C"; // red
	
	lcolors = new Array(2);
	lcolors[0] = "#BDD7A6"; // lighter green
	lcolors[1] = "#E2BB80"; // lighter gold
	lcolors[2] = "#B3C0C9"; // lighter blue
	//lcolors[3] = "#CC958F"; // lighter red
	
	currentColor = Math.floor(Math.random() * colors.length);
	return currentColor;
}

changeColor =function () {
	randomColor(); 
	var color = colors[currentColor];
	var lcolor = lcolors[currentColor];
    document.getElementById('headerarea').style.borderColor = color;
    document.getElementById('footerarea').style.backgroundColor = color;
    document.getElementById('headernav').style.borderColor = color;
    var sPath = window.location.pathname;
    var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
}