// JavaScript Document

my_pix = new Array (
    "images/random/lunch/1.jpg",	
	"images/random/lunch/2.jpg",
	"images/random/lunch/3.jpg",
	"images/random/lunch/4.jpg",
	"images/random/lunch/5.jpg",
	"images/random/lunch/6.jpg",
	"images/random/lunch/7.jpg",
	"images/random/lunch/8.jpg",
	"images/random/lunch/9.jpg",
	"images/random/lunch/10.jpg",
	"images/random/lunch/11.jpg",
	"images/random/lunch/12.jpg",
	"images/random/lunch/13.jpg"
);
// random image chooser
img_num = my_pix.length

function set_image()
{
	var img_index = Math.floor(Math.random() * img_num);
	var img = my_pix[img_index];
	//alert(img);
	if(document.getElementById)
	{
		document.getElementById('home_pic').src = img;
	}
}

function init()
{
	set_image();
	setInterval(set_image, 5000);
}
	
window.onload = init;	
