PageSourceSearch

https://www.franciosi.com.br/kurole_include/js/js.js?v=3

js franciosi.com.br collected 2026-10-02 00:14:36 UTC 12,759 bytes, 423 lines download raw bytes

1
2	var url_dominio = window.location.href;
3	url_dominio = url_dominio.split("/");
4	
5	//comentei pq estava aplicando 2 mascaras 
6	window.document.write('<script language="javascript" src="'+url_dominio[0]+'//'+url_dominio[2]+'/kurole_include/js/jquery.maskedinput.min-1.3.1.js"></script>'); // esta mskedinput funciona com jquery 10
7	window.document.write('<script language="javascript" src="'+url_dominio[0]+'//'+url_dominio[2]+'/kurole_include/biblioteca/jquery-mask-plugin/1.14.15/dist/jquery.mask.min.js"></script>');
8	window.document.write('<script language="javascript" src="'+url_dominio[0]+'//'+url_dominio[2]+'/kurole_include/js/countUp.min.js"></script>'); // Contador de digitos
9	window.document.write('<script language="javascript" src="'+url_dominio[0]+'//'+url_dominio[2]+'/kurole_include/js/jquery.maskMoney.min.js"></script>'); // Contador de digitos
10	window.document.write('<script language="javascript" src="'+url_dominio[0]+'//'+url_dominio[2]+'/kurole_include/js/jquery-ui.min.1.13.2.js"></script>'); // Contador de digitos
11	
12
13	//alert
14	window.document.write('<link rel="stylesheet" href="'+url_dominio[0]+'//'+url_dominio[2]+'/kurole_include/biblioteca/jquery-confirm/jquery-confirm-v3.3.4/dist/jquery-confirm.min.css">');
15	window.document.write('<script src="'+url_dominio[0]+'//'+url_dominio[2]+'/kurole_include/biblioteca/jquery-confirm/jquery-confirm-v3.3.4/dist/jquery-confirm.min.js"></script>');
16	
17// ksi_cep
18    window.document.write('<script language="javascript" src="'+url_dominio[0]+'//'+url_dominio[2]+'/kurole_include/biblioteca/ksi_componentes/ksi_cep/ksi_cep.js"></script>');
19	/*******************************************/
20	// Contador
21	// Para implementar, é só informar o id no elemento entre o total de imóveis
22		$(document).ready(function() {
23	   
24			if($('#total-imoveis').length > 0){
25				
26				var total_limpo = $('#total-imoveis').html().replace(/\D/g, '');
27				
28				if(total_limpo > '0'){
29					
30					var options = {
31										useEasing : true, 
32										useGrouping : false,
33										separator : '', 
34										decimal : '',
35									}
36									var useOnComplete = false;
37									var useEasing = true;
38									var useGrouping = true;
39								
40									var ksi_total = new countUp('total-imoveis', 24.02, total_limpo, 0, 4.5, options);
41									ksi_total.start();
42				}
43						
44			} // verifica se existe o id total-imoveis
45			
46		});
47	/********************************************/
48		
49	function objXMLHttp(){
50			if (window.XMLHttpRequest){ //monzila, chrome, opera, safari, ie7+
51				var objetoXMLHttp = new XMLHttpRequest();
52				return objetoXMLHttp;
53			}else{ //ie
54				//versoes antigas de ie
55				var versoes = ["MSXML2.XMLHttp.6.0","MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp.2.0","Microsoft.XMLHttp"];
56	
57	
58						for ( var i=0; i<versoes.length; i++){
59	
60								try{
61	
62								var objetoXMLHttp = new ActiveXObject(versoes[i]);
63								return objetoXMLHttp;
64								} catch(ex){
65	
66								//nada aqui //kuroleweb design
67	
68								}//end try
69	
70						}//end for	
71	
72			}			
73			return false;	
74	} // end objXMLHttp
75	
76	
77	function getDados_todos(objForm, num){
78		//alert(objForm.elements.length);
79			var params = new Array();
80				for (var ii=0; ii<objForm.elements.length; ii++){
81					/*alert(objForm.elements[ii].type);*/
82					if (objForm.elements[ii].type == 'checkbox'){
83						if (objForm.elements[ii].checked){
84							var parametro = encodeURIComponent(objForm.elements[ii].name);
85								parametro += "=";
86								parametro += encodeURIComponent(objForm.elements[ii].value);
87								params.push(parametro);
88						}else{
89							var parametro = encodeURIComponent(objForm.elements[ii].name);
90								parametro += "=";
91								parametro += "";
92								params.push(parametro);
93						}
94						
95					}else if (objForm.elements[ii].type == 'radio'){
96						if (objForm.elements[ii].checked){
97							var parametro = encodeURIComponent(objForm.elements[ii].name);
98								parametro += "=";
99								parametro += encodeURIComponent(objForm.elements[ii].value);
100								params.push(parametro);
101						}					
102					}else if(objForm.elements[ii].type == 'select-multiple'){
103						 for(i=0; i<objForm.elements[ii].length; i++)	{
104							 if(num == 1){
105								var parametro = encodeURIComponent(objForm.elements[ii].name);
106									parametro += "=";
107									parametro += encodeURIComponent(objForm.elements[ii].options[i].value); /* é o id */
108									params.push(parametro);
109							 }else{
110								 if (objForm.elements[ii].options[i].selected) { 
111									var parametro = encodeURIComponent(objForm.elements[ii].name);
112										parametro += "=";
113										parametro += encodeURIComponent(objForm.elements[ii].options[i].value); /* é o id */
114										params.push(parametro);
115								 }
116							 }
117						 }
118					}else{
119								var parametro = encodeURIComponent(objForm.elements[ii].name);
120									parametro += "=";
121									parametro += encodeURIComponent(objForm.elements[ii].value);
122									params.push(parametro);
123					}
124				}//end for
125			return params.join("&");
126		}// end get dados funcao	
127	
128	
129function passa_parametros_retorna_resultado(valor_x1, valor_x2, valor_x3, valor_x4, valor_x5) {
130		
131		//MENSAGEM OU IMAGEMS PARA PRE-LOAD
132		if (valor_x4 ==  'nada'){
133			var pre_load = "";
134		}else{
135			if (valor_x4 ==  ''){
136				var pre_load = '<font color=red>CARREGANDO....</font>'; 
137			}else{
138				var pre_load = '<img alt="Aguarde" title="Aguarde" src="'+valor_x4+'" border="0">'; 
139			}
140			//retorna o carregando no ie 6 ou anterior
141			window.document.getElementById(valor_x3).innerHTML=pre_load;
142		}
143	
144		/*PEGANDO TODOS OS DADOS PSSADOS KUROLE*/
145		var dados_X = valor_x1;	
146		
147		var oXMLHttp = objXMLHttp();
148				oXMLHttp.open("POST", valor_x2, true);		
149				if (typeof dados_X != 'object') {
150					oXMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
151				}
152				oXMLHttp.onreadystatechange = function(){
153					if (oXMLHttp.readyState != 4 && pre_load != ''){	
154						//alert(pre_load);
155						mensagem_retorno_G(pre_load, valor_x3, valor_x5);
156						return false;
157					}
158					
159					if (oXMLHttp.readyState == 4){
160						if (oXMLHttp.status == 200){
161							mensagem_retorno_G(oXMLHttp.responseText, valor_x3, valor_x5);					
162							//para o lytebox funcionar com ajax
163							if (typeof dados_X != 'object') {
164								if(dados_X.indexOf('no_lytebox') == -1){
165									if(typeof initLytebox == "function"){
166										initLytebox();
167									}
168								}
169							}
170						}else{
171							console.log('Erro ao carregar!');
172							//mensagem("Ocorreu um erro: "+oXMLHttp.statusText);
173							mensagem_retorno_G(oXMLHttp.statusText, valor_x3, valor_x5);
174						}
175					}
176				};//end function onreadystatechange
177				oXMLHttp.send(dados_X);
178				return false;
179		
180	}//final da funcao passa e retorna
181	
182	/* forma encurtada */
183	function pprr(valor_x1, valor_x2, valor_x3, valor_x4, valor_x5){
184		return passa_parametros_retorna_resultado(valor_x1, valor_x2, valor_x3, valor_x4, valor_x5);
185	}
186	
187	//mensagem_retorno_G
188	function mensagem_retorno_G(msg_R, valor_x3, valor_x5){
189		var funcao = window.parent.muda_frame;
190		var funcao2 = window.parent.parent.muda_frame;
191		
192		if (valor_x5 != ""){
193			if (window.document.getElementById(valor_x5).style.display == 'none'){
194				window.document.getElementById(valor_x5).style.display = '';
195			}
196		}
197		
198		if(msg_R.indexOf("<js>") != -1){
199			var rsScpt1 = msg_R.split('<js>');
200			var rsScript = rsScpt1[1]; 
201			eval(rsScript);
202		}
203			
204	
205		if (valor_x3 && valor_x3 != "")
206			window.document.getElementById(valor_x3).innerHTML=msg_R;
207					
208	}
209	
210	function checkKeycode(e) {
211		var keycode;
212		
213		if(!e){
214			window.event;	
215		}
216		if(e.keyCode){
217			keycode = e.keyCode;	
218		}else if(e.which){
219			keycode = e.which
220		}
221		return keycode;
222	}
223
224	$( document ).ready(function() {
225		$('input[name*=tel]').mask('(99) 9999-9999');
226		$('input[name*=fone]').mask('(99) 9999-9999');
227		$('input[name*=cel]').mask('(99) 99999-9999');
228		$('input[name*=data]').mask('99/99/9999');
229		$('input[name*=cep]').mask('99999-999');
230		$('input[name=cpf]').mask('999.999.999-99');
231		$('input[name=cnpj]').mask('99.999.999/9999-99');
232	});
233	
234	$(function() {
235		$('input[name*=valor]').maskMoney({thousands:'.', decimal:','});
236	})
237	
238	function valida_cpf(cpf){
239	var numeros, digitos, soma, i, resultado, digitos_iguais;
240    digitos_iguais = 1;
241    if (cpf.length < 11)
242          return false;
243    for (i = 0; i < cpf.length - 1; i++)
244          if (cpf.charAt(i) != cpf.charAt(i + 1))
245                {
246                digitos_iguais = 0;
247                break;
248                }
249    if(!digitos_iguais){
250    	numeros = cpf.substring(0,9);
251    	digitos = cpf.substring(9);
252    	soma = 0;
253     	for (i = 10; i > 1; i--)
254     		soma += numeros.charAt(10 - i) * i;
255     	resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
256        if (resultado != digitos.charAt(0))
257          	return false;
258        numeros = cpf.substring(0,10);
259          soma = 0;
260          for (i = 11; i > 1; i--)
261          	soma += numeros.charAt(11 - i) * i;
262          resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
263          if (resultado != digitos.charAt(1))
264          	return false;
265          	return true;
266    }else
267        return false;
268  	}
269	
270	function valida_cnpj(cnpj) {
271
272		cnpj = cnpj.replace(/[^\d]+/g,'');
273	
274		if(cnpj == '') return false;
275	
276		if (cnpj.length != 14)
277			return false;
278	
279		// LINHA 10 - Elimina CNPJs invalidos conhecidos
280		if (cnpj == "00000000000000" || 
281			cnpj == "11111111111111" || 
282			cnpj == "22222222222222" || 
283			cnpj == "33333333333333" || 
284			cnpj == "44444444444444" || 
285			cnpj == "55555555555555" || 
286			cnpj == "66666666666666" || 
287			cnpj == "77777777777777" || 
288			cnpj == "88888888888888" || 
289			cnpj == "99999999999999")
290			return false; // LINHA 21
291	
292		// Valida DVs LINHA 23 -
293		tamanho = cnpj.length - 2
294		numeros = cnpj.substring(0,tamanho);
295		digitos = cnpj.substring(tamanho);
296		soma = 0;
297		pos = tamanho - 7;
298		for (i = tamanho; i >= 1; i--) {
299		  soma += numeros.charAt(tamanho - i) * pos--;
300		  if (pos < 2)
301				pos = 9;
302		}
303		resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
304		if (resultado != digitos.charAt(0))
305			return false;
306	
307		tamanho = tamanho + 1;
308		numeros = cnpj.substring(0,tamanho);
309		soma = 0;
310		pos = tamanho - 7;
311		for (i = tamanho; i >= 1; i--) {
312		  soma += numeros.charAt(tamanho - i) * pos--;
313		  if (pos < 2)
314				pos = 9;
315		}
316		resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
317		if (resultado != digitos.charAt(1))
318			  return false; // LINHA 49
319	
320		return true; // LINHA 51
321	}
322	
323	function valida_cpf_cnpj(cpf_cnpj){
324		cpf_cnpj = cpf_cnpj.replace('.', '').replace('-', '').replace('.', '').replace('-', '').replace('/', '').replace('.', '');
325		
326		if(cpf_cnpj.length == 11){
327			if(!valida_cpf(cpf_cnpj)){
328				return false;	
329			}else{
330				return true;	
331			}
332		}else{
333			if(!valida_cnpj(cpf_cnpj)){
334				return false;	
335			}else{
336				return true;	
337			}
338		}
339		
340	}
341
342
343	// Alerta
344	var ksiAlertaOpcoes = {
345		title: "KSI",
346		content: '',
347		animation: 'zoom',
348		closeAnimation: 'scale',
349		typeAnimated: true,
350		animateFromElement: false,
351		theme: 'light',
352		columnClass: 'medium',
353		  scrollToPreviousElement: true,
354		scrollToPreviousElementAnimate: true
355	}
356
357	function configuracoesKsiAlertaOpcoes(titulo, conteudo, tipo, opcoes) {
358		var retorno = ksiAlertaOpcoes;
359		if (titulo != null) {
360			retorno.title = titulo;
361		}
362		retorno.content = conteudo;
363		if (tipo != null) {
364			switch(tipo) {
365				case 'sucesso':
366				case 'success':
367					retorno.type = "green";
368					retorno.icon = "fa fa-check-circle";
369					retorno.theme = "modern";
370					break;
371				case 'erro':
372				case 'danger':
373					retorno.type = "red";
374					retorno.icon = "fa fa-times";
375					retorno.theme = "modern";
376					break;
377				case 'alerta':
378				case 'warning':
379					retorno.type = "orange";
380					retorno.icon = "fa fa-exclamation-circle";
381					retorno.theme = "modern";
382					break;
383				case 'info':
384					retorno.type = "blue";
385					retorno.icon = "fa fa-info-circle";
386					retorno.theme = "modern";
387					break;
388				default:
389			}
390		}
391		if (opcoes != null) {
392			if (typeof opcoes == 'object') {
393				retorno = Object.assign(retorno, opcoes);	
394			} else {
395				retorno = Object.assign(retorno, JSON.parse(opcoes));
396			}		
397		}
398		return retorno;
399	}
400
401	var componente_ksi_alerta;
402	var componente_ksi_confirmacao;
403
404	function ksi_alerta(titulo, conteudo, tipo, opcoes) {
405		opcoes = configuracoesKsiAlertaOpcoes(titulo, conteudo, tipo, opcoes);
406		//console.log(opcoes);
407		opcoes.buttons = {
408			ok: {
409				  text: 'Fechar'
410				, keys: ['enter']
411			}
412		};	
413
414		if (opcoes.noOverlap && componente_ksi_alerta != null) {
415			componente_ksi_alerta.close();
416			setTimeout(function() {
417				componente_ksi_alerta = window.top.$.alert(opcoes);		
418			}, 1000);
419		} else {
420			componente_ksi_alerta = window.top.$.alert(opcoes);	
421		}	
422	}
423

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.