function busca(idioma) {
		if(document.formBusca.txtCriterio.value==''||document.formBusca.txtCriterio.value=='Busca'||document.formBusca.txtCriterio.value=='Search'||document.formBusca.txtCriterio.value=='Búsqueda'){
			document.getElementById("DivErro").style.visibility="visible";
			if(idioma=='PT'){
				document.getElementById("DivErro").innerHTML="Informe um critério de busca!";
			}
			else if(idioma=='EN'){
				document.getElementById("DivErro").innerHTML="Tell a criterion for search!";
			}
			else{
				document.getElementById("DivErro").innerHTML="Díselo a un criterio de búsqueda!";
			}
			setTimeout ('escondeDiv("DivErro")',4000);
		}else{
			var frame=document.getElementById('iFrameConteudo'); 
			frame.src='topocart?ac=busca&parametro='+document.formBusca.txtCriterio.value;
			atualizaLg('busca_;parametro='+document.formBusca.txtCriterio.value);
		}
}
function escondeDiv(div){
	document.getElementById(div).innerHTML="";
	document.getElementById(div).style.visibility="hidden";
}
function enviarEmail(idioma){
	if(document.form.txtNome.value==''){
		document.getElementById("DivErro").style.visibility="visible";
		if(idioma=='PT'){
			document.getElementById("DivErro").innerHTML="Informe seu nome!";
		}
		else if(idioma=='EN'){
			document.getElementById("DivErro").innerHTML="Enter your name!";
		}
		else{
			document.getElementById("DivErro").innerHTML="Dígale a su nombre!";
		}
		setTimeout ('escondeDiv("DivErro")',4000);
		document.form.txtNome.focus();
	}
	else if(document.form.txtEmail.value==''){
		document.getElementById("DivErro").style.visibility="visible";
		if(idioma=='PT'){
			document.getElementById("DivErro").innerHTML="Informe um email!";
		}
		else if(idioma=='EN'){
			document.getElementById("DivErro").innerHTML="Enter a email!";
		}
		else{
			document.getElementById("DivErro").innerHTML="Díselo a un correo electrónico!";
		}
		setTimeout ('escondeDiv("DivErro")',4000);
		document.form.txtEmail.focus();
	}
	else if(validaEmail(document.form.txtEmail.value)==false){
		document.getElementById("DivErro").style.visibility="visible";
		if(idioma=='PT'){
			document.getElementById("DivErro").innerHTML="Email Inválido!";
		}
		else if(idioma=='EN'){
			document.getElementById("DivErro").innerHTML="Invalid Email!";
		}
		else{
			document.getElementById("DivErro").innerHTML="Correo electrónico no válido!";
		}
		setTimeout ('escondeDiv("DivErro")',4000);
		document.form.txtEmail.value = '';
		document.form.txtEmail.focus();
	}
	else if(document.form.txtAssunto.value==''){
		document.getElementById("DivErro").style.visibility="visible";
		if(idioma=='PT'){
			document.getElementById("DivErro").innerHTML="Informe um assunto!";
		}
		else if(idioma=='EN'){
			document.getElementById("DivErro").innerHTML="Enter a matter!";
		}
		else{
			document.getElementById("DivErro").innerHTML="Díselo a un asunto!";
		}
		setTimeout ('escondeDiv("DivErro")',4000);
		document.form.txtAssunto.focus();
	}
	else if(document.form.txtMsg.value==''){
		document.getElementById("DivErro").style.visibility="visible";
		if(idioma=='PT'){
			document.getElementById("DivErro").innerHTML="Digite uma mensagem!";
		}
		else if(idioma=='EN'){
			document.getElementById("DivErro").innerHTML="Enter a message!";
		}
		else{
			document.getElementById("DivErro").innerHTML="Introduzca un mensaje!";
		}
		setTimeout ('escondeDiv("DivErro")',4000);
		document.form.txtMsg.focus();
	}
	else{
		document.form.action='topocart?ac=contato';
		document.form.submit();
	}
}
function enviarCurriculo(idioma){
	if(document.form.txtNome.value==''){
		document.getElementById("DivErro").style.visibility="visible";
		if(idioma=='PT'){
			document.getElementById("DivErro").innerHTML="Informe seu nome!";
		}
		else if(idioma=='EN'){
			document.getElementById("DivErro").innerHTML="Enter your name!";
		}
		else{
			document.getElementById("DivErro").innerHTML="Dígale a su nombre!";
		}
		setTimeout ('escondeDiv("DivErro")',4000);
		document.form.txtNome.focus();
	}
	else if(document.form.txtArq.value==''){
		document.getElementById("DivErro").style.visibility="visible";
		if(idioma=='PT'){
			document.getElementById("DivErro").innerHTML="Carregue seu currículo!";
		}
		else if(idioma=='EN'){
			document.getElementById("DivErro").innerHTML="Press your resume!";
		}
		else{
			document.getElementById("DivErro").innerHTML="Pulse su currículum!";
		}
		setTimeout ('escondeDiv("DivErro")',4000);
		document.form.txtArq.focus();
	}
	else{
		document.form.action='curriculo';
		document.form.submit();
	}
}
function validaEmail(Email){
	var filter = /^(([a-zA-Z0-9_-])+(([\.\])+([a-zA-Z0-9_-]{0,1})))+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 
	var arrayEmail = Email.split(";"); //Separa os email 
	for (var i=0;i < arrayEmail.length; i++){ //varre a lista de emails 
		if ( !filter.test(arrayEmail[i]) ){ 
			return false; //se tiver erro sai com false 
		}
		else{ 
			return true; // se nao achou erro retorrna verdadeiro 
		}
	}
} 
function CaixaBaixa(fsValor, foForm, foNome) { 
	if (window.event.keyCode >= 65 && window.event.keyCode <= 90){
		x = new String(document.forms[foForm].elements[foNome].value);
		document.forms[foForm].elements[foNome].value = x.toLowerCase();
	}
}
function atualizarEnd1(){
	document.getElementById("DivLocal").innerHTML="<iframe width='300' height='300' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://www.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=SDS+-+Edificio+Miguel+Badya,+Bloco+%22L%22,+n.+30+-+Salas+301+%2F+308,+Bras%C3%ADlia-DF+-+Brasil&amp;ie=UTF8&amp;ll=-15.771605,-47.877388&amp;spn=0.08276,0.153809&amp;t=h&amp;z=13&amp;iwloc=A&amp;cid=-15795803,-47885860,15685508532538650103&amp;output=embed&amp;s=AARTsJrBq4C_3sZyhwgkZb9YSmIFIVi_qg'></iframe><br /><small><a href='http://www.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=SDS+-+Edificio+Miguel+Badya,+Bloco+%22L%22,+n.+30+-+Salas+301+%2F+308,+Bras%C3%ADlia-DF+-+Brasil&amp;ie=UTF8&amp;ll=-15.771605,-47.877388&amp;spn=0.08276,0.153809&amp;t=h&amp;z=13&amp;iwloc=A&amp;cid=-15795803,-47885860,15685508532538650103&amp;source=embed' style='color:#0000FF;text-align:left' target='_blank'>Exibir mapa ampliado</a></small>";
	document.getElementById("DivEndereco").innerHTML="<b>Brasília - Sede</b><br>SDS - Edificio Miguel Badya, Bloco L, n. 30 - Salas 301 / 308<br>Brasília-DF - Brasil - CEP: 70.394-901<br>Tel.: +55 61 xx 3322-8687<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+55 61 xx 3799 5000<br>Fax: +55 61 xx 3226-9837<br>E-mail: contato@topocart.com.br<br>";
}
function atualizarEnd2(){
	document.getElementById("DivLocal").innerHTML="<iframe width='300' height='300' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://www.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=Rua+Rodrigues+Caldas,+n.+726+-+Sala+610,+Santo+Agostinho,+Belo+Horizonte-MG+-+Brasil&amp;sll=-15.784159,-47.885799&amp;sspn=0.08276,0.153809&amp;ie=UTF8&amp;ll=-19.920583,-43.952093&amp;spn=0.010106,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJppXdEw40LUa1QooFnzfzqN_ZRo3A'></iframe><br /><small><a href='http://www.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=Rua+Rodrigues+Caldas,+n.+726+-+Sala+610,+Santo+Agostinho,+Belo+Horizonte-MG+-+Brasil&amp;sll=-15.784159,-47.885799&amp;sspn=0.08276,0.153809&amp;ie=UTF8&amp;ll=-19.920583,-43.952093&amp;spn=0.010106,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;source=embed' style='color:#0000FF;text-align:left' target='_blank'>Exibir mapa ampliado</a></small>";
	document.getElementById("DivEndereco").innerHTML="<b>Belo Horizonte</b><br>Rua Rodrigues Caldas, n. 726 - Sala 610, Santo Agostinho<br>Belo Horizonte-MG - Brasil - CEP: 30.190-120<br>Tel.: +55 31 xx 3337-9196<br>Fax: +55 31 xx 3337-8457<br>E-mail: topocartbh@terra.com.br";
}
function atualizarEnd3(){
//	document.getElementById("DivLocal").innerHTML="<iframe width='300' height='300' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://www.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=Avenida+Ant%C3%B4nio+Sales+2187,+Dion%C3%ADsio+Torres,+Fortaleza-CE+-+Brasil&amp;sll=-19.929943,-43.956342&amp;sspn=0.010106,0.019226&amp;ie=UTF8&amp;ll=-3.734421,-38.500042&amp;spn=0.010727,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJr66yEK5B6sAuE_9P8f645g_3Lp9g'></iframe><br /><small><a href='http://www.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=Avenida+Ant%C3%B4nio+Sales+2187,+Dion%C3%ADsio+Torres,+Fortaleza-CE+-+Brasil&amp;sll=-19.929943,-43.956342&amp;sspn=0.010106,0.019226&amp;ie=UTF8&amp;ll=-3.734421,-38.500042&amp;spn=0.010727,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;source=embed' style='color:#0000FF;text-align:left' target='_blank'>Exibir mapa ampliado</a></small>";
	document.getElementById("DivLocal").innerHTML="<br>";

	document.getElementById("DivEndereco").innerHTML="<b>Fortaleza</b><br>Tel.: +55 85 xx 3244-4438<br>E-mail: topocart.fortal@gmail.com";
}
function atualizarEnd4(){
	document.getElementById("DivLocal").innerHTML="<iframe width='300' height='300' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://www.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=Rua+da+Hora,+n.+100+-+Sala+101,+Espinheiro,+Recife-PE+-+Brasil&amp;sll=-3.744399,-38.504205&amp;sspn=0.010727,0.019226&amp;ie=UTF8&amp;ll=-8.038068,-34.89172&amp;spn=0.010644,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJpQbjaMheA18m2HLq3nhD-1W4P3iA'></iframe><br /><small><a href='http://www.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=Rua+da+Hora,+n.+100+-+Sala+101,+Espinheiro,+Recife-PE+-+Brasil&amp;sll=-3.744399,-38.504205&amp;sspn=0.010727,0.019226&amp;ie=UTF8&amp;ll=-8.038068,-34.89172&amp;spn=0.010644,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;source=embed' style='color:#0000FF;text-align:left' target='_blank'>Exibir mapa ampliado</a></small>";
	document.getElementById("DivEndereco").innerHTML="<b>Recife</b><br>Rua da Hora, n. 100 - Sala 101, Espinheiro<br>Recife-PE - Brasil - CEP: 52.020-020<br>Tel.: +55 81 xx 3074-2175<br>Fax: +55 81 xx 3426-0296<br>E-mail: topocart@terra.com.br";
}
function atualizarEnd5(){
	document.getElementById("DivLocal").innerHTML="<iframe width='300' height='300' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://maps.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=av.+prudente+de+morais,+744,+Natal,+Brasil&amp;sll=-5.788051,-35.20153&amp;sspn=0.012467,0.019226&amp;ie=UTF8&amp;ll=-5.777917,-35.197449&amp;spn=0.010695,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJqmaUcI2DPnRdRrecaOH7P3rPSKxQ'></iframe><br /><small><a href='http://maps.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=av.+prudente+de+morais,+744,+Natal,+Brasil&amp;sll=-5.788051,-35.20153&amp;sspn=0.012467,0.019226&amp;ie=UTF8&amp;ll=-5.777917,-35.197449&amp;spn=0.010695,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;source=embed' style='color:#0000FF;text-align:left' target='_blank'>Exibir mapa ampliado</a></small>";
	document.getElementById("DivEndereco").innerHTML="<b>Natal</b><br>Avenida Prudente de Morais, n. 30 - Sala 801<br>Espaço Empresarial Giovane Fugo - Tirol<br>Natal-RN - Brasil - CEP: 59.020-510<br>Tel. / Fax: +55 84 xx 3211-1215<br>E-mail: topocart.natal@gmail.com";
}
function atualizarEnd6(){
	document.getElementById("DivLocal").innerHTML="<iframe width='300' height='300' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://maps.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=SACADURA+CABRAL,+CENTRO+-+RIO+DE+JANEIRO+-+RJ&amp;sll=-5.788356,-35.201633&amp;sspn=0.010695,0.019226&amp;ie=UTF8&amp;ll=-22.887641,-43.183823&amp;spn=0.009903,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJr7NrZBOl6xmJkBveFeaGmYgflksQ'></iframe><br /><small><a href='http://maps.google.com.br/maps?f=q&amp;hl=pt-BR&amp;geocode=&amp;q=SACADURA+CABRAL,+CENTRO+-+RIO+DE+JANEIRO+-+RJ&amp;sll=-5.788356,-35.201633&amp;sspn=0.010695,0.019226&amp;ie=UTF8&amp;ll=-22.887641,-43.183823&amp;spn=0.009903,0.019226&amp;t=h&amp;z=14&amp;iwloc=addr&amp;source=embed' style='color:#0000FF;text-align:left' target='_blank'>Exibir mapa ampliado</a></small>";
	document.getElementById("DivEndereco").innerHTML="<b>Rio de Janeiro</b><br>Rua Sacadura Cabral, Nº120, Sala 602, 6º Andar, Centro<br>Rio de Janeiro - RJ - CEP 20.221-160<br>Tel.: +55 21 8167-4369<br>E-mail: topocart.rj@gmail.com";
}
function atualizaLg(pAcao){
	document.getElementById("DivPT").innerHTML="<a href=?ac=idioma&lg=PT&acao="+pAcao+"><img src=imagens/bandeira_brasil.jpg></a>";
	document.getElementById("DivSP").innerHTML="<a href=?ac=idioma&lg=SP&acao="+pAcao+"><img src=imagens/bandeira_espanha.jpg></a>";
	document.getElementById("DivEN").innerHTML="<a href=?ac=idioma&lg=EN&acao="+pAcao+"><img src=imagens/bandeira_usa.jpg></a>";
}
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 ;
}
function zoom(id){
	ajax=ajaxInit();
	if(ajax){
		ajax.open('GET','topocart?ac=zoom&id='+id,true);
		ajax.onreadystatechange=function(){
			if(ajax.readyState==4){
				if(ajax.status==200){
					document.getElementById("DivZoom").style.visibility="visible";
					document.getElementById("DivZoom").innerHTML=ajax.responseText;
				}
			}
		}
	}
	ajax.send(null);
}
function fecharZoom(){
	document.getElementById("DivZoom").innerHTML="";
	document.getElementById("DivZoom").style.visibility="hidden";
}