function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function generico(URL,NOME,LARG,ALT,T,L,R,S)
{
	var op ; 
	op =window.open(URL,NOME,'width='+LARG+',height='+ALT+',top='+T+',left='+L+',resizable='+R+',scrollbars='+S)
	op.focus();
}

function toggleView(el)
{
	div=document.getElementById("posts");
	if(!div)
	{
		return;
	}
	ols=div.getElementsByTagName("dl");
	for(i=0;i<ols.length;i++)
	{
		if(ols[i].className==""||ols[i].className=="list")
		{
			ols[i].className="grid";
			el.className="grid";
			el.innerHTML="Ver em modo lista";
		}
		else
		{
			ols[i].className="list";
			el.className="list";
			el.innerHTML="Ver em modo grid";
		}
	}
}	

function cadmail()
{
window.open('cadmail.asp?email='+document.emailx.email.value+'&Opcao='+document.emailx.tipo.value,'email','resizable=no,width=700,height=280,scrollbars=no');
		document.emailx.reset()
}

function limpa() 
{
	document.emailx.email.value=''
}
