function montaFlash(swf, width, height, wmode, cache)
{
noCache = cache || cache == undefined ? "" : "?" + new Date();

monta_swf = "";
monta_swf += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+ width +"\" height=\""+ height +"\" title=\"\">";
monta_swf += "<param name=\"movie\" value=\""+ swf + noCache +"\" />";
monta_swf += "<param name=\"quality\" value=\"high\" />";
monta_swf += "<param name=\"menu\" value=\"0\" />";
monta_swf += "<embed src=\""+ swf + noCache +"\" quality=\"high\" wmode=\""+ wmode +"\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+ width +"\" height=\""+ height +"\"></embed>";
monta_swf += "</object>";

document.write(monta_swf);
}

/*
style="visibility:hidden
style="visibility:visible"

*/

/*
function ShowMenu(idmenu)
{
 if(idmenu != 0)
  {
   document.getElementById("novabusca").style.display = 'none';
   //document.getElementById("vazio").style.display = 'none';
   document.getElementById("cidade").style.display = 'none';	
   document.getElementById("cadastro").style.display = 'none';	
   document.getElementById(idmenu).style.display = 'inline';
   }
  else
   {
    document.getElementById("novabusca").style.display = 'none';
    document.getElementById("cidade").style.display = 'none';	
    document.getElementById("cadastro").style.display = 'none';	
   }
}
function ShowMenuB(idmenu)
{
	if(idmenu != 0){
	document.getElementById("novabusca").style.visibility = 'hidden';
	//document.getElementById("vazio").style.visibility = 'none';
	document.getElementById("cidade").style.visibility = 'hidden';	
	document.getElementById("cadastro").style.visibility = 'hidden';	
	document.getElementById(idmenu).style.visibility = 'visible';
	}else{
	document.getElementById("novabusca").style.visibility = 'hidden';
	document.getElementById("cidade").style.visibility = 'hidden';	
	document.getElementById("cadastro").style.visibility = 'hidden';	
	}
}
*/

function ShowEntidades(ident, vis)
{
	
	if(vis != 0){
	document.getElementById(ident + "act").style.display = 'none';
	document.getElementById(ident + "no").style.display = 'inline';
	document.getElementById(ident).style.display = 'inline';

	}else{
	document.getElementById(ident + "act").style.display = 'inline';
	document.getElementById(ident + "no").style.display = 'none';
	document.getElementById(ident).style.display = 'none';
	}


}


function showEnd(contr, nanuncio, ass, seqend, sfig, vis, bg, inibe)
{
// alert ('Parâmetros =' + contr +'-'+ nanuncio +'-'+ ass +'-'+ seqend +'-'+ sfig +'-'+ vis +'-'+ bg +'-'+ inibe);

if (vis == 1)
{
switch(bg)
{
 case "ANIMLT":
 	largura = 450;
	altura = 80;
 break;

case "AACANIT":
 	largura = 450;
	altura = 80;
 break;
 
 case "ANI":
 	largura = 450;
	altura = 80;
 break;

<!-- Matéria EPIL -->
 case "ANIM":
 	largura = 450;
	altura = 80;
 break;
<!-- / -->

 case "DCLGMLT":
 	largura = 450;
	altura = 80;
 break;	   

 case "DCLGM":
 	largura = 450;
	altura = 80;
 break;

 case "DCLGLT":
 	largura = 450;
	altura = 80;
 break;	   

 case "DCLG":
 	largura = 450;
	altura = 80;
 break;
 
 case "DCLT":
 	largura = 450;
	altura = 80;
 break;

 case "DCM":
 	largura = 450;
	altura = 80;
 break;

 case "DC":
 	largura = 450;
	altura = 80;
 break;
 
case "DCI":
 	largura = 450;
	altura = 80;
break;

 case "IB":
 	largura = 450;
	altura = 50;
 break;
 
 case "":
 	largura = 450;
	altura = 50;
 break;

case "0":
 	largura = 450;
	altura = 50;
 break;	  

 case "      ":
 	largura = 450;
	altura = 50;
 break;	  

 case "99":
 	largura = 450;
	altura = 50;
 break;	  
}
	mostralink = " <IFRAME name=\"endereco\" marginWidth=\"0\" marginHeight=\"0\" 	src=\"http://www.123achei.com.br/buscas/123achei/resultados/includes/lograd.php?ctr=" + contr +  "&nra=" + nanuncio +  "&ass=" + ass +  "&seq=" + seqend + "&sf=" + sfig + "&bg=" + bg + "&inib=" + inibe + "\" frameBorder=\"0\"  height=\"" + altura + "\" width=\"" + largura + "\" scrolling=\"no\" ></IFRAME>";
	document.getElementById(contr + nanuncio + ass + seqend + sfig).innerHTML = mostralink;
	document.getElementById(contr + nanuncio + ass + seqend + sfig).style.display = 'inline';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + "act").style.display = 'inline';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + "no").style.display = 'none';
}
else
{
		
	document.getElementById(contr + nanuncio + ass + seqend + sfig).style.display = 'none';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + "act").style.display = 'none';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + "no").style.display = 'inline';
}
}

function showOpcoesLista(contr, nanuncio, ass, seqend, sfig, vis, op, anuncio, altura)
{



if (vis == 1){


	
	switch(op){
	  case "info":
	  altura = 390;
	  //janelas
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "email").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiq").style.display = 'none';
	  //document.getElementById(contr + nanuncio + ass + seqend + sfig + "lista").style.display = 'none';
	  //botoes
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailno").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqno").style.display = 'inline';
  	 // document.getElementById(contr + nanuncio + ass + seqend + sfig + "listaact").style.display = 'none';
	  //document.getElementById(contr + nanuncio + ass + seqend + sfig + "listano").style.display = 'inline';

	  break;
	  
	  case "email":
	  altura = 270;
	  //janelas
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "info").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiq").style.display = 'none';
	 // document.getElementById(contr + nanuncio + ass + seqend + sfig + "lista").style.display = 'none';
	  //botoes
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infoact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infono").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqno").style.display = 'inline';
  	 // document.getElementById(contr + nanuncio + ass + seqend + sfig + "listaact").style.display = 'none';
	  //document.getElementById(contr + nanuncio + ass + seqend + sfig + "listano").style.display = 'inline';	  
	  break;
	  
	  case "indiq":
	  altura = 270;
	  //janelas
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "info").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "email").style.display = 'none';
	 // document.getElementById(contr + nanuncio + ass + seqend + sfig + "lista").style.display = 'none';
	  //botoes
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infoact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infono").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailno").style.display = 'inline';
  	  //document.getElementById(contr + nanuncio + ass + seqend + sfig + "listaact").style.display = 'none';
	 // document.getElementById(contr + nanuncio + ass + seqend + sfig + "listano").style.display = 'inline';	  
	  break;  
	  
 
  	} 

	mostralink = " <IFRAME name=" + contr + nanuncio + ass + seqend + sfig + " marginWidth=\"0\" marginHeight=\"0\" src=\"/v2/" + op + ".php?contr="+ contr +"&nanuncio="+ nanuncio +"&ass="+ ass +"&seqend="+ seqend +"&sfig="+ sfig +"&peso="+ anuncio +"\" frameBorder=\"0\"  height=\"" + altura + "\" width=\"518\" scrolling=\"no\" ></IFRAME>";

	document.getElementById(contr + nanuncio + ass + seqend + sfig + op).innerHTML = mostralink;
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op).style.display = 'inline';

	document.getElementById(contr + nanuncio + ass + seqend + sfig + op + "act").style.display = 'inline';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op + "no").style.display = 'none';

	}else{
		
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op).style.display = 'none';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op + "act").style.display = 'none';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op + "no").style.display = 'inline';
	}

}

function showOpcoes(contr, nanuncio, ass, seqend, sfig, vis, op, anuncio, altura)
{



if (vis == 1){


	
	switch(op){
	  case "info":
	  altura = 360;
	  //janelas
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "email").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiq").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "lista").style.display = 'none';
	  //botoes
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailno").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqno").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "listaact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "listano").style.display = 'inline';

	  break;
	  
	  case "email":
	  altura = 255;
	  //janelas
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "info").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiq").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "lista").style.display = 'none';
	  //botoes
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infoact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infono").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqno").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "listaact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "listano").style.display = 'inline';	  
	  break;
	  
	  case "indiq":
	  altura = 255;
	  //janelas
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "info").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "email").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "lista").style.display = 'none';
	  //botoes
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infoact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infono").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailno").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "listaact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "listano").style.display = 'inline';	  
	  break;  
	  
	  case "lista":
	  altura = 160;
	  //janelas
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "info").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "email").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiq").style.display = 'none';
	  //botoes
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infoact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "infono").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "emailno").style.display = 'inline';
  	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqact").style.display = 'none';
	  document.getElementById(contr + nanuncio + ass + seqend + sfig + "indiqno").style.display = 'inline';
	  break; 
  	} 

	mostralink = " <IFRAME name=" + contr + nanuncio + ass + seqend + sfig + " marginWidth=\"0\" marginHeight=\"0\" src=\"http://www.123achei.com.br/buscas/123achei/resultados/" + op + ".php?contr="+ contr +"&nanuncio="+ nanuncio +"&ass="+ ass +"&seqend="+ seqend +"&sfig="+ sfig +"&peso="+ anuncio +"\" frameBorder=\"0\"  height=\"" + altura + "\" width=\"600\" scrolling=\"no\" ></IFRAME>";

	document.getElementById(contr + nanuncio + ass + seqend + sfig + op).innerHTML = mostralink;
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op).style.display = 'inline';

	document.getElementById(contr + nanuncio + ass + seqend + sfig + op + "act").style.display = 'inline';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op + "no").style.display = 'none';

	}else{
		
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op).style.display = 'none';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op + "act").style.display = 'none';
	document.getElementById(contr + nanuncio + ass + seqend + sfig + op + "no").style.display = 'inline';
	}

}


///titulos atividade
function jump_regiao(URL){
   URL = "/v2/r_atividade_res.php?regiao=" + URL + "&idatividade=" + document.localizacao.atividade.value;
   window.location.href = URL;
}
function jump_cidade(URL){
   URL = "/v2/r_atividade_res.php?ccidade=" + URL + "&idatividade=" + document.localizacao.atividade.value + "&regiao="+ document.localizacao.regiao.options[document.localizacao.regiao.selectedIndex].value;
   window.location.href = URL;
}
///resposta atividade
function jump_regiao_ativ(URL){
   URL = "/v2/r_atividade.php?regiao=" + URL + "&atividade=" + document.localizacao.atividade.value;
   window.location.href = URL;
}
function jump_cidade_ativ(URL){
   URL = "/v2/r_atividade.php?ccidade=" + URL + "&atividade=" + document.localizacao.atividade.value + "&regiao="+ document.localizacao.regiao.options[document.localizacao.regiao.selectedIndex].value;
   window.location.href = URL;
}
///titulos alfabetica
function jump_regiao_alfa(URL){
   URL = "/v2/r_alfa.php?regiao=" + URL + "&alfa=" + document.localizacao.alfa.value;
   window.location.href = URL;
}
function jump_cidade_alfa(URL){
   URL = "/v2/r_alfa.php?ccidade=" + URL + "&alfa=" + document.localizacao.alfa.value + "&regiao="+ document.localizacao.regiao.options[document.localizacao.regiao.selectedIndex].value;
   window.location.href = URL;
}
///resposta empresa
function jump_regiao_emp(URL){
   URL = "/v2/r_empresa.php?regiao=" + URL + "&empresa=" + document.localizacao.empresa.value;
   window.location.href = URL;
}
function jump_cidade_emp(URL){
   URL = "/v2/r_empresa.php?ccidade=" + URL + "&empresa=" + document.localizacao.empresa.value + "&regiao="+ document.localizacao.regiao.options[document.localizacao.regiao.selectedIndex].value;
   window.location.href = URL;
}
function jump_minhacidade(URL){
   URL = "/v2/cidades/index.php?cidade=" + URL + "&m="+document.formcidades.m.value;
   window.location.href = URL;
}
function jump_minhacidadetit(URL){
   URL = "/v2/cidades/cid_menus.php?cidade=" + URL + "&m="+document.formcidades.m.value;
   window.location.href = URL;
}
function jump_minhacidade_titulos(URL){
   URL = "/v2/cidades/cid_menus.php?titulo=" + URL + "&m="+document.formtituloscid.m.value+"&cidade=" + document.formtituloscid.cidade.value;
   window.location.href = URL;
}
function jump_eventos(URL){
   URL = "/v2/eventos/ev_home.php?cidade=" + URL + "&m=1";
   window.location.href = URL;
}

/////VITRINE
function jump_automarca(URL){
   URL = "/v2/vitrine/admin/auto_formA.php?codmarca=" + URL + "&codtipo="+document.formA.tipo_veiculo.value+"&codestado="+document.formA.estado.value+"&user="+document.formA.cod_usuario.value;
   window.location.href = URL;
}
function jump_automarcahome(URL){
   URL = "/v2/vitrine/vit_home.php?codmarca=" + URL ;
   window.location.href = URL;
}
function jump_imoveltipo(URL){
   URL = "/v2/vitrine/admin/imov_formA.php?tipoimovel=" + URL;
   window.location.href = URL;
}
function jump_vitrineautocidade(URL){
   URL = "/v2/vitrine/auto_res.php?cidade=" + URL + 
   "&marca="+document.refine.marca.value +
   "&modelo="+document.refine.modelo.value +
   "&ano_de="+document.refine.ano_de.value +
   "&ano_ate="+document.refine.ano_ate.value +
   "&valor_de="+document.refine.valor_de.value +
   "&valor_ate="+document.refine.valor_ate.value +
   "&ord="+document.refine.ord.options[document.refine.ord.selectedIndex].value;
   window.location.href = URL;
}
function jump_vitrineautoord(URL){
   URL = "/v2/vitrine/auto_res.php?cidade=" + document.refine.cidade.options[document.refine.cidade.selectedIndex].value + 
   "&marca="+document.refine.marca.value +
   "&modelo="+document.refine.modelo.value +
   "&ano_de="+document.refine.ano_de.value +
   "&ano_ate="+document.refine.ano_ate.value +
   "&valor_de="+document.refine.valor_de.value +
   "&valor_ate="+document.refine.valor_ate.value +
   "&ord="+ URL;
   window.location.href = URL;
}
function jump_vitrineimovcidade(URL){
   URL = "/v2/vitrine/imov_res.php?cidade=" + URL + 
   "&estado="+document.refine.estado.value +
   "&tipo="+document.refine.tipo.value +
   "&dorm="+document.refine.dorm.value +
   "&ord="+document.refine.ord.options[document.refine.ord.selectedIndex].value;
   window.location.href = URL;
}
function jump_vitrineimovord(URL){
   URL = "/v2/vitrine/imov_res.php?cidade=" + document.refine.cidade.options[document.refine.cidade.selectedIndex].value + 
   "&estado="+document.refine.estado.value +
   "&tipo="+document.refine.tipo.value +
   "&dorm="+document.refine.dorm.value +
   "&ord="+ URL;
   window.location.href = URL;
}
function jump_vitrineprodcidade(URL){
   URL = "/v2/vitrine/prod_res.php?cidade=" + URL + 
   "&tb="+document.refine.tb.value +
   "&nomeprod="+document.refine.nomeprod.value +
   "&ativi="+document.refine.ativi.value +
   "&ord="+document.refine.ord.options[document.refine.ord.selectedIndex].value;
   window.location.href = URL;
}
function jump_vitrineprodord(URL){
   URL = "/v2/vitrine/prod_res.php?cidade=" + document.refine.cidade.options[document.refine.cidade.selectedIndex].value + 
   "&tb="+document.refine.tb.value +
   "&nomeprod="+document.refine.nomeprod.value +
   "&ativi="+document.refine.ativi.value +
   "&ord="+ URL;
   window.location.href = URL;
}
function ShowVejamais(idveja)
{

	if (idveja == 1){
		document.getElementById('vejamais').style.display = 'inline';
		document.getElementById('bt_vejamais_no').style.display = 'none';
		document.getElementById('bt_vejamais_act').style.display = 'inline';

	}else{
		document.getElementById('vejamais').style.display = 'none';
		document.getElementById('bt_vejamais_no').style.display = 'inline';
		document.getElementById('bt_vejamais_act').style.display = 'none';

	}
}
function ShowAnuncio(vis, op, anuncio, altura)
{

if (vis == 1){
	
	switch(op){
	  case "info":
	  altura = 380;
	  //janelas
	  document.getElementById(anuncio + "email").style.display = 'none';
	  document.getElementById(anuncio + "indiq").style.display = 'none';
	  document.getElementById(anuncio + "lista").style.display = 'none';
	  //botoes
  	  document.getElementById(anuncio + "emailact").style.display = 'none';
	  document.getElementById(anuncio + "emailno").style.display = 'inline';
  	  document.getElementById(anuncio + "indiqact").style.display = 'none';
	  document.getElementById(anuncio + "indiqno").style.display = 'inline';
  	  document.getElementById(anuncio + "listaact").style.display = 'none';
	  document.getElementById(anuncio + "listano").style.display = 'inline';

	  break;
	  
	  case "email":
	  altura = 274;
	  //janelas
	  document.getElementById(anuncio + "info").style.display = 'none';
	  document.getElementById(anuncio + "indiq").style.display = 'none';
	  document.getElementById(anuncio + "lista").style.display = 'none';
	  //botoes
	  if(anuncio == "anim"){
	  document.getElementById(anuncio + "infoact").style.display = 'none';
	  document.getElementById(anuncio + "infono").style.display = 'inline';
	  }else{
	  document.getElementById(anuncio + "infoact").style.display = 'none';
	  document.getElementById(anuncio + "infono").style.display = 'none';
	  }
  	  document.getElementById(anuncio + "indiqact").style.display = 'none';
	  document.getElementById(anuncio + "indiqno").style.display = 'inline';
  	  document.getElementById(anuncio + "listaact").style.display = 'none';
	  document.getElementById(anuncio + "listano").style.display = 'inline';	  
	  break;
	  
	  case "indiq":
	  altura = 274;
	  //janelas
	  document.getElementById(anuncio + "info").style.display = 'none';
	  document.getElementById(anuncio + "email").style.display = 'none';
	  document.getElementById(anuncio + "lista").style.display = 'none';
	  //botoes
	  if(anuncio == "anim"){
	  document.getElementById(anuncio + "infoact").style.display = 'none';
	  document.getElementById(anuncio + "infono").style.display = 'inline';
	  }else{
	  document.getElementById(anuncio + "infoact").style.display = 'none';
	  document.getElementById(anuncio + "infono").style.display = 'none';
	  }
  	  document.getElementById(anuncio + "emailact").style.display = 'none';
	  document.getElementById(anuncio + "emailno").style.display = 'inline';
  	  document.getElementById(anuncio + "listaact").style.display = 'none';
	  document.getElementById(anuncio + "listano").style.display = 'inline';	  
	  break;  
	  
	  case "lista":
	  altura = 158;
	  //janelas
	  document.getElementById(anuncio + "info").style.display = 'none';
	  document.getElementById(anuncio + "email").style.display = 'none';
	  document.getElementById(anuncio + "indiq").style.display = 'none';
	  //botoes
	  if(anuncio == "anim"){
	  document.getElementById(anuncio + "infoact").style.display = 'none';
	  document.getElementById(anuncio + "infono").style.display = 'inline';
	  }else{
	  document.getElementById(anuncio + "infoact").style.display = 'none';
	  document.getElementById(anuncio + "infono").style.display = 'none';
	  }
  	  document.getElementById(anuncio + "emailact").style.display = 'none';
	  document.getElementById(anuncio + "emailno").style.display = 'inline';
  	  document.getElementById(anuncio + "indiqact").style.display = 'none';

	  document.getElementById(anuncio + "indiqno").style.display = 'inline';
	  break; 
  	} 

	mostralink = " <IFRAME name=" + anuncio + " marginWidth=\"0\" marginHeight=\"0\" src=\"/v2/inst/" + op + ".php?peso="+ anuncio +"\" frameBorder=\"0\"  height=\"" + altura + "\" width=\"518\" scrolling=\"no\" ></IFRAME>";

	document.getElementById(anuncio + op).innerHTML = mostralink;
	document.getElementById(anuncio + op).style.display = 'inline';

	document.getElementById(anuncio + op + "act").style.display = 'inline';
	document.getElementById(anuncio + op + "no").style.display = 'none';

	}else{
		
	document.getElementById(anuncio + op).style.display = 'none';
	document.getElementById(anuncio + op + "act").style.display = 'none';
	document.getElementById(anuncio + op + "no").style.display = 'inline';
	}

}

function showEndAnuncios(vis, bg)
{
	if (vis == 1){

	switch(bg){
	  case "anim":
		largura = 365;
	  break;
	  case "dcilg":
		largura = 365;
	  break;
	  case "dci":
		largura = 365;
	  break;
  	  case "ib":
		largura = 365;
	  break;	  

	}
	
	mostralink = " <IFRAME name=\"endereco\" marginWidth=\"0\" marginHeight=\"0\" 	src=\"/v2/inst/lograd.php?bg=" + bg + "\" frameBorder=\"0\"  height=\"48\" width=\"" + largura + "\" scrolling=\"no\" ></IFRAME>";
	document.getElementById(bg + "end").innerHTML = mostralink;
	document.getElementById(bg + "end").style.display = 'inline';
	document.getElementById(bg + "act").style.display = 'inline';
	document.getElementById(bg + "no").style.display = 'none';

	}else{
		
	document.getElementById(bg + "end").style.display = 'none';
	document.getElementById(bg + "act").style.display = 'none';
	document.getElementById(bg + "no").style.display = 'inline';
	}
}
function ShowLogin(id)
{
	if(id == 1){
	document.getElementById("login").style.display = 'inline';
	document.getElementById("esqueci").style.display = 'none';
	}else{
	document.getElementById("login").style.display = 'none';
	document.getElementById("esqueci").style.display = 'inline';
	}
}

function ShowFoto(idfoto,flg,vitrine)
{
	img = "<img src='/v2/imagens/vitrine/" + vitrine + "/grd/" + idfoto + flg + ".jpg' width='428' height='321'>";
	document.getElementById('amp_foto').innerHTML = img;
}
/*
function submit_form(){
	
      if (document.formA.marca.value == 0){ alert("Escolha uma marca");document.formA.marca.focus();}
      else {document.formA.submit();}
	  
      if (document.formA.modelo.value == 0){ alert("Escolha um modelo");document.formA.modelo.focus();}
      else {document.formA.submit();}
      
	  if (document.formA.ano_fabricacao.value == 0){ alert("Escolha um fabricacao");document.formA.ano_fabricacao.focus();}
      else {document.formA.submit();}
      
	  if (document.formA.ano_modelo.value == 0){ alert("Escolha um ano modelo");document.formA.ano_modelo.focus();}
      else {document.formA.submit();}
      
	  if (document.formA.cor.value == 0){ alert("Escolha um cor");document.formA.cor.focus();}
      else {document.formA.submit();}
      
	  if (document.formA.valor.value == 0){ alert("Escolha um valor");document.formA.valor.focus();}
      else {document.formA.submit();}
      
	  if (document.formA.versao.value == 0){ alert("Escolha um versao");document.formA.versao.focus();}
      else {document.formA.submit();}
      
	  if (document.formA.cilindrada.value == 0){ alert("Escolha um cc");document.formA.cilindrada.focus();}
      else {document.formA.submit();}
	  
}
*/
function submit_form(){
	
      if (document.formA.marca.value == 0){ alert("Escolha uma marca");document.formA.marca.focus();}
      else {//document.formA.submit();}
	  
      	if (document.formA.modelo.value == 0){ alert("Escolha um modelo");document.formA.modelo.focus();}
      	else {//document.formA.submit();}
      
	  		if (document.formA.ano_fabricacao.value == 0){ alert("Escolha um fabricacao");document.formA.ano_fabricacao.focus();}
      		else {//document.formA.submit();}
      
	  			if (document.formA.ano_modelo.value == 0){ alert("Escolha um ano modelo");document.formA.ano_modelo.focus();}
      			else {//document.formA.submit();}
      
	  				if (document.formA.cor.value == 0){ alert("Escolha um cor");document.formA.cor.focus();}
      				else {//document.formA.submit();}
      
	  					if (document.formA.valor.value == 0){ alert("Escolha um valor");document.formA.valor.focus();}
      					else {//document.formA.submit();}
      
	  						if (document.formA.versao.value == 0){ alert("Escolha um versao");document.formA.versao.focus();}
      						else {//document.formA.submit();}
      
	  							if (document.formA.cilindrada.value == 0){ alert("Escolha um cc");document.formA.cilindrada.focus();}
      							else {document.formA.submit();}
							}
	  					}
					}
				}
			}
		}
	}
}

