if (document.getElementById)
document.documentElement.className = 'jsclass'; //hide content for DOM capable browsers


var randomcontentdisplay={
	divholders:new Object(),
	masterclass: "randomcontent",

	init:function(){
		if (!document.getElementById)
			return
		var alldivs=document.getElementsByTagName("div")
		var randomcontentsearch=new RegExp(this.masterclass+"\\s+(group\\d+)", "i") //check for CSS class="randomcontent groupX" (x=integer)
		for (var i=0; i<alldivs.length; i++){
			if (randomcontentsearch.test(alldivs[i].className)){
				if (typeof this.divholders[RegExp.$1]=="undefined") //if array to hold this group of divs doesn't exist yet
					this.divholders[RegExp.$1]=new Array() //create array first
					this.divholders[RegExp.$1].push(alldivs[i]) //add this div to the array
			}
		}
	this.showone()
	},

	showone:function(){
		for (group in this.divholders){ //loop thru each array within object
			var chosenOne=Math.floor(Math.random()*this.divholders[group].length) //randomly pick one entry from array
			this.divholders[group][chosenOne].style.display="block" //display content corresponding to the chosen entry
		}
	}
}

function switch1(div) {
var option=['home_recipe1','home_recipe2','home_recipe3','home_recipe4','home_recipe5'];
for(var i=0; i<option.length; i++) {
if (document.getElementById(option[i])) {
obj=document.getElementById(option[i]);
obj.style.display=(option[i]==div)? "block" : "none";
}
}
}

//window.onload=function () {switch1('home_recipe1');}


//Edit this line to list all of your home page background images
//var backgroundSrcs = new Array("../images/home_photo.jpg","../images/home_photo2.jpg","../images/home_photo3.jpg","../images/home_photo4.jpg")

//function pickimage()
//{
//This line picks an image at random from the list you entered above
//var bgimage=backgroundSrcs[(Math.round(Math.random()*(backgroundSrcs.length-1)))]

//This line applies the background image to your masthead
//document.getElementById("right_home").style.background = "url('" + bgimage + "') no-repeat center top";
//} 
