function loadX(secao,conteudo)
{
	//alert('oba');
	try
	{
		ajax = new ActiveXObject("Microsoft.XMLHTTP");
	} 
	catch(e)
	{
		try 
		{
			ajax = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(ex)
		{
			try 
			{
				ajax = new XMLHttpRequest();
			}
			catch(exc)
			{
				alert('Esse browser não tem recursos para uso do Ajax');
				ajax = false;
			}
		}
	}
	
	if(ajax)
	{
		ajax.open("GET",'index.php?modulo=x&intSecao='+secao+'&intConteudo='+conteudo,true);
		ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		ajax.send(null);
		// opacity:0.6; filter: Alpha(Opacity=60)
		//document.getElementById('quadro_conteudo').style.opacity='0.2';
		//document.getElementById('quadro_conteudo').style.filter='Alpha(Opacity=20)';
		ajax.onreadystatechange = function()
		{
			if(ajax.readyState==4 && ajax.status==200)
			{
				if(ajax.responseText)
				{				
					document.getElementById('quadro_conteudo').innerHTML=unescape(ajax.responseText);
					document.getElementById('quadro_conteudo').style.opacity='1';
					document.getElementById('quadro_conteudo').style.filter='Alpha(Opacity=100)';
					return false;
				}
			}			
		}		
		return false;
		
	}
	else
	{
		// Voltar ao modo paleozóico
		//window.location='index.php?intSecao='+secao+'&intConteudo='+conteudo;
		//alert('falha ajax');
		return true;
	}
}

function addFav()
{
	var url      = "http://www.toyacom.com.br";
	var title    = "Toyacom - Desenvolvimento de Sistemas";
	if (window.sidebar) window.sidebar.addPanel(title, url,"");
	else if(window.opera && window.print)
	
	{
		var mbm = document.createElement('a');
		mbm.setAttribute('rel','sidebar');
		mbm.setAttribute('href',url);
		mbm.setAttribute('title',title);
		mbm.click();
	}
	else if(document.all){window.external.AddFavorite(url, title);
	
	}
	
}


function validacontatoNovo()
 {
  if(document.getElementById('assunto').value=='')
	{
	alert('Por favor, preencha o Campo Assunto.');
	document.getElementById('assunto').focus();
	return false;
	}
	
	else if(document.getElementById('telefone').value=='')
	{
		alert('Por favor, preencha o Campo Telefone.');
		document.getElementById('telefone').focus();
		return false;
	}
	
	else if(document.getElementById('nome').value=='')
	{
		alert('Por favor, preencha o Campo Nome.');
		document.getElementById('nome').focus();
		return false;
	}
	else if(document.getElementById('mail').value=='')
	{
		alert('Por favor, preencha o Campo Email.');
		document.getElementById('mail').focus();
		return false;
	}
	
	else if(document.getElementById('mail').value=='')
	{
		alert('Por favor, preencha o Campo Email.');
		document.getElementById('mail').focus();
		return false;
	}
	
	else if(document.getElementById('cidade').value=='')
	{
		alert('Por favor, preencha o Campo Cidade.');
		document.getElementById('cidade').focus();
		return false;
	}
	
	else if(document.getElementById('uf').value==0)
	{
		alert('Por favor, preencha o Campo UF.');
		document.getElementById('uf').focus();
		return false;
	}
	
	else if(document.getElementById('mensagem').value=='')
	{
		alert('Por favor, preencha o Campo Mensagem.');
		document.getElementById('mensagem').focus();
		return false;
	}
	
	else
	
	{
		return true;
	}
}

function validaIndicacao()
{
  
  if(document.getElementById('seunome').value=='')
	{
	alert('Por favor, preencha o Campo Seu Nome.');
	document.getElementById('seunome').focus();
	return false;
	}
	
	else if(document.getElementById('seuemail').value=='')
	{
		alert('Por favor, preencha o Campo Seu Email.');
		document.getElementById('seuemail').focus();
		return false;
	}
	
		
	else if(document.getElementById('indnome').value=='')
	{
		alert('Por favor, preencha o Campo Indicação Nome.');
		document.getElementById('indnome').focus();
		return false;
	}
	
	else if(document.getElementById('indemail').value=='')
	{
		alert('Por favor, preencha o Campo Indicação Email.');
		document.getElementById('indemail').focus();
		return false;
	}
	
	else if(document.getElementById('comentario').value=='')
	{
		alert('Por favor, preencha o Campo Comentário.');
		document.getElementById('comentario').focus();
		return false;
	}
	
	else
	
	{
		return true;
	
	}
}

function ValidaSuporte()

{

	if(document.getElementById('cat').value==0)
	{
	alert('Por favor, Selecione uma Categoria.');
	document.getElementById('cat').focus();
	return false;
	}
	
	else if(document.getElementById('empresasuporte').value=='')
	{
		alert('Por favor, preencha o Campo Empresa.');
		document.getElementById('empresasuporte').focus();
		return false;
	}
	
	else if(document.getElementById('nomesuporte').value=='')
	{
		alert('Por favor, preencha o Campo Nome.');
		document.getElementById('nomesuporte').focus();
		return false;
	}
	
	else if(document.getElementById('emailsuporte').value=='')
	{
		alert('Por favor, preencha o Campo Email.');
		document.getElementById('emailsuporte').focus();
		return false;
	}
	
	else if(document.getElementById('telefonesuporte').value=='')
	{
		alert('Por favor, preencha o Campo Telefone.');
		document.getElementById('telefonesuporte').focus();
		return false;
	}
	
	else if(document.getElementById('descricao').value=='')
	{
		alert('Por favor, preencha o Campo Descrição da Ocorrência.');
		document.getElementById('descricao').focus();
		return false;
	}
	
	
	else
	
	{
		return true;
	
	}
}
