var randnum = Math.random();
var inum = 3; 
var rand1 = Math.round(randnum * (inum-1)) + 1;

images = new Array
images[1] = "background.png"
images[2] = "background2.png"
images[3] = "background3.png"

var image = images[rand1]
	
function randomBackground(){
	element = document.getElementById('wrapper');
	element.style.background = 'url(/images/'+ image +') no-repeat';
}

function reportStatus(status){
	var report = document.getElementById("report");
	if(status == "open"){
		report.style.display="";
	}else{
		report.style.display="none";
	}
}

 
function slide(id, test, oid){
	var elm = 'photo';
	if (oid.length == 2) oid = '0' + oid
	if (oid.length == 1) oid = '00' + oid
	
	$('photoNumber').innerHTML = oid;
	$(elm).fade({ 
		duration: 1.0,
		afterFinish: function(){
			$(elm).down().replace('<img alt="'+ id +'" id="downloadpic" src="/images/pictures/middle/'+ id +'.jpg" /></a>');
			$(elm).appear();
	}});
}
