// Creating random background colors for all 15 boxes
function ini() {
var hexIni;
var fontColor;
var choice = location.search;
var color_base = choice.substr(7);
switch(color_base)
	{
		case 'pink':
	  		hexIni = "ee00";
			fontColor = "#ccc";
	  		break;    
		case 'green':
	  		hexIni = "11bb";
			fontColor = "#fff";
	  		break;
		case 'blue':
			hexIni = "0b0b";
			fontColor ="#aaafff";
	  		break;
		
			default:
			//hexIni = randomize();
	  		hexIni = "0b0b";
			fontColor ="#aaafff";
	}
	
	
	
/*
function randomize() {
		colors = new Array("ee00","11aa","0b0b");
		random = Math.floor(Math.random()*3);
		hexIni = colors[random];
		return hexIni;
}*/
var hexCode = hexIni;
char = new Array("0", "1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");
for (i=1;i<16;i++)
	{
		var box = "box" +i;
		for (j=0;j<2;j++)
		{
			var num = Math.floor(Math.random()*16);
			hexCode += char[num] ;
		}
		var randomcolor = '#' +hexCode;
		var div = document.getElementById(box);
		div.style.backgroundColor= randomcolor;
		hexCode= hexIni;
	}
}

