// ================
// Marcas e Modelos

function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function KW_updateItems(d,o,fn) { 
  var i,s,l=MM_findObj(d),b,z=o.options[o.selectedIndex].value;
  l.length=0;
  l.options[0]=new Option('vazio','vazio');
  b=(z!='nill')?eval(z+'_items'):0;
  for(i=0;i<b.length;i++){s=b[i].split("|");l.options[i]=new Option(s[1],s[0]);}
  l.selectedIndex=0;if (!fn) return;eval(fn)
}


// ==================
// Verificação de CPF

function checaCPF (CPF) {
	if (CPF.length != 11 || CPF == "00000000000" || CPF == "11111111111" ||
		CPF == "22222222222" ||	CPF == "33333333333" || CPF == "44444444444" ||
		CPF == "55555555555" || CPF == "66666666666" || CPF == "77777777777" ||
		CPF == "88888888888" || CPF == "99999999999")
		return false;
	soma = 0;
	for (i=0; i < 9; i ++)
		soma += parseInt(CPF.charAt(i)) * (10 - i);
	resto = 11 - (soma % 11);
	if (resto == 10 || resto == 11)
		resto = 0;
	if (resto != parseInt(CPF.charAt(9)))
		return false;
	soma = 0;
	for (i = 0; i < 10; i ++)
		soma += parseInt(CPF.charAt(i)) * (11 - i);
	resto = 11 - (soma % 11);
	if (resto == 10 || resto == 11)
		resto = 0;
	if (resto != parseInt(CPF.charAt(10)))
		return false;
	return true;
 }

function validarCPF()
{
	CPF = document.forms[0].idDoc
    if (checaCPF(CPF.value)) {
    } else {
		window.alert ('Informe seu CPF corretamente');
		CPF.focus();
		return (false)
    }
	if (CPF == "")
	{
		window.alert("Preencha o campo CPF");
		CPF.focus();
		return (false)
	}
	return (true)
}


// ==========================
// Validação Dados Particular

function validarPart() { 
  var n=document.forms[0];
	for ( var i=0;i<n.length;i++) {
      if (n.elements(i).value == "") {
		  if (n.elements(i).name == "ConfirmaSenha") { }
		  else {
			  window.alert("Preencha o campo "+n.elements(i).name);
			  n.elements(i).focus();
			  return (false)
		  }
	  }
	  if (n.elements(i).name == "CEP" && n.elements(i).value.length < 9) {
		  window.alert("Preencha corretamente o "+n.elements(i).name+"\n ex.: 18123-321");
		  n.elements(i).focus();
		  return (false)
	  }
	  if (n.elements(i).name == "Email"){
		 if (n.Email.value.indexOf ('@',0) == -1 || n.Email.value.indexOf ('.',0) == -1){
		     window.alert("Preencha corretamente o campo Email\n ex.: nome@provedor.com.br");
		     n.elements(i).focus();
		     return (false)
		 }
	  }
	  	if (n.ConfirmaSenha.value != "") {
      if (n.Senha.value != n.ConfirmaSenha.value) {
  	  	  window.alert("Senhas não conferem!");
		  n.Senha.focus();
		  return (false) 
	  }
	}

	}

  return (true)
}

// ================
// Verificação CNPJ

function modulo(str) {
   	soma=0;
   	ind=2;
   	for(pos=str.length-1;pos>-1;pos=pos-1) {
   		soma = soma + (parseInt(str.charAt(pos)) * ind);
   		ind++;
   		if(str.length>11) {
   			if(ind>9) ind=2;
   		}
	}
   	resto = soma - (Math.floor(soma / 11) * 11);
   	if(resto < 2) {
    	return 0
   	}
   	else {
   		return 11 - resto
   	}
}

function checaCNPJ(valor) {
	primeiro=valor.substr(1,1);
	falso=true;
	size=valor.length;
	if (size!=14){
		return false;
	}
	size--;
	for (i=2; i<size-1; ++i){
		proximo=(valor.substr(i,1));
		if (primeiro!=proximo) {
			falso=false
		}
	}
	
	if (falso){
		return;
	}
	
   	if(modulo(valor.substring(0,valor.length - 2)) + "" + modulo(valor.substring(0,valor.length - 1)) !=valor.substring(valor.length - 2,valor.length)) {
   		return false;
   	}
   	return true
}

function ValidarCNPJ()
{
	if (checaCNPJ(document.forms[0].idDoc.value)){
    }
    else {
    window.alert ('Preencha corretamente o Campo CNPJ');
    document.forms[0].idDoc.focus()
    return (false)
    }
   	return true
}


// ==============
// Validação Loja

function validarLoja() { 
  var n=document.forms[0];
	for ( var i=0;i<n.length;i++) {
      if (n.elements(i).value == "") {
		  if (n.elements(i).name == "Contato" || n.elements(i).name == "Fax") { }
		  else {
			  window.alert("Preencha o campo "+n.elements(i).name);
			  n.elements(i).focus();
			  return (false)
		  }
	  }
	  if (n.elements(i).name == "CEP" && n.elements(i).value.length < 9) {
		  window.alert("Preencha corretamente o "+n.elements(i).name+"\n ex.: 18123-321");
		  n.elements(i).focus();
		  return (false)
	  }
	}
  return (true)
}


// ==================
// Validação Serviços

function validarServ() { 
  var n=document.forms[0];
	for ( var i=0;i<n.length;i++) {
      if (n.elements(i).value == "") {
		  if (n.elements(i).name == "Fax" || n.elements(i).name == "Site") { }
		  else {
			  window.alert("Preencha o campo "+n.elements(i).name);
			  n.elements(i).focus();
			  return (false)
		  }
	  }

	  if (n.elements(i).name == "CEP" && n.elements(i).value.length < 9) {
		  window.alert("Preencha corretamente o "+n.elements(i).name+"\n ex.: 18123-321");
		  n.elements(i).focus();
		  return (false)
	  }

  	  if (n.elements(i).name == "CNPJ"){
 	  	 if (checaCNPJ(document.forms[0].CNPJ.value)) { }
         else { 
		    window.alert ('Preencha corretamente o Campo CNPJ');
			document.forms[0].CNPJ.focus()
			return (false)
		 }
	  }

	  if (n.elements(i).name == "Email"){
		 if (n.Email.value.indexOf ('@',0) == -1 || n.Email.value.indexOf ('.',0) == -1){
		     window.alert("Preencha corretamente o campo Email\n ex.: nome@provedor.com.br");
		     n.elements(i).focus();
		     return (false)
		 }
	  }



	}

  return (true)
}

// ====================
// Consistência de Data

function mudarmes(mes)
{
	if (mes == 1 || mes == 3 || mes == 5 || mes == 7 || mes == 8 || mes == 10 || mes == 12)
	{
	document.FormParticular.DataNascDia.length = 31
	document.FormParticular.DataNascDia.options[29].text = "30"
	document.FormParticular.DataNascDia.options[29].value = "30"
	document.FormParticular.DataNascDia.options[30].text = "31"
	document.FormParticular.DataNascDia.options[30].value = "31"
	}
	else if (mes == 4 || mes == 6 || mes == 9 || mes == 11)
	{
	document.FormParticular.DataNascDia.length = 30
	document.FormParticular.DataNascDia.options[29].text = "30"
	document.FormParticular.DataNascDia.options[29].value = "30"
	}
	else if (mes == 2)
	{
	document.FormParticular.DataNascDia.length = 30
	}
}


// ===============
// Verificar Placa

function VerificaPlaca(Placa) {
	var rangeinvalido = /[^0-9a-zA-Z]/
	var rangenumeros = /[0-9]/
	var rangeletras = /[a-zA-Z]/
	pos=Placa.value.length
	i=0
	while (i<pos) {
		Placa.value = Placa.value.substring(0,i) + Placa.value.substring(i,i+1).replace(rangeinvalido,"") + Placa.value.substring(i+1,pos)
		i++;
	}
	mascaraplaca=Placa.value
	i=0
	while (i<3) {
		mascaraplaca=mascaraplaca.substring(0,i)+mascaraplaca.substring(i,i+1).replace(rangeletras,"X")+mascaraplaca.substring(i+1,7)
		i++
	}
	i=3
	while (i<7) {
		mascaraplaca=mascaraplaca.substring(0,i)+mascaraplaca.substring(i,i+1).replace(rangenumeros,"9")+mascaraplaca.substring(i+1,7)
		i++
	}
	if (! (mascaraplaca=="XXX9999")){
		return false;
	}
}

function ValidaPlaca(Placa) {
	if (VerificaPlaca(Placa) == false) {
	alert("Informe a Placa corretamente. \nEx.:AAA9999");
	return (false)	}
}


// ================
// Verifica Arquivo

function TestarCampo()
{
	if (document.Arquivo.File.value.length <= 0)
	{
		alert("Nenhum arquivo especificado !");
		return false;
	}
	else
	{
		var strFile, strExtension, intLenth;
		strExtension = "";
		strFile = document.Arquivo.File.value;
		intLenth = strFile.length;
		if(intLenth > 7 && strFile.indexOf(".") != -1)
		{
			strExtension = strFile.substring(intLenth-4, intLenth);
			if(strExtension.indexOf(".") != -1)
			strExtension = strExtension.substring(1,4)
		}
		var Extensions = "GIF,JPG";
		if(Extensions.indexOf(strExtension.toUpperCase()) == -1)
			strExtension = "";
		if(strExtension == "")
		{
		}
	}
}


// ================
// Cadastro Veiculo

function validarVeiculo() { 
  var n=document.forms[0];
	for ( var i=0;i<n.length;i++) {
      if (n.elements(i).value == "") {
		  if (n.elements(i).name == "Versao" || n.elements(i).name == "OutrosDados" || n.elements(i).name == "Portas" || n.elements(i).name == "Quilometragem" || n.elements(i).name == "Plano") { }
		  else {
			  window.alert("Preencha o campo "+n.elements(i).name);
			  n.elements(i).focus();
			  return (false)
		  }
	  }
	}
	if (n.AnoModelo.value < n.AnoFabricacao.value) {
		window.alert("O Ano do Modelo, não deve ser menor que o Ano de Fabricação");
		n.AnoModelo.focus();
		return (false)
	}
	if (isNaN(n.Preco.value)) {
		window.alert("Preencha o campo Preco \nsomente com números, \nsem pontos ou vírgulas");
		n.Preco.focus();
		return (false)
	}
  return (true)
}


// =====================
// Cadastro Veiculo Novo

function validarVeiculoNovo() { 
  var n=document.forms[0];
	for ( var i=0;i<n.length;i++) {
      if (n.elements(i).value == "") {
		  if (n.elements(i).name == "Versao" || n.elements(i).name == "OutrosDados" || n.elements(i).name == "Portas") { }
		  else {
			  window.alert("Preencha o campo "+n.elements(i).name);
			  n.elements(i).focus();
			  return (false)
		  }
	  }
	}
	if (n.AnoModelo.value < n.AnoFabricacao.value) {
		window.alert("O Ano do Modelo, não deve ser menor que o Ano de Fabricação");
		n.AnoModelo.focus();
		return (false)
	}
	if (isNaN(n.Preco.value)) {
		window.alert("Preencha o campo Preco \nsomente com números, \nsem pontos ou vírgulas");
		n.Preco.focus();
		return (false)
	}
  return (true)
}


// ====================
// Mascara para Valores 

function FormataValor(campo,tammax,teclapres) {
	var tecla = teclapres.keyCode;
	vr = document.FormVeiculo[campo].value;
	vr = vr.replace( "/", "" );
	vr = vr.replace( "/", "" );
	vr = vr.replace( ",", "" );
	vr = vr.replace( ".", "" );
	vr = vr.replace( ".", "" );
	vr = vr.replace( ".", "" );
	vr = vr.replace( ".", "" );
	tam = vr.length;

	if (tam < tammax && tecla != 8){ tam = vr.length + 1 ; }

	if (tecla == 8 ){ tam = tam - 1 ; }
		
	if ( tecla == 8 || tecla >= 48 && tecla <= 57 || tecla >= 96 && tecla <= 105 ){
		if ( tam <= 3 ){
	 		document.FormVeiculo[campo].value = vr ; }
	 	if ( (tam > 3) && (tam <= 6) ){
	 		document.FormVeiculo[campo].value = vr.substr( 0, tam - 3 ) + '.' + vr.substr( tam - 3, tam ) ; }
	}		
}


// ===========
// Formata CPF

function FormataCpf(campo,tammax,teclapres) {
	var tecla = teclapres.keyCode;
	vr = document.formCpf[campo].value;
	vr = vr.replace( "/", "" );
	vr = vr.replace( "/", "" );
	vr = vr.replace( ",", "" );
	vr = vr.replace( ".", "" );
	vr = vr.replace( ".", "" );
	vr = vr.replace( ".", "" );
	vr = vr.replace( ".", "" );
	vr = vr.replace( "-", "" );
	vr = vr.replace( "-", "" );
	vr = vr.replace( "-", "" );
	vr = vr.replace( "-", "" );
	vr = vr.replace( "-", "" );
	tam = vr.length;

	if (tam < tammax && tecla != 8){ tam = vr.length + 1 ; }

	if (tecla == 8 ){	tam = tam - 1 ; }
		
	if ( tecla == 8 || tecla >= 48 && tecla <= 57 || tecla >= 96 && tecla <= 105 ){
		if ( tam <= 2 ){ 
	 		document.formCpf[campo].value = vr ; }
	 	if ( (tam > 2) && (tam <= 5) ){
	 		document.formCpf[campo].value = vr.substr( 0, tam - 2 ) + '-' + vr.substr( tam - 2, tam ) ; }
	 	if ( (tam >= 6) && (tam <= 8) ){
	 		document.formCpf[campo].value = vr.substr( 0, tam - 5 ) + '.' + vr.substr( tam - 5, 3 ) + '-' + vr.substr( tam - 2, tam ) ; }
	 	if ( (tam >= 9) && (tam <= 11) ){
	 		document.formCpf[campo].value = vr.substr( 0, tam - 8 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + '-' + vr.substr( tam - 2, tam ) ; }
	 	if ( (tam >= 12) && (tam <= 14) ){
	 		document.formCpf[campo].value = vr.substr( 0, tam - 11 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + '-' + vr.substr( tam - 2, tam ) ; }
	 	if ( (tam >= 15) && (tam <= 17) ){
	 		document.formCpf[campo].value = vr.substr( 0, tam - 14 ) + '.' + vr.substr( tam - 14, 3 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + '-' + vr.substr( tam - 2, tam ) ;}
	}		
}


// ==================
// Mascara para Dados

function FormataDado(campo,tammax,pos,teclapres){
	var tecla = teclapres.keyCode;
	vr = document.forms[0].elements(campo).value;
	vr = vr.replace( "-", "" );
	vr = vr.replace( ".", "" );
	vr = vr.replace( "/", "" );
	tam = vr.length ;

	if (tam < tammax && tecla != 8){ tam = vr.length + 1 ; }

	if (tecla == 8 ){ tam = tam - 1 ; }
			
	if ( tecla == 8 || tecla == 88 || tecla >= 48 && tecla <= 57 || tecla >= 96 && tecla <= 105 ){
		if ( tam <= 2 ){
	 		document.forms[0].elements(campo).value = vr ;}
		if ( tam > pos && tam <= tammax ){
			document.forms[0].elements(campo).value = vr.substr( 0, tam - pos ) + '-' + vr.substr( tam - pos, tam );}
	}
}


// =============================
// Validação de Pesquisa Simples

function validarPesqSimples() { 
  var n=document.forms[0];
  for ( var i=0;i<n.length;i++) {
  if (n.elements(i).name == "Marca") {
    if (n.elements(i).value == "") {
  	    window.alert("Selecione a Marca");
	    n.elements(i).focus();
	    return (false)
	}
  }
  }
  return (true)
}


// ========================
// Valida Consulta Parceria

function validarParceria() { 
  var n=document.forms[0];
  for ( var i=0;i<n.length;i++) {
  if (n.elements(i).name == "LojaTipo") {
    if (n.elements(i).value == "") {
  	    window.alert("Selecione o Tipo da Loja");
	    n.elements(i).focus();
	    return (false)
	}
  }
  }
  return (true)
}


// ==========================
// Validação Dados Particular

function validarCadastro() { 
  var n=document.forms[0];
	for ( var i=0;i<n.length;i++) {
      if (n.elements(i).value == "") {
		  if (n.elements(i).name == "Versao" || n.elements(i).name == "Combustivel" || n.elements(i).name == "Cor" || n.elements(i).name == "OutrosDados" || n.elements(i).name == "Observacoes" || n.elements(i).name == "ConfirmaSenha") { }
		  else {
			  window.alert("Preencha o campo "+n.elements(i).name);
			  n.elements(i).focus();
			  return (false)
		  }
	  }
	  if (n.elements(i).name == "Email"){
		 if (n.Email.value.indexOf ('@',0) == -1 || n.Email.value.indexOf ('.',0) == -1){
		     window.alert("Preencha corretamente o campo Email\n ex.: nome@provedor.com.br");
		     n.elements(i).focus();
		     return (false)
		 }
	  }
	 if (n.ConfirmaSenha.value != "") {
      if (n.Senha.value != n.ConfirmaSenha.value) {
  	  	  window.alert("Senhas não conferem!");
		  n.Senha.focus();
		  return (false) 
	  }
	}

	}

  return (true)
}


// ==========================
// Alterna entre Novo e Usado

function Refresh(vr) {
	location.replace('default.asp?id='+vr);
}


// =================
// Confirma Exclusão 

var clickedButton = false;
function ConfirmaExclusao(tipo) {
  clickedButton = true;
  var msgchk    = false;
  for (var i=0;i<document.forms[1].elements.length;i++){
  		var e = document.forms[1].elements[i];
		if (e.checked == true){
			msgchk = true;
		}
  }
  if (msgchk == true) {
  	if (confirm("Você tem certeza que deseja excluir o(s) veículo(s) selecionado(s)?")) {
		document.forms[1].action = "../excluir/exclusao_"+tipo+".asp";
	} else
	  { return (false) }
  } else {
   	alert("Por favor escolha o(s) veículo(s) que serão excluídos.");
	return (false)
  }
}


// =================
// Confirma Exclusão Moto

var clickedButton = false;
function ExcluirMoto() {
  clickedButton = true;
  var msgchk    = false;
  for (var i=0;i<document.forms[1].elements.length;i++){
  		var e = document.forms[1].elements[i];
		if (e.checked == true){
			msgchk = true;
		}
  }
  if (msgchk == true) {
  	if (confirm("Você tem certeza que deseja excluir a(s) moto(s) selecionada(s)?")) {
		document.forms[1].action = "../excluir/exclusao_motos.asp";
	} else
	  { return (false) }
  } else {
   	alert("Por favor escolha a(s) moto(s) que serão excluídas.");
	return (false)
  }
}

// =================
// Confirma Exclusão Caminhao

var clickedButton = false;
function ExcluirCaminhao() {
  clickedButton = true;
  var msgchk    = false;
  for (var i=0;i<document.forms[1].elements.length;i++){
  		var e = document.forms[1].elements[i];
		if (e.checked == true){
			msgchk = true;
		}
  }
  if (msgchk == true) {
  	if (confirm("Você tem certeza que deseja excluir o(s) caminhão(es) selecionada(s)?")) {
		document.forms[1].action = "../excluir/exclusao_caminhao.asp";
	} else
	  { return (false) }
  } else {
   	alert("Por favor escolha o(s) caminhão(es) que serão excluídas.");
	return (false)
  }
}


// =================
// Remove Caracteres

function RemoveCaracter(campo,teclapres) {
	var tecla = teclapres.keyCode;
	vr = document.forms[0].elements[campo].value;
	vr = vr.replace( "/", "" );
	vr = vr.replace( ",", "" );
	vr = vr.replace( ".", "" );
	vr = vr.replace( "-", "" );
	tam = vr.length;

	if (tam < 10 && tecla != 8){ tam = vr.length + 1 ; }

	if (tecla == 8 ){	tam = tam - 1 ; }
	if ( tecla == 8 || tecla == 88 || tecla >= 48 && tecla <= 57 || tecla >= 96 && tecla <= 105 ){
		if ( tam <= 10 ){ 
	 		document.forms[0].elements[campo].value = vr ; }
	}		
	
}


// ======================
// Função de Lista Carros

function setDynaList(arrDL){

 var oList1 = document.forms[arrDL[2]].elements[arrDL[1]];
 var oList2 = document.forms[arrDL[2]].elements[arrDL[3]];
 var arrList = arrDL[5];
 
 clearDynaList(oList2);
 
 if (oList1.selectedIndex == -1){
  oList1.selectedIndex = 0;
 }

 populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
 return true;
}
 
function clearDynaList(oList){

 for (var i = oList.options.length; i >= 0; i--){
  oList.options[i] = null;
 }
 
 oList.selectedIndex = -1;
}

 
function populateDynaList(oList, nIndex, aArray){
   oList.options[oList.options.length] = new Option("", "");
   for (var i = 0; i < aArray.length; i= i + 3){
	if (aArray[i] == nIndex){
     oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
    }
   }
   if (oList.options.length == 0){
   oList.options[oList.options.length] = new Option("** Modelo **",0);
  }
   oList.selectedIndex = 0;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function Envia(arrDL){

 var selList1 = document.form1.selList1.value;
 var selList2 = document.form2.selList2.value;
}


// ==============================
// Função de Lista Carros e Motos

function fSubmit(Valor)
{
if(Valor=="Sim"){
	if(document.pesquisaVeiculos.TipoVeiculo(0).checked){
		 document.pesquisaVeiculos.action = "../pesquisa/avancada_usados.asp";
		 document.pesquisaVeiculos.method = "";
		 document.pesquisaVeiculos.submit();
	}
	else{
		 document.pesquisaVeiculos.action = "../motos/pesquisa/avancada_usados.asp";
		 document.pesquisaVeiculos.method = "";		 
		 document.pesquisaVeiculos.submit();
	}
}
else{
	if(document.pesquisaVeiculos.TipoVeiculo(0).checked){
		 document.pesquisaVeiculos.action = "../pesquisa/resultado/usados.asp";
		 document.pesquisaVeiculos.method = "";
		 document.pesquisaVeiculos.submit();
	}
	else{
		 document.pesquisaVeiculos.action = "../motos/pesquisa/resultado/usados.asp";
		 document.pesquisaVeiculos.method = "";
		 document.pesquisaVeiculos.submit();
	}
}

}

function listaMarcas(TipoVeiculo){

var objFormField = document.forms[0].Marca

len = objFormField.length;
len_box = objFormField.options.length;
for (j=len_box;j>=0;j--)
	{
	objFormField.options[j] = null;
	}

objFormField.options[0] = new Option("Escolha a marca", "0");
objFormField.options[1] = new Option("-------------------", "0");


if(TipoVeiculo=="Carro"){
	objFormField.options[2] = new Option('Acura',"Acura");objFormField.options[3] = new Option('Alfa Romeo',"Alfa Romeo");objFormField.options[4] = new Option('Asia Motors',"Asia Motors");objFormField.options[5] = new Option('Audi',"Audi");objFormField.options[6] = new Option('Bmw',"Bmw");objFormField.options[7] = new Option('Chevrolet',"Chevrolet");objFormField.options[8] = new Option('Chrysler',"Chrysler");objFormField.options[9] = new Option('Citroen',"Citroen");objFormField.options[10] = new Option('Daewoo',"Daewoo");objFormField.options[11] = new Option('Daihatsu',"Daihatsu");objFormField.options[12] = new Option('Dkw',"Dkw");objFormField.options[13] = new Option('Dodge',"Dodge");objFormField.options[14] = new Option('Engesa',"Engesa");objFormField.options[15] = new Option('Envemo',"Envemo");objFormField.options[16] = new Option('Ferrari',"Ferrari");objFormField.options[17] = new Option('Fiat',"Fiat");objFormField.options[18] = new Option('Ford',"Ford");objFormField.options[19] = new Option('Gmc',"Gmc");objFormField.options[20] = new Option('Gurgel',"Gurgel");objFormField.options[21] = new Option('Honda',"Honda");objFormField.options[22] = new Option('Hyundai',"Hyundai");objFormField.options[23] = new Option('Isuzu',"Isuzu");objFormField.options[24] = new Option('Jaguar',"Jaguar");objFormField.options[25] = new Option('Jeep',"Jeep");objFormField.options[26] = new Option('Kia Motors',"Kia Motors");objFormField.options[27] = new Option('Lada',"Lada");objFormField.options[28] = new Option('Land Rover',"Land Rover");objFormField.options[29] = new Option('Lexus',"Lexus");objFormField.options[30] = new Option('Maserati',"Maserati");objFormField.options[31] = new Option('Mazda',"Mazda");objFormField.options[32] = new Option('Mercedes-Benz',"Mercedes-Benz");objFormField.options[33] = new Option('Mercury',"Mercury");objFormField.options[34] = new Option('Mitsubishi',"Mitsubishi");objFormField.options[35] = new Option('Miura',"Miura");objFormField.options[36] = new Option('Nissan',"Nissan");objFormField.options[37] = new Option('Peugeot',"Peugeot");objFormField.options[38] = new Option('Pontiac',"Pontiac");objFormField.options[39] = new Option('Porsche',"Porsche");objFormField.options[40] = new Option('Puma',"Puma");objFormField.options[41] = new Option('Renault',"Renault");objFormField.options[42] = new Option('Saab',"Saab");objFormField.options[43] = new Option('Seat',"Seat");objFormField.options[44] = new Option('Ssangyong',"Ssangyong");objFormField.options[45] = new Option('Subaru',"Subaru");objFormField.options[46] = new Option('Suzuki',"Suzuki");objFormField.options[47] = new Option('Toyota',"Toyota");objFormField.options[48] = new Option('Troller',"Troller");objFormField.options[49] = new Option('Volkswagen',"Volkswagen");objFormField.options[50] = new Option('Volvo',"Volvo");objFormField.options[51] = new Option('Willys',"Willys");
}
 
if(TipoVeiculo=="Moto"){
	objFormField.options[2] = new Option('Adly',"Adly");objFormField.options[3] = new Option('Agrale',"Agrale");objFormField.options[4] = new Option('Aprilia',"Aprilia");objFormField.options[5] = new Option('Atala',"Atala");objFormField.options[6] = new Option('Bajaj',"Bajaj");objFormField.options[7] = new Option('Beta',"Beta");objFormField.options[8] = new Option('Bimota',"Bimota");objFormField.options[9] = new Option('Bmw',"Bmw");objFormField.options[10] = new Option('Brandy',"Brandy");objFormField.options[11] = new Option('byCristo',"byCristo");objFormField.options[12] = new Option('Cagiva',"Cagiva");objFormField.options[13] = new Option('Caloi',"Caloi");objFormField.options[14] = new Option('Daelim',"Daelim");objFormField.options[15] = new Option('Derby',"Derby");objFormField.options[16] = new Option('Ducati',"Ducati");objFormField.options[17] = new Option('Emme',"Emme");objFormField.options[18] = new Option('Gas Gas',"Gas Gas");objFormField.options[19] = new Option('Harley-Davidson',"Harley-Davidson");objFormField.options[20] = new Option('HartFord',"HartFord");objFormField.options[21] = new Option('Hero',"Hero");objFormField.options[22] = new Option('Honda',"Honda");objFormField.options[23] = new Option('Husaberg',"Husaberg");objFormField.options[24] = new Option('Husqvarna',"Husqvarna");objFormField.options[25] = new Option('Jialing',"Jialing");objFormField.options[26] = new Option('Kasinski / Hyosung',"Kasinski / Hyosung");objFormField.options[27] = new Option('Kawasaki',"Kawasaki");objFormField.options[28] = new Option('Kimco',"Kimco");objFormField.options[29] = new Option('Ktm',"Ktm");objFormField.options[30] = new Option('Lavrale',"Lavrale");objFormField.options[31] = new Option('Moto Guzzi',"Moto Guzzi");objFormField.options[32] = new Option('Mv Agusta',"Mv Agusta");objFormField.options[33] = new Option('Orca',"Orca");objFormField.options[34] = new Option('Peugoet',"Peugoet");objFormField.options[35] = new Option('Piaggio',"Piaggio");objFormField.options[36] = new Option('Sanyang',"Sanyang");objFormField.options[37] = new Option('Siamoto',"Siamoto");objFormField.options[38] = new Option('Sundown',"Sundown");objFormField.options[39] = new Option('Suzuki',"Suzuki");objFormField.options[40] = new Option('Triumph',"Triumph");objFormField.options[40] = new Option('Yamaha',"Yamaha");
}
}

