function simule() {
	var url="http://www.creditto.com.br/simulacao-imoveis-sao-jose-dos-campos-pop.asp?valor_financ="+escape(document.getElementById("valor_financ").value)+
		"&valor="+escape(document.getElementById("valor").value)+"&renda="+escape(document.getElementById("renda").value)+"&nasc="+escape(document.getElementById("nasc").value);

	wb(url,550,500,",menubar=no,scrollbars=yes,resizable=no,status=yes,location=no,tollbar=no","wsim",+30,0,null,1);
	return false;
}

function w_im(end) {
	if(typeof(end)!="string")end=end.href;
	if(end.indexOf(".asp")==-1)end="imovel.asp?im="+end;
	end=rpl(end,'imovel.asp?','imovel_pop.asp?')
	wb(end,638,500,",menubar=no,scrollbars=yes,resizable=no,status=yes,location=no,tollbar=no","_blank",+30,0,null,1);
	return false;
}
function wchat(topic,nome,corretor,cliente,tempo) {
//group,nome corretor,id corrtor,nome cliente,tempo cliente

	if(topic==null){
		wb(endsite+'/chat/index.asp',440,346,
			',menubar=no,scrollbars=no,resizable=yes,status=no,location=no,tollbar=no','_blank',null,0)
	}else if(topic && nome && corretor && cliente==null && tempo==null)if(topic!=''){
		wb(endsite+'/chat/chatroom.asp?ajax=1&Topic='+topic+'&Name='+nome+
			'&corretor='+corretor+'&cliente='+cliente+'&tempo='+tempo,440,396,
			',menubar=no,scrollbars=no,resizable=yes,status=no,location=no,tollbar=no','_blank',null,0)
	}else if(topic && nome && corretor && cliente && tempo)if(topic!=''){
		wb(endsite+'/chat/atender.asp?ajax=1&Topic='+topic+'&Name='+nome+
			'&corretor='+corretor+'&cliente='+cliente+'&tempo='+tempo,440,396,
			',menubar=no,scrollbars=no,resizable=yes,status=no,location=no,tollbar=no','_blank',null,0)
	}
	return false;
}
function initChecklist() {
				var lists = document.getElementsByTagName("ul");
				for (i = 0; i < lists.length; i++) {
					var theList = lists[i];
					if (theList.className.indexOf("checklist") > -1) {
						var labels = theList.getElementsByTagName("label");
						for (var j = 0; j < labels.length; j++) {
							var theLabel = labels[j];
							if(document.all && document.getElementById){
								theLabel.onmouseover = function() { this.className += " hover"; };
								theLabel.onmouseout = function() { this.className = this.className.replace(" hover", ""); };
//								theLabel.onmousedown = function() { alert('');};
							}
							
						}
					}
				}
}
//onready(initChecklist);

function mil_b(o,a) {
	o=$o(o)
	if(o.value=='' && a!=null){
		o.value='Digite o Valor '+a;
		o.style.color='gray';
	}else if(fnum(rpl(o.value,'.'))<=999){
		$c(o,(rpl(preal(fnum(rpl($v(o),'.'))*1000),',00')));
	}
}


