// ====================================================================================================
// Rotina   : Acessar
// Descrição: Acessar a intranet
// Autor    : Atman Tecnologia
// Parâmetro: Nenhum
// Retorno  : Nenhum
// ====================================================================================================
// Histórico
// 08/07/2007	Marcelo Sanches		Criação da página
// ====================================================================================================
function Acessar()
{
	// Chama remote para salvar o registro
	window.document.frm_Login.hid_Acao.value = "ValidarAcesso";
	RsExecute("cms_login_remote.asp", window.document.frm_Login);
}

// ====================================================================================================
// Rotina   : PngFix
// Descrição: Tratamento de transparência de imagens png
// Autor    : Atman Tecnologia
// Parâmetro: Nenhum
// Retorno  : Nenhum
// ====================================================================================================
// Histórico
// 08/07/2007	Marcelo Sanches		Criação da página
// ====================================================================================================
function PngFix()
{
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])

	if ((version >= 5.5) && (document.body.filters)) {
		for(var i=0; i<document.images.length; i++)	{
			var img = document.images[i]
			var imgName = img.src.toUpperCase()
			if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
				var imgID = (img.id) ? "id='" + img.id + "' " : "";
				var imgClass = (img.className) ? "class='" + img.className + "' " : "";
				var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
				var imgStyle = img.style.cssText;
				       
				var strNewHTML = "<span " + imgID + imgClass + imgTitle
				+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
				+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				+ "(src=\'" + img.src + "\');\"></span>"; 
				img.outerHTML = strNewHTML;
				i = i - 1;
			}
		}
	}
}

// ====================================================================================================
// Rotina   : EnviarContato
// Descrição: Enviar dados para contato
// Autor    : Atman Tecnologia
// Parâmetro: Nenhum
// Retorno  : Nenhum
// ====================================================================================================
// Histórico
// 08/07/2007	Marcelo Sanches		Criação da página
// ====================================================================================================
function EnviarContato()
{
	// Verifica campo Nome
	if (window.document.frm_Contato.txt_Nome.value == "") {
		alert("Informe o campo Nome.");
		window.document.frm_Contato.txt_Nome.focus();
		return;
	}
	
	// Verifica campo Empresa
	if (window.document.frm_Contato.txt_Empresa.value == "") {
		alert("Informe o campo Empresa.");
		window.document.frm_Contato.txt_Empresa.focus();
		return;
	}
	
	// Verifica campo Cargo
	if (window.document.frm_Contato.txt_Cargo.value == "") {
		alert("Informe o campo Cargo.");
		window.document.frm_Contato.txt_Cargo.focus();
		return;
	}
	
	// Verifica campo Email
	if (window.document.frm_Contato.txt_Email.value == "") {
		alert("Informe o campo Email.");
		window.document.frm_Contato.txt_Email.focus();
		return;
	}			

	// Submit no formulário de contato
	window.document.frm_Contato.hid_Acao.value = "Enviar";
	window.document.frm_Contato.submit();
}

// ====================================================================================================
// Rotina   : EnviarPesquisa
// Descrição: Enviar dados da pesquisa
// Autor    : Atman Tecnologia
// Parâmetro: Nenhum
// Retorno  : Nenhum
// ====================================================================================================
// Histórico
// 08/07/2007	Marcelo Sanches		Criação da página
// ====================================================================================================
function EnviarPesquisa()
{
	// Submit no formulário de contato
	window.document.frm_Contato.hid_Acao.value = "Enviar";
	window.document.frm_Contato.submit();
}