//Função usada para vericar se o navegador suporta requisição sincrona e assincrona.. do ajax...
function ajaxInit() 
{
	var xmlhttp;
	try 
	{
		xmlhttp = new XMLHttpRequest();
	} 
	catch(ee) 
	{
		try 
		{
			xmlhttp = new ActiveXObject ("Msxml2.XMLHTTP");
		} 
		catch(e)
		{
			try 
			{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(E) 
			{
				xmlhttp = false;
			}
		}
	}
	return xmlhttp;
}

/*
	Função para limpar os campos do formulário.
	Quem vai receber os nomes dos campos é a variavel inputs
*/
function limpar(campos)
{
	sepCampos	= campos.split(","); 
	cntCampos	= sepCampos.length;
	
	for(var i=0;i<=cntCampos-1;i++)
	{
		var fckCampo	= sepCampos[i].split("-");
		var cntFck		= fckCampo.length;
		if(cntFck > 1)
			input	= $m(fckCampo[1]);
		else
			input	= $m(sepCampos[i]);
		//alert(input.type);
		if(input != null)
		{
			if(input.type == "radio")
			{
				input.checked = false;
			}
			else if(input.type == "select-one")
			{
				input.value	= "";
			}
			else if(input.type == "checkbox")
			{
				input.checked = false;
			}
			else if(input.type == "text" || input.type == "textarea" || input.type == "file" || input.type == "hidden" || input.type == "password")
			{
				if(cntFck > 1)
				{
					var oEditor = FCKeditorAPI.GetInstance(fckCampo[1]);
					oEditor.EditorDocument.body.innerHTML = ""; 
				}
				else
				{
					input.value	= "";
				}
			}
			else
			{
				input.innerHTML = "";					  
			}
		}
	}
}