var theDivs = new Array() 

theDivs[0] = 'compassion'
theDivs[1] = 'comfort'
theDivs[2] = 'trust'
theDivs[3] = 'nurture'
theDivs[4] = 'respect'


var j = 0
var p = theDivs.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = 'home_' + theDivs[i] + '.jpg'
}
var whichDiv = Math.round(Math.random()*(p-1));

function showDiv(){
	var whichDivStr = '<div id="' + theDivs[whichDiv] + '" />' + capitalize(theDivs[whichDiv]) + '</div>';
	
		document.write(whichDivStr)
	}
	
	
	





function capitalize(word){
        return word.charAt(0).toUpperCase() + word.substr(1).toLowerCase();

};