function next(num)
{
	var top = 'g'+num+'Top';
	var bottom = 'g'+num+'Bottom';
	var main = 'g'+num+'Main';
	
	document.getElementById(top).style.background='url(\'images/gTop.png\')';	
	document.getElementById(bottom).style.background='url(\'images/gBottom.png\')';	
	document.getElementById(main).style.background='#FF6600';	
	
}
function back(num)
{
	var top = 'g'+num+'Top';
	var bottom = 'g'+num+'Bottom';
	var main = 'g'+num+'Main';
	var color;
	
	if (num==1) color='#990066'; 
	if (num==2) color='#CC0000';
	if (num==3) color='#003366';
	document.getElementById(top).style.background='url(\'images/'+num+'Top.png\')';	
	document.getElementById(bottom).style.background='url(\'images/'+num+'Bottom.png\')';	
	document.getElementById(main).style.background=color;	
	
}

function show(obj)
{
	dest=document.getElementById(obj);
	if(dest.style.display == 'block')
	{
		dest.style.display = 'none';
	}
	else
	{
		dest.style.display = 'block';
	}
}
function clouds(id, speed)
{
	el=document.getElementById(id);
	
	if (el.offsetLeft == -300) el.style.left = '1600px';
	el.style.left = (el.offsetLeft - 1) + 'px';
	//alert(el.offsetLeft);
	
	setTimeout("clouds('" + id + "', '" + speed + "')", speed);
}
var folder = 'menu';

function topmenu(i)
{
	
}
function topmenuhide()
{
	var btop;
	btop=document.getElementById('btop');
	btop.style.background='none';
}
function dropMenu(stElem, id)
{
	function findpos(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		return [curleft,curtop];
	}
	var stElem=document.getElementById(stElem);
	var menu=document.getElementById(id);	

	position = findpos(stElem);

	menu.style.display='block';
	
	if (id=='menu4')
	{
		menu.style.top = position[1] + 90 + "px";
		menu.style.left = position[0] - 320 + "px";
	}
	else if(id=='menu5')
	{
		menu.style.top = position[1] + 90 + "px";
		menu.style.left = position[0] - 430 + "px";
	}
	else if(id=='menu7')
	{
		menu.style.top = position[1] + 90 + "px";
		menu.style.left = position[0] - 290 + "px";
	}
	else
	{
		menu.style.top = position[1] + 90 + "px";
		menu.style.left = position[0] - 20 + "px";		
	}
	

}
function hideMenu(id)
{
	var menu=document.getElementById(id);
	menu.style.display='none';	
}
