
// Função para abrir uma pagina

function op(page, args, title) {
	var url = "index.php?view=" + page;
	url	+= args != null ? "&args=" + args : "";
	url	+= title != null ? "&title=" + title : "";
	window.location = url;
}

// Versão alternativa da função de abrir página, permite abrir 2 ao mesmo tempo

function op2(page, page2, args, title) {
	var url = "index.php?view=" + page;
	url += page2 != null ? "&view2=" + page2 : "";
	url	+= args != null ? "&args=" + args : "";
	url	+= title != null ? "&title=" + title : "";
	window.location = url;
	
}

// Ativa o funcionamento do menu no IE Sux que não entende CSS direito

function IEHoverPseudo() {

	var navItems = document.getElementById("lista").getElementsByTagName("li");
	
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "menuparent") {
			navItems[i].onmouseover=function() { this.className += " over"; }
			navItems[i].onmouseout=function() { this.className = "menuparent"; }
		}
	}

}
window.onload = IEHoverPseudo;


function completaTelefone(campo)
{
      qtdcaracteres = (campo.value).length;

      if(qtdcaracteres == '')
        campo.value = campo.value + "(";

     if(qtdcaracteres == 3)
        campo.value = campo.value + ")";

     if(qtdcaracteres == 8)
        campo.value = campo.value + "-";
}


<!--
//by Spot!
function mascaraCep(objeto){
	if (objeto.value.indexOf("-") == -1 && objeto.value.length > 5){ objeto.value = ""; }
	if (objeto.value.length == 5){
		objeto.value += "-";
	}
}
//
-->




