/***********************************************
* 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=["http://www.faro-airport-car-hire.com/random_cab/algarve-car-hire-cab1.gif::yellow"]

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>')

