$(function() {	//quero um imovel    $('#form-escolha-vl').validate({        rules: {            txtNome: {                required: true,                minlength: 2            },            txtEmail: {                required: true,                email: true            },			txtAssunto: {                required: true,                            },            txtMsg: {                required: true            }        },        messages: {                       txtNome: " *",			txtEmail:{				required: " *",				email: "Digite um e-mail válido"			},		            txtAssunto: " *",            txtMsg: " *"        }    });		//contato	 $('#form-envia-contato').validate({        rules: {			txtNome:{                required: true,                            },						txtMsg:{                required: true,                            },					txtAssunto:{                required: true,                           },			txtEmail:{                required: true,                email: true            }        },        messages: {                       txtNome: " *",            txtMsg: " *",            txtAssunto: " *",           			txtEmail:{			required: " *",			email: "Digite um e-mail válido"			}			        }	    });		$("#form_news").validate({	rules: {			txtNewsletter:{                required: true,                email: true                           }			},	messages:{				txtNewsletter:{				required: "Preencha este Campo.",				email: "Digite um e-mail válido."				}			}		});});// JavaScript Document// Chama a função loadFunctions ao carregar a página	window.onload = loadFunctions;// Função que chama outras funções	function loadFunctions() {		iniciaListBox();	}		function iniciaListBox(){		var campo = gE('locacao-vendaL');		if (gE('locacao-vendaL')){			campo.setAttribute('checked', 'checked');			insereListBox(campo.value);		}	}		// Utilizada para evitar digitar o document.getElementByIdfunction gE(ID){	return document.getElementById(ID);}// Utilizada para evitar digitar o document.getElementsByTagNamefunction gEs(tag) {	return document.getElementsByTagName(tag);}function insereListBox(tipo){	var lbValor = gE('selValor');					if ( tipo == 'L'){			lbValor.innerHTML = '';							var novo = document.createElement("option");			novo.setAttribute("id", "opcoes0");			novo.value = '0';			novo.text  = 'Todos';			lbValor.options.add(novo);						var novo = document.createElement("option");			novo.setAttribute("id", "opcoes1");			novo.value = '1';			novo.text  = 'Até 200,00';				lbValor.options.add(novo);						var novo1 = document.createElement("option");			novo1.setAttribute("id", "opcoes2");			novo1.value = '2';			novo1.text  = '201,00 até 300,00';				lbValor.options.add(novo1);						var novo2 = document.createElement("option");			novo2.setAttribute("id", "opcoes3");			novo2.value = '3';			novo2.text  = '301,00 até 400,00';				lbValor.options.add(novo2);						var novo3 = document.createElement("option");			novo3.setAttribute("id", "opcoes4");			novo3.value = '4';			novo3.text  = '401,00 até 500,00';				lbValor.options.add(novo3);						var novo4 = document.createElement("option");			novo4.setAttribute("id", "opcoes5");			novo4.value = '5';			novo4.text  = '501,00 até 600,00';				lbValor.options.add(novo4);						var novo5 = document.createElement("option");			novo5.setAttribute("id", "opcoes6");			novo5.value = '6';			novo5.text  = '601,00 até 800,00';				lbValor.options.add(novo5);						var novo6 = document.createElement("option");			novo6.setAttribute("id", "opcoes7");			novo6.value = '7';			novo6.text  = 'Acima de R$ 800,00';				lbValor.options.add(novo6);				}				if (tipo == 'V'){			lbValor.innerHTML = '';									var novo = document.createElement("option");			novo.setAttribute("id", "opcoes0");			novo.value = '0';			novo.text  = 'Todos';			lbValor.options.add(novo);						var novo = document.createElement("option");			//atribui um ID a esse elemento			novo.setAttribute("id", "opcoes1");			novo.value = '1';			novo.text  = 'Até 20.000,00';				lbValor.options.add(novo);						var novo1 = document.createElement("option");			novo1.setAttribute("id", "opcoes2");			novo1.value = '2';			novo1.text  = '20.001,00 até 40.000,00';				lbValor.options.add(novo1);						var novo2 = document.createElement("option");			novo2.setAttribute("id", "opcoes3");			novo2.value = '3';			novo2.text  = '40.001,00 até 60.000,00';				lbValor.options.add(novo2);						var novo3 = document.createElement("option");			novo3.setAttribute("id", "opcoes4");			novo3.value = '4';			novo3.text  = '60.001,00 até 80.000,00';				lbValor.options.add(novo3);						var novo4 = document.createElement("option");			novo4.setAttribute("id", "opcoes5");			novo4.value = '5';			novo4.text  = '80.001,00 até 120.000,00';				lbValor.options.add(novo4);						var novo5 = document.createElement("option");			novo5.setAttribute("id", "opcoes6");			novo5.value = '7';			novo5.text  = 'Acima de R$ 120.000,00';				lbValor.options.add(novo5);					}	}function openAjax() {	var ajax;	try {		ajax = new XMLHttpRequest();	} catch(ee) {		try {			ajax = new ActiveXObject("Msxml2.XMLHTTP");		} catch(e) {			try {				ajax = new ActiveXObject("Microsoft.XMLHTTP");			} catch(E) {				ajax = false;			}		}	}	return ajax;}
