/***********************************************
* Random Content Colors script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//specify list of random background colors to apply to CSS class "randomcolor"
//For each entry, you can optionally specify a text and link color via the syntax:
// "BackgroundColor:TextColor" OR "BackgroundColor:TextColor:LinkColor"
var randombgcolors=["#0099FF:#339900:#FFCC00:#660066", "#339900:#FFCC00:#CC0066:#0099FF", "#FFCC00:#CC0066:#339900:#660066", "#CC0066:#660066:#FFCC00:#339900", "#660066:#0099FF:#CC0066:#339900"]

var rbcssrule=""
var randomnum=Math.floor(Math.random()*randombgcolors.length)
if (randombgcolors[randomnum].indexOf(":")!=-1){
rbcssrule="background-color: "+randombgcolors[randomnum].split(":")[0]+";"
}
else
rbcssrule="background-color: "+randombgcolors[randomnum]+";"

document.write('<style type="text/css">\n')
document.write('.randomcolor{'+rbcssrule+'}\n')
if (randombgcolors[randomnum].split(":").length==4) //if link color specified
document.write('.randomcolor2 { background-color:'+randombgcolors[randomnum].split(":")[1]+';}\n')
document.write('.randomcolor3 { background-color:'+randombgcolors[randomnum].split(":")[2]+';}\n')
document.write('.randomcolor4 { background-color:'+randombgcolors[randomnum].split(":")[3]+';}\n')
document.write('<\/style>')

