var tempo=0;
function Mostrar(){
	clearTimeout(tempo);
	$("#produtos").show();
}
function Esconder(fecha){
	if(!fecha) tempo=setTimeout('Esconder(1)',200);
	else{
		clearTimeout(tempo);
		$("#produtos").hide();
	}
}

// cria o menu funcional
function AtivaFormulario(campo){
	var form = document[campo];
	for(var i=0;i<form.elements.length;i++){
		if(form[i].type=="submit") continue;
		form[i].onclick = function(){if(form[this.name].value==form[this.name].defaultValue) form[this.name].value = "";}
		form[i].onfocus = function(){if(form[this.name].value==form[this.name].defaultValue) form[this.name].value = "";}
		form[i].onblur = function(){if(!form[this.name].value) form[this.name].value = form[this.name].defaultValue;}
		form[i].onchange = function(){if(!form[this.name].value) form[this.name].value = form[this.name].defaultValue;}
	}
}



$(document).ready(function () {
	AtivaFormulario('formcliente');
	if(typeof(document.formcontato)!='undefined') AtivaFormulario('formcontato');
	if(typeof(NAME)=='string' && NAME=='Produtos') return;
	$("#produtos").mouseover(function() { Mostrar(); });
	$("#produtos").mouseout(function() { Esconder(1); });
	$('li#prod').mouseover(function() { Mostrar(); });
	$('li#prod').mouseout(function() { Esconder(); });
});

