var timeout	= 500;
var closemenu	= 0;
var dropdown_menu	= 0;
 
function menu_init(id)
{	
	menu_close_cancel();
 
	if(dropdown_menu) dropdown_menu.style.visibility = 'hidden';
 
	// Show menu
	dropdown_menu = document.getElementById(id);
	dropdown_menu.style.visibility = 'visible';
 
}
// Hide menu
function menu_hide()
{
	if(dropdown_menu) dropdown_menu.style.visibility = 'hidden';
}
 
// Hide menu
function menu_hidetime()
{
	closemenu = window.setTimeout(menu_hide, timeout);
}
 
function menu_close_cancel()
{
	if(closemenu)
	{
		window.clearTimeout(closemenu);
		closemenu = null;
	}
}
 
// hide menu
document.onclick = menu_hide; 

var timeDelay = 10; // change delay time in seconds
var Pix = new Array(	 "images/front1.jpg" 
			,"images/front2.jpg" 
		   );
var howMany = Pix.length;

timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];

function startPix() 
{
	setInterval("slideshow()", timeDelay);
}

function slideshow() 
{
	PicCurrentNum++;
	
	if (PicCurrentNum == howMany) 
	{
		PicCurrentNum = 0;
	}

	PicCurrent.src = Pix[PicCurrentNum];

	document["ChangingPix"].src = PicCurrent.src;
}

