/***********************************************
* Random Element Backgrounds - adapted from:
* 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 images and colors to apply to CSS class "randomimage"
//in the form - "BackgroundImage:BackgroundColor" (required)
//For each entry, you can also specify a text and link color via the syntax:
// "BackgroundImage:BackgroundColor:TextColor" (recommended)
// OR "BackgroundImage:BackgroundColor:TextColor:LinkColor" (optional)
var randombgs=["../imgs/bkg_weather1.jpg", "../imgs/bkg_weather2.jpg", "../imgs/bkg_weather3.jpg", "../imgs/bkg_weather4.jpg", "../imgs/bkg_weather5.jpg", "../imgs/bkg_weather6.jpg", "../imgs/bkg_weather7.jpg"]

var rbcssrule=""
var randomnum=Math.floor(Math.random()*randombgs.length)
if (randombgs[randomnum].indexOf(":")!=-1&&randombgs[randomnum].split(":").length>2){
rbcssrule+="background-image: url("+randombgs[randomnum].split(":")[0]+");"
rbcssrule+="background-color: "+randombgs[randomnum].split(":")[1]+";"
rbcssrule+="color: "+randombgs[randomnum].split(":")[2]+";"
}
else{
rbcssrule+="background-image: url("+randombgs[randomnum].split(":")[0]+");"
rbcssrule+="background-color: "+randombgs[randomnum].split(":")[1]+";"
}
document.write('<style type="text/css">\n')
document.write('.randomimage{'+rbcssrule+'}\n')
if (randombgs[randomnum].split(":").length==4) //if link color specified
document.write('.randomimage a{color:'+randombgs[randomnum].split(":")[3]+';}\n')
document.write('<\/style>')