

tms=new Array()

//Mostra o submenu no mouseover
function aparece(obj){
	
	appear(obj)
//	document.getElementById("img_destaque").style.visibility="hidden"
}
function sumir(obj){
	
	fade(obj)
//	document.getElementById("img_destaque").style.visibility="hidden"
}

function sometudo()
{

	for(i=1;i<9;i++)
	{
		//if(document.getElementById('s'+i).style.visibility == 'visible')
		fade(("s"+i))
		
	}
}
//Mostra o submenu no mouseover
function over(n){
	for(i=1;i<9;i++)
	{
		if(i!=n)
		fade(("s"+i))
	}
	appear(("s"+n))
//	document.getElementById("img_destaque").style.visibility="hidden"
}
function out(n){
	for(i=1;i<9;i++)
	{
		
		fade(("s"+i))
	}
}
function verifica(){
	//if(s1.style.visibility=="hidden" && s2.style.visibility=="hidden" && document.getElementById("s3").style.visibility=="hidden" && document.getElementById("s4").style.visibility=="hidden" && document.getElementById("s5").style.visibility=="hidden" && document.getElementById("s6").style.visibility=="hidden" && document.getElementById("s7").style.visibility=="hidden" && document.getElementById("s8").style.visibility=="hidden")
	//{
			
	//}
}
function setOpacity(domId, val) {
	obj = document.getElementById(domId);
	obj.style.MozOpacity = val;
	obj.style.opacity = val/10;
	obj.style.filter = 'alpha(opacity=' + val*10 + ')';
};

function fade(domId){
	obj = document.getElementById(domId); //Get the Element
	if(obj.style.display == "none") 
	return false; //Return false if the element is already hidden
	var alpha = 10; //Set the initial value of alpha to 10 (Opaque)
	function f(){ //Internal function
		alpha--; //Decrememnt the alpha value
		setOpacity(domId, alpha); //Set the opacity of our element to the specified alpha
		if(alpha > -1){ //If alpha is still bigger than -1 then..
			setTimeout(f, 10); //..then call the function again after 100 milliseconds
		}else{ //otherwise..
			obj.style.display = 'none'; //..otherwise now that we cant see the element anyways, hide it
		}
	}
	setTimeout(f, 100); //This is where we call the f() function for the first time
		
};

function appear(domId){
	document.getElementById(domId).style.visibility="visible"

	obj = document.getElementById(domId); //Get the element
	if(obj.style.display != "none") return false; //Return if it is already being displayed
	obj.style.display = ''; //Un-hide the object before its animation
	var alpha = 0; //Set the initial value of alpha to 0 (invisible)
	function a(){ //Internal function
		alpha++; //Increment alpha
		setOpacity(domId, alpha); //Set the opacity of our element to the specified alpha
		if(alpha < 11)setTimeout(a, 10);
		/*Till alpha is 10, keep calling the
		a() function after 100 milliseconds */
	}
	setTimeout(a, 100); //This is where we call the a() function for the first time

};