var tip_on;
function show_tip(tip_off){
	if(tip_off == tip_on){
		Effect.Pulsate(tip_off, { pulses: 2, duration: 1.0 });
	}else{
			Effect.BlindDown(tip_off);
		if(tip_on != undefined){
			Effect.BlindUp(tip_on);
		}
		tip_on = tip_off;
	}
}

function check_and_send(i){
	if(i=='2'){
		new Ajax.Request('../formail.php', {method: 'post', parameters: {
			nome: $ ('news_name').value,
			email: $ ('news_email').value,
			flag: '2'
		}, onComplete:function(){
			$('news_btn').style.display = 'none';
			$('news_ok').style.display = 'block';
			$('news_form').reset();
			setTimeout(function(){
				$('news_ok').style.display = 'none';
				$('news_btn').style.display = 'block';
			}, 3000);
		}});
	}else{
		new Ajax.Request('../formail.php', {method: 'post', parameters: {
			nome: $ ('contato_nome').value,
			email: $ ('contato_email').value,
			empresa: $ ('contato_empresa').value,
			endereco: $ ('contato_endereco').value,
			pretel: $ ('contato_pretel').value,
			tel: $ ('contato_tel').value,
			interesse: $ ('contato_interesse').value,
			forma: $ ('contato_forma').value,
			msg: $ ('contato_obs').value,
			flag: '1'
		}, onComplete:function(){
			$('contato_btn').style.display = 'none';
			$('contato_ok').style.display = 'block';
			$('contato_form').reset();
			setTimeout(function(){
				$('contato_ok').style.display = 'none';
				$('contato_btn').style.display = 'block';
			}, 3000);
		}});
	}
}