// JavaScript Document

var timeout         = 100;
var closetimer		= 0;
var ddmenuitem      = 0;

// Open layer
function menu_open(id)
{	
	// Cancel close timer
	menu_cancelclosetime();
	// Close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
	// Get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';
}
// Close showed layer
function menu_close()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}
// Close timer
function menu_closetime()
{
	closetimer = window.setTimeout(menu_close, timeout);
}
// Cancel close timer
function menu_cancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}
// Close layer when click-out

var d=document;
var bCount=0;
var bMax=3;

function picturecompany()
{	if (bCount==bMax) 
	{	bCount=0;
		el=d.getElementById?d.getElementById('company'+bMax):d.all?d.all['company'+bMax]:d.layers['company'+bMax];
		el.style.display='none';
	}
	bCount+=1;
	var el=d.getElementById?d.getElementById('company'+bCount):d.all?d.all['company'+bCount]:d.layers['company'+bCount];
	el.cnt=function()
	{	el.style.display='block';
		if (bCount>1 && bCount<=bMax)
		{	el=d.getElementById?d.getElementById('company'+(bCount-1)):d.all?d.all['company'+(bCount-1)]:d.layers['company'+(bCount-1)]; 
			el.style.display='none';  }
		setTimeout('picturecompany().cnt()', 8000);
	}
	return el;
}

var doc=document;
var productCount=0;
var productMax=9;

function pictureproduct()
{	if (productCount==productMax) 
	{	productCount=0;
		el=doc.getElementById?doc.getElementById('product'+productMax):doc.all?doc.all['product'+productMax]:doc.layers['product'+productMax];
		el.style.display='none';
	}
	productCount+=1;
	var el=doc.getElementById?doc.getElementById('product'+productCount):doc.all?doc.all['product'+productCount]:doc.layers['product'+productCount];
	el.cnt=function()
	{	el.style.display='block';
		if (productCount>1 && productCount<=productMax)
		{	el=doc.getElementById?doc.getElementById('product'+(productCount-1)):doc.all?doc.all['product'+(productCount-1)]:doc.layers['product'+(productCount-1)]; 
			el.style.display='none';  }
		setTimeout('pictureproduct().cnt()', 6000);
	}
	return el;
}

function overImg(id)
{	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	el.bgColor='white';
}

function outImg(id)
{	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	el.bgColor='';
}