function aumentaLetra(n,id)
{
	if (typeof document.getElementById!='undefined')
	{
		document.getElementById(id).className='tamanho'+n;
	};
}


function showlaptop(theTable)
{
     if (document.getElementById(theTable).style.display == 'none')
     {
          document.getElementById(theTable).style.display = 'block';
     }
}

function hidelaptop(theTable)
{
     if (document.getElementById(theTable).style.display == 'none')
     {
          document.getElementById(theTable).style.display = 'none';
     }
     else
     {
          document.getElementById(theTable).style.display = 'none';
     }
}


function some_erro()
{
document.getElementById('erros').style.display="none" 
}


function erros(erro,caminho_icone)
{
document.write('<div id="erros" style="clear:both">');
document.write('<div id="erro_destaque">');
document.write('<div style="width:50px; float:left"><img src="'+caminho_icone+'/stock_dialog-warning.png" ></div>')
document.write('<div style="left:50px; text-align:center"><b>ATENÇÃO: <br /> Ocorreram erros ao enviar os dados</b></div>');
document.write('</div>');
document.write('<br />');
document.write('<div id="erro_interno">'+erro+'</div>');
document.write('<div style="text-align:right">');
document.write('<br />');

document.write('<div id="fecharErros">'); 

document.write('<a href="javascript:void(Fechar)" onclick="some_erro(); return false" style="text-decoration:none; color:#fff">');
document.write('[ x ] Fechar');
document.write('</a>'); 

document.write('</div>');
document.write('</div>');
document.write('</div>');
}

function midiaJanela()
{
window.resizeTo(800,530);
window.moveTo(0,0);
}

function inserir(string) 
	{ 
	parent.frames.editor.document.FORM.Post.value = parent.frames.editor.document.FORM.Post.value+" "+string; 
	parent.frames.editor.document.FORM.Post.focus(); 
	} 

function carinhas(forx,string) 
{ 
document.getElementById('mensagem').value = document.getElementById('mensagem').value +" " +string + " ";
document.getElementById('mensagem').focus();
} 

function janela(jan)
{
window.open(jan,"_blank","width=400,height=400,top=0,left=0,status=1,scrollbars=1,resizable=1");
}

	function acaoErroMensagem(msg)
	{
	alert(msg); window.history.back(-1);
	}
	
	// Prosseguir acao
	function prosseguir(msg)
	{
	if (!confirm(msg));
	window.history.back(-1); 
	}

	// Verifica se o usuario deseja apagar a conta
	function apagar(PagIr,msgAlerta)
	{
		if(confirm(msgAlerta)) 
		{
		window.location.href=(PagIr);
		}
	}
	
	function apagarServico(msg,url)
	{
		if (!confirm(msg))
		{
		window.location.reload();
		}
		else
		{
		window.location.href=(url);
		}
	
	}
	

function resultado(janela)
{
window.open(janela,'','status=1,top=0,left=0,width=500,height=250,resizable=1,scrollbars=1');
}


function somar(idCampo)
{

	var total = document.getElementById('curso_valor').value;
	campoID = idCampo.value;
	
	
	
	if(idCampo.checked==true)
	
	{
		total= ( new Number(total) + new Number(campoID) );
		document.getElementById('curso_valor').value=total;
		document.getElementById('pagamento_valor').value=total;
		
	}
	else if(idCampo.checked==false)
	{
		total= ( new Number(total) - new Number(campoID) );
		
	}
	//return document.getElementById('curso_valor').value=total;
}

function hideLinhas(linha)
{
	linha.style.display="none" ;
}

function ativaValores()
{

	if(document.getElementById('custos_outros_custos').checked==true)
	{
		document.getElementById('o_outros_valores').disabled = false;
	}
	else
	{
		document.getElementById('o_outros_valores').disabled = true;
	}
	
}
