
var cookie = $.cookie('seonly');
var aData = cookie ? cookie.split("|") : new Array();
var iDate = (new Date()).getTime();

var sColor = aData[0];

if(!cookie || (cookie && iDate-aData[1] > 300000)){
	var aColor = new Array();
	aColor.push({ type: "r", value: 100 });
	aColor.push({ type: "g", value: 100 });
	aColor.push({ type: "b", value: 100 });

	var r = getRandom(0,2);
	var k = getRandom(0,2,r);
	aColor[r].value = 160;
	aColor[k].value = getRandom(100,160);
	sColor = aColor[0].value.toString(16) + aColor[1].value.toString(16) + aColor[2].value.toString(16);
	$.cookie('seonly', sColor + "|" + iDate, { path: '/' });
//	$.cookie('seonly', null);
}

document.write("<style type='text/css' media='screen'>\n div.information div.body, #ControlTop .control .links, #ControlBottom .control .links { background: #" + sColor + " !important; }</style>")

function getRandom(min, max, except){
	var r = Math.round(Math.random()*(max-min))+min;
	if(except != 'undefined' && r == except)
		return getRandom(min, max, except)
	else
		return r;
}

