// JavaScript Document

/***********************************************
* 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=["images/bkgr_f01.gif:#4B4B4B", "images/bkgr_f02.gif:#4B4B4B", "images/bkgr_f03.gif:#4B4B4B", "images/bkgr_f04.gif:#4B4B4B", "images/bkgr_f05.gif:#4B4B4B", "images/bkgr_f06.gif:#4B4B4B", "images/bkgr_f07.gif:#4B4B4B"]

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('body {'+rbcssrule+'\n')
document.write('background-repeat: repeat-x;')
document.write('background-position: center top; }')
document.write('<\/style>') 