PageSourceSearch

https://www.autopartslogistic.com/js/site.js

js autopartslogistic.com collected 2026-10-06 04:37:01 UTC 37,519 bytes, 1,120 lines download raw bytes

1var DOM = YAHOO.util.Dom;
2var EVT = YAHOO.util.Event;
3var XHR = YAHOO.util.Connect;
4
5function show_hide(obj)
6{
7	var _obj = document.getElementById(obj);
8
9	if (_obj.style.display == 'block')
10		_obj.style.display = 'none';
11	else
12		_obj.style.display = 'block';
13}
14
15function render_ttfs()
16{
17	var css_properties = {
18		'h1': {fontSize: '15.75', backgroundColor: 'EBEBEB', color: '333333', fontFile: 'fonts/MYRIM6.TTF', transparent: '1'},
19		/*'h2': {fontSize: '15.75', backgroundColor: 'EBEBEB', color: 'FFFFFF', fontFile: 'fonts/DIN Alternate.ttf', transparent: '1'},*/
20		'topoveiculo': {fontSize: '10.5', backgroundColor: 'BB0A1B', color: 'FFFFFF', fontFile: 'fonts/MYRIM6.TTF', transparent: '1'},
21		'topoitright': {fontSize: '10.5', backgroundColor: 'EBEBEB', color: '333333', fontFile: 'fonts/MYRIM6.TTF', transparent: '1'},
22		'topoitright2': {fontSize: '10.5', backgroundColor: 'EBEBEB', color: '333333', fontFile: 'fonts/MYRIM6.TTF', transparent: '1'},
23		'topodescr': {fontSize: '10.5', backgroundColor: 'EBEBEB', color: '333333', fontFile: 'fonts/MYRIM6.TTF', transparent: '1'},
24		'bemvindo': {fontSize: '15.75', backgroundColor: 'EBEBEB', color: '333333', fontFile: 'fonts/MYRIM6.TTF', transparent: '1'},
25		'pprod': {fontSize: '13.5', backgroundColor: 'EBEBEB', color: '333333', fontFile: 'fonts/MYRIM6.TTF', transparent: '1'},
26		//'totcar': {fontSize: '13.5', backgroundColor: 'EBEBEB', color: '1D5D91', fontFile: 'fonts/ARLRDBD.TTF', transparent: '1'},
27		//'totvalor': {fontSize: '10.5', backgroundColor: 'EBEBEB', color: '1D5D91', fontFile: 'fonts/ARLRDBD.TTF', transparent: '1'},
28		//'td2resfinal': {fontSize: '10.5', backgroundColor: 'EBEBEB', color: '1D5D91', fontFile: 'fonts/ARLRDBD.TTF', transparent: '1'},
29		'tipo': {fontSize: '12', backgroundColor: 'EBEBEB', color: 'FFFFFF', fontFile: 'fonts/ARLRDBD.TTF', transparent: '1'},
30		'num': {fontSize: '18.75', backgroundColor: 'EBEBEB', color: 'FFFFFF', fontFile: 'fonts/ARLRDBD.TTF', transparent: '1'}
31	};
32
33	var h1s = document.getElementsByTagName('h1');
34	for (var i = 0, len = h1s.length; i < len; i++) {
35		if (h1s[i].className != undefined)
36			h1s[i].className += "h1";
37		else
38			h1s[i].className = "h1";
39	}
40	
41	var h2s = document.getElementsByTagName('h2');
42	for (var i = 0, len = h2s.length; i < len; i++) {
43		if (h2s[i].className != undefined)
44			h2s[i].className += "h2";
45		else
46			h2s[i].className = "h2";
47	}
48	
49	for (var i in css_properties) {
50		DATAFUNCS.RenderFonts(i, {
51			fontSize: css_properties[i].fontSize,
52			backgroundColor: css_properties[i].backgroundColor,
53			color: css_properties[i].color,
54			fontFile: css_properties[i].fontFile,
55			transparent: css_properties[i].transparent
56		});
57	}
58}
59
60function addEeventsFormElements(){
61	try{
62		var forms = document.forms;
63		
64		for (var i = 0; i <= forms.length - 1; i++){
65			var elements = document.forms[i].elements;
66			
67			/* Adicionar os eventos onFocus e onBlur aos elementos dos tipos descritos abaixo */
68			for (var j = 0; j <= elements.length - 1; j++){
69				if (elements[j].type == 'text' || elements[j].type == 'password' || elements[j].type == 'textarea'){
70				/*	elements[j].onfocus = function () {
71						this.style.border = '1px solid #595959';
72					} */
73					/*
74					elements[j].onblur = function () {
75						this.style.border = '1px solid #D2D2D2';
76					} */
77				}
78			}
79		}
80	}
81	catch(err){
82	}
83}
84
85function addEventsMenuLat(){
86	try{
87		/* Adicionar eventos onClick às âncoras das <li> */
88		var lispar = DOM.getElementsByClassName('liparent', 'li', document.body, function(obj){
89			
90						obj.getElementsByTagName('a')[0].onclick = function(){
91							onClickAnchorLIParent(obj);
92						}
93						
94				  });
95		
96		var lisch = DOM.getElementsByClassName('lichild', 'li', document.body, function(obj){
97			
98						obj.getElementsByTagName('a')[0].onclick = function(){
99							onClickAnchorLIChild(obj);
100						}
101						
102						var lastAnchors = DOM.getChildrenBy(obj.getElementsByTagName('ul')[0], function(obj2){
103												return (obj2.nodeName == 'A') ? true : false;
104										  });
105						
106						for (anc in lastAnchors){
107							anc.onclick = function(){
108								
109								var elsim = DOM.getElementsBy(function(obj){
110												return (obj.nodeName == 'A') ? true : false;
111								            }, 'a', this.parentNode.parentNode, function(obj){
112												obj.style.color = '#2571AD';
113											});
114									
115								this.style.color = '#D80F23';
116								
117							}
118						}
119						
120				  });
121		
122	}
123	catch(err){
124	}
125}
126
127function onClickAnchorLIParent(link){
128	try{
129		var childUL = DOM.getFirstChildBy(link, function(obj){
130							return (obj.nodeName == 'UL') ? true : false;
131					  });
132		
133		if (childUL != null){
134			
135			if (DOM.getStyle(childUL, 'display') == 'none'){
136				
137				if (link.className == 'liparent lilast'){
138					link.style.background = 'url(sysimages/backlimenoslast.png) no-repeat 9px 7px';
139				}
140				else{
141					link.style.background = 'url(sysimages/backlimenos.png) no-repeat 9px 7px';
142				}
143				
144				childUL.style.display = 'block';
145			
146			}
147			else{
148				
149				if (link.className == 'liparent lilast'){
150					link.style.background = 'url(sysimages/backlilast.png) no-repeat 9px 7px';
151				}
152				else{
153					link.style.background = 'url(sysimages/backli.png) no-repeat 9px 7px';
154				}
155					
156				childUL.style.display = 'none';
157				
158				var lis = DOM.getElementsBy(function(obj){
159				
160								return (obj.className == 'lichild' || obj.className == 'lichild lilast') ? true : false;
161								
162						  }, 'li', childUL, function(obj){
163						  
164								if (obj.className == 'lichild lilast'){
165									obj.style.background = 'url(sysimages/backliinnerlast.png) no-repeat 0px -4px';
166								}
167								else{
168									obj.style.background = 'url(sysimages/backliinner.png) no-repeat 0px -9px';
169								}
170								
171						  });
172				
173				/* Fechar também os filhos dos filhos */
174				var childChildUL = DOM.getElementsBy(function(obj){
175				
176										return (obj.nodeName == 'UL') ? true : false;
177										
178								   }, 'ul', childUL, function(obj){
179								   
180										obj.style.display = 'none';
181										
182								   });
183				
184			}
185		}
186	}
187	catch(err){
188	}
189}
190
191function onClickAnchorLIChild(link){
192	try{
193		var childUL = DOM.getFirstChildBy(link, function(obj){
194							return (obj.nodeName == 'UL') ? true : false;
195					  });
196							
197		if (childUL != null){
198			
199			if (DOM.getStyle(childUL, 'display') == 'none'){
200				
201				if (link.className == 'lichild lilast'){
202					link.style.background = 'url(sysimages/backliinnermenoslast.png) no-repeat 0px -33px';
203				}
204				else{
205					link.style.background = 'url(sysimages/backliinnermenos.png) no-repeat 0px -1px';
206				}
207				
208				childUL.style.display = 'block';
209				
210			}
211			else{
212				
213				if (link.className == 'lichild lilast'){
214					link.style.background = 'url(sysimages/backliinnerlast.png) no-repeat 0px -4px';
215				}
216				else{
217					link.style.background = 'url(sysimages/backliinner.png) no-repeat 0px -9px';
218				}
219				
220				childUL.style.display = 'none';
221			
222			}
223		}
224	}
225	catch(err){
226	}
227}
228
229/* Funções a serem executadas no load das páginas */
230try{
231	YAHOO.util.Event.onDOMReady(function (){
232		addEeventsFormElements();
233		addEventsMenuLat();
234		//render_ttfs();
235	}, document.body, true);
236}
237catch(err){
238}
239
240/* Funções a serem executadas no load das páginas */
241	
242function addEventsFaqs(){  
243	try{
244		  
245		var contul = DOM.getElementBy(function (obj) {		        
246						return (obj.className == 'containerulfaqs') ? true : false;
247					}, 'div');
248		
249					
250					
251    //var contul = document.getElementById('containerulfaqs');					
252					    						
253		var lis = contul.getElementsByTagName("li");
254		
255		for (var i = 0; i <= lis.length - 1; i++){
256			/* Evento onClick */
257						
258			lis[i].onclick = function(){
259				
260				if (DOM.getStyle(this.getElementsByTagName("p")[0], 'display') == 'block'){
261				
262					this.style.backgroundColor = '#F5F5F5';
263					this.style.backgroundImage = 'url(sysimages/mais.png)';
264					this.style.backgroundPosition = '5px center';
265					this.style.color = '#585858';
266						
267					this.getElementsByTagName("p")[0].style.display = 'none';
268					
269				}
270				else{
271					var lisopen = DOM.getElementsBy(function (obj) {
272					
273						return (obj.nodeName == "LI") ? true : false;
274						
275					}, 'li', this.parentNode.parentNode, function(obj){
276					
277						obj.style.backgroundColor = '#F5F5F5';
278						obj.style.backgroundImage = 'url(sysimages/mais.png)';
279						obj.style.backgroundPosition = '5px center';
280						obj.style.color = '#585858';
281						
282						obj.getElementsByTagName("p")[0].style.display = 'none';
283						
284					});
285					
286					this.style.backgroundColor = '#E8F0F7';
287					this.style.backgroundImage = 'url(sysimages/menos.png)';
288					this.style.backgroundPosition = '5px 12px';
289					this.style.color = '#2571AD';
290					
291					this.getElementsByTagName("p")[0].style.display = 'block';
292				}
293		
294			};
295		}
296	}
297	catch(err){
298	}
299}
300
301function changeTRColorAndOpacity(classTable){
302	try{
303		/* Aplicar cores diferentes às linhas alternadamente */
304		var table = DOM.getElementBy(function (obj) {
305						return (obj.className == classTable) ? true : false;
306					}, 'table');
307					
308		var trs = table.rows;
309		
310		for (var i = 1; i <= trs.length - 1; i++){
311			if (i % 2 == 0){
312				trs[i].style.backgroundColor = '#F8F8F8';
313			}
314			else{
315				trs[i].style.backgroundColor = '#FFFFFF';
316			}
317		}
318			
319		/* Aplicar opacidade às células */
320		var trsemdev = DOM.getElementBy(function (obj) {
321						return (obj.className == 'trsemdev') ? true : false;
322					}, 'tr');
323					
324		if (trsemdev != null){
325			var tds = trsemdev.cells;
326		
327			for (var j = 1; j <= tds.length - 1; j++){
328				tds[j].style.opacity = '0.2';
329				tds[j].style.filter = 'alpha(opacity=20)';
330			}
331		}
332	}
333	catch(err){
334	}
335}
336
337function selectPesq(that, index, pesq){
338	try{
339
340		if(that.className != 'asel'){
341			var links = DOM.getElementsByClassName('asel', 'li', that.parentNode.parentNode, function(obj){
342						if (index == '1'){
343							obj.className = 'anormal2';
344							obj.style.background='url(sysimages/apesqnormal2.png) no-repeat left top'
345						}
346						else{
347							obj.className = 'anormal1';
348							obj.style.background='url(sysimages/apesqnormal.png) no-repeat left top'
349						}
350					});
351					
352			document.getElementById('pvei').style.display = 'none';
353			document.getElementById('pref').style.display = 'none';
354			
355			that.className = 'asel';
356			that.style.background='url(sysimages/apesqsel.png) no-repeat left top'
357			document.getElementById(pesq).style.display = 'block';
358		}
359		
360	}
361	catch(err){
362
363	}
364}
365
366function changeTab(that, tab){  
367	try{
368		var links = DOM.getElementsByClassName('asel', 'a', that.parentNode.parentNode, function(obj){
369						obj.className = 'anormal';
370					});
371					
372		var tabs = DOM.getElementsByClassName('tab', 'div', document.body, function(obj){
373						obj.style.display = 'none';
374					});
375					
376		that.className = 'asel';
377		document.getElementById(tab).style.display = 'block';
378	}
379	catch(err){
380	}
381}
382
383function setOpacity(that){
384	try{
385		var lines = that.parentNode.rows;
386		
387		for(var i = 0; i <= lines.length - 1; i++){
388			lines[i].style.opacity = '0.8';
389			lines[i].filters.alpha.opacity = '80';
390		}
391		
392		that.style.opacity = '1';
393		that.filters.alpha.opacity = '100';
394	}
395	catch(err){
396	}
397}
398
399function xhr_request(xhr_file, xhr_params, xhr_type, xhr_success_call, xhr_failure_call)
400{
401
402  var AjaxObject = {
403
404  	handleSuccess: function(o){
405  		if(typeof(xhr_success_call) == 'function')
406	       xhr_success_call(o.responseText);
407  	},
408  
409  	handleFailure: function(o){
410        if(typeof(xhr_failure_call) == 'function')
411            xhr_failure_call(o.responseText);
412  	},
413  
414  	startRequest:function() {
415  	  
416  	  XHR.resetDefaultHeaders();
417  	  //XHR.initHeader('Content-Type', 'application/x-www-form-urlencoded; charset=ISO-8859-1');
418  	  XHR.initHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8');
419  	  
420      if(xhr_type == 'POST')
421        XHR.asyncRequest('POST', xhr_file, callback, xhr_params);
422      else if(xhr_type == 'GET')
423        XHR.asyncRequest('GET', xhr_file + '?' + xhr_params, callback);
424
425  	}
426  
427  };
428
429  var callback =
430  {
431  	success:AjaxObject.handleSuccess,
432  	failure:AjaxObject.handleFailure,
433  	scope: AjaxObject
434  };
435
436  AjaxObject.startRequest();
437
438}
439
440function clean_select_box (el)
441{
442    
443    var len = el.options.length;
444    
445    var i;    
446    for (i = len - 1; i >= 0; i--) {
447        $(el).splice(i,1);    
448    }
449	
450	var len = el.childNodes.length;
451	
452    var i;
453    for (i = len - 1; i >= 0; i--) {
454        el.removeChild(el.childNodes[i]);
455    }
456}
457
458
459
460
461
462
463
464function submitExpedicao(){
465            
466    var listaMarcados = document.getElementsByTagName("INPUT");  
467    for (var loop = 0; loop < listaMarcados.length; loop++) {  
468      var item = listaMarcados[loop];                        
469      if (item.name == "pag" && item.checked) {   
470          return verify_dados_entrega();                               
471      }
472                              
473    }
474    
475    alert_pagamentos();
476    return false;
477
478}
479
480function escolhe_data_entrada(type,args,obj) {
481
482  var arrDates = cal2.getSelectedDates(); 
483  for (var i = 0; i < arrDates.length; ++i) { 
484    var date = arrDates[i]; 
485  
486      
487    var mes = date.getMonth() + 1; 
488    var ano = date.getFullYear(); 
489    var dia = date.getDate(); 
490    
491    
492    document.getElementById("dia").value=dia;
493    cal2.hide();
494  }
495
496}
497
498
499function verify_dados_entrega(){
500    
501    var listaMarcados = document.getElementsByTagName("INPUT");
502    
503    for (var loop = 0; loop < listaMarcados.length; loop++) {  
504      var item = listaMarcados[loop];                        
505      if (item.name == "dadosent" && item.checked && item.value==2) {             
506          
507          return verify_form_data( document.getElementById('frmexpedicao'), 'VENTREGA' );                                                                                  
508                               
509      }
510                              
511    }
512    
513    
514    return true;
515    
516}
517
518
519function getContent(sUrl, objdestino, callback)
520{
521     //_wait.show();
522    
523    var retorno = {
524        success: function(oResponse)
525        {
526            var oResults = oResponse.responseText;
527            obj = document.getElementById(objdestino);
528            obj.innerHTML = oResults;
529             alert('Erro oResults:'+oResults);
530            //YAHOO.util.Event.onDOMReady(function(){_wait.hide();});
531            
532            if (typeof(callback) == 'function') callback();
533        },
534        
535        failure: function(oResponse)
536        {
537            alert('Erro');
538            var oResults = oResponse.responseText;
539            alert('Erro oResults:'+oResults);
540           // _wait.hide();
541        },
542        
543        timeout: 600000
544    };
545    alert(sUrl);
546    YAHOO.util.Connect.asyncRequest('GET', sUrl, retorno);
547}
548
549var objecto = "";
550function getiContent(sUrl, objdestino, _width, _height)
551{
552    //_wait.show();
553    
554    //console.log(sUrl);
555  
556    obj = document.getElementById(objdestino);
557    objecto = obj; 
558        
559    var HTML_BODY = '<div class="loader" id="loader"><table cellspacing="0" cellpadding="0" width="542" height="200"><tr><td align="center" valign="center"><img src="sysimages/loader.gif"></td></tr><tr><td align="center" valign="center"><h2>A carregar informação...</h2></td></tr></table></div>'+
560    '<iframe src="' + sUrl + '" style="width: ' + _width + '; height: 1500px; background-color: #FFFFFF; margin: 0px !important; padding: 0px !important;" scrolling="no" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%" hspace="0"></iframe>';
561    obj.innerHTML = HTML_BODY;
562    // _wait.hide();
563}
564
565
566function CreateIFRAME(url)
567{
568    //_wait.show();
569    
570    obj = parent.document.getElementById("extinnermain");
571    objecto = obj; 
572    
573    //console.log(url);
574    
575    //
576    
577    var HTML_BODY = '<div class="loader" id="loader"><table cellspacing="0" cellpadding="0" width="542" height="200"><tr><td align="center" valign="center"><img src="sysimages/loader.gif"></td></tr><tr><td align="center" valign="center"><h2>A carregar informação...</h2></td></tr></table></div>'+
578    '<iframe src="' + url + '" style="width: 542px; height: 1500px; background-color: #FFFFFF; margin: 0px !important; padding: 0px !important;" scrolling="no" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%" hspace="0"></iframe>';
579    obj.innerHTML = HTML_BODY; 
580    // _wait.hide();
581}
582
583
584function CreateIFRAME_alteracoes(url)
585{
586    //_wait.show();
587    document.getElementById("left_transacoes").style.display = 'none';
588    document.getElementById("left_expedicao").style.display = 'none';
589    document.getElementById("menu_tecdoc").style.display = 'block';
590    
591    obj = parent.document.getElementById("extinnermain");
592    objecto = obj; 
593    
594    //console.log(url);
595
596    
597    var HTML_BODY = '<div class="loader" id="loader"><table cellspacing="0" cellpadding="0" width="710" height="200"><tr><td align="center" valign="center"><img src="sysimages/loader.gif"></td></tr><tr><td align="center" valign="center"><h2>A carregar informação...</h2></td></tr></table></div>'+
598    '<iframe src="' + url + '" style="width: 710px; height: 1500px; background-color: #FFFFFF; margin: 0px !important; padding: 0px !important;" scrolling="no" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%" hspace="0"></iframe>';
599    obj.innerHTML = HTML_BODY; 
600    // _wait.hide();
601}
602
603function CreateIFRAME_detProdTecDoc(url) {
604    
605    //_wait.show();
606    window.parent.$('#loader').show();
607    window.parent.$('#popupFrame').hide();
608    window.parent.$('.left_listagem').hide();
609    
610    obj = parent.document.getElementById("extinnermain");
611    objecto = obj; 
612    
613    window.parent.$("#popupFrameDetProd").remove();
614    var HTML_BODY = '<iframe src="' + url + '" style="width: 965px; height: 1500px; background-color: #FFFFFF; margin: 0px !important; padding: 0px !important;" scrolling="no" frameborder="0" allowtransparency="true" id="popupFrameDetProd" name="popupFrameDetProd" width="100%" height="100%" hspace="0"></iframe>';
615    window.parent.$("#extinnermain").append( HTML_BODY );
616    
617    //obj.innerHTML = HTML_BODY; 
618    // _wait.hide();
619}
620
621function hideLeftColumn() {
622parent.$('#frm_search').hide();
623parent.$('#treeDiv1').hide();
624parent.$('#left_expedicao').hide();
625parent.$('#left_transacoes').hide();
626parent.$('.containermenulat').hide();
627window.$('#linkvoltar').hide();
628}
629
630$(window).load(function(){
631    $('.loader', objecto).css("display","none");
632});
633
634$("#popupFrame").ready(function(){
635  
636    //window.parent.document.getElementById('loader').style='display:none;';
637    $('#loader', window.parent.document).css("display","none");
638});
639
640
641function openCatalogsSubmenu(submenu_id){
642
643    var others = document.getElementsByTagName("div");
644    
645    for (var loop = 0; loop < others.length; loop++) {  
646    
647        var item = others[loop];
648                                
649        if (item.className == "submen_u") {                       
650            item.style.display = 'none';                                                                                                                 
651        }
652                              
653    }
654    
655    document.getElementById(submenu_id).style.display = 'block';
656
657}
658
659
660
661
662
663function changeTabsHomepage(action){
664                
665    
666    switch(action){
667        
668        case 1:
669        document.getElementById('tab_matricula').className = "anormal2";
670        document.getElementById('tab_veiculo').className = "asel";
671        document.getElementById('tab_ref').className = "anormal2";
672
673        document.getElementById('pvei').style.display = "block";
674        document.getElementById('pref').style.display = "none";
675        document.getElementById('pmat').style.display = "none";
676        
677        document.getElementById('sel1').style.display = "none";
678        document.getElementById('sel2').style.display = "block";
679        document.getElementById('sel3').style.display = "none";
680                
681        document.getElementById('manufacturer').disabled = false;
682        document.getElementById('model').disabled = false;
683        document.getElementById('motor').disabled = false;
684        
685        document.getElementById('frm_search').method = "POST";
686        document.getElementById('frm_search').action = "index.php";
687		document.getElementById('dest').value = "23";
688        break;
689        
690        case 2:
691        document.getElementById('tab_matricula').className = "anormal2";
692        document.getElementById('tab_veiculo').className = "anormal1";
693        document.getElementById('tab_ref').className = "asel";
694        
695        document.getElementById('pmat').style.display = "none";
696        document.getElementById('pvei').style.display = "none";
697        document.getElementById('pref').style.display = "block";
698        
699        document.getElementById('sel1').style.display = "none";
700        document.getElementById('sel2').style.display = "none";
701        document.getElementById('sel3').style.display = "block";
702        
703        document.getElementById('manufacturer').disabled = true;
704        document.getElementById('model').disabled = true;
705        document.getElementById('motor').disabled = true;
706        
707        document.getElementById('frm_search').action = "index.php";
708        document.getElementById('frm_search').method = "GET";
709		document.getElementById('dest').value = "18";
710        break;
711        
712        case 3:
713        document.getElementById('tab_matricula').className = "asel";
714        document.getElementById('tab_veiculo').className = "anormal2";
715        document.getElementById('tab_ref').className = "anormal1";
716        
717        document.getElementById('pmat').style.display = "block";
718        document.getElementById('pvei').style.display = "none";
719        document.getElementById('pref').style.display = "none";
720        
721        document.getElementById('sel1').style.display = "block";
722        document.getElementById('sel2').style.display = "none";
723        document.getElementById('sel3').style.display = "none";
724        
725        document.getElementById('manufacturer').disabled = true;
726        document.getElementById('model').disabled = true;
727        document.getElementById('motor').disabled = true;
728        
729		document.getElementById('frm_search').method = "POST";
730        document.getElementById('frm_search').action = "index.php";
731		document.getElementById('dest').value = "23";
732		
733        break;
734        
735    
736    }          
737
738}
739
740
741
742function changeProductTab(id_tab){
743        
744    var others = document.getElementsByTagName("div");
745        
746    for (var loop = 0; loop < others.length; loop++) {  
747    
748        var item = others[loop];
749                                
750        if (item.className == "tab") {                       
751            item.style.display = 'none';                                                                                                                 
752        }                
753                              
754    }
755    
756    var others2 = document.getElementsByTagName("a");
757    
758    for (var loop2 = 0; loop2 < others2.length; loop2++) {  
759    
760        var item = others2[loop2];                                        
761        
762        if (item.className == "tab_sel") {                       
763            item.className = "tab_normal";                                                                                                                 
764        }
765                              
766    }
767    
768    document.getElementById("content_tabs"+id_tab).style.display = 'block';
769    document.getElementById("tab_prod"+id_tab).className = "tab_sel";
770    
771
772}
773
774
775
776function getXmlHttpRequest() {
777  	if (window.XMLHttpRequest) {
778  		return new XMLHttpRequest();
779  	} else if (window.ActiveXObject) {
780  		return new ActiveXObject("Microsoft.XMLHTTP");
781  	}
782  }
783  
784function ChangeTabPopUp(id,ref){
785   var tab = document.getElementById("menu_"+id);
786   var cont = document.getElementById("conts_"+id);
787   var subs  = document.getElementsByTagName('div');
788
789   if(id == 3)
790   {
791      seeVeic(ref);
792   }
793   for (var i=0; i<subs.length; i++) {
794      if (subs[i].className == "conts" || subs[i].className == "conts veiculos"){
795        subs[i].style.display = "none";
796      }
797      if (subs[i].className == "sel"){
798        subs[i].className = "";
799      }
800   }
801   tab.className='sel';
802   cont.style.display='block';      
803}
804function ChangeTabPopUp3(id,ref){
805   var tab = document.getElementById("menu_"+id);
806   var cont = document.getElementById("conts_"+id);
807   var subs  = document.getElementsByTagName('div');
808
809   if(id == 3)
810   {
811      seeVeic3(ref);
812   }
813   for (var i=0; i<subs.length; i++) {
814      if (subs[i].className == "conts" || subs[i].className == "conts veiculos"){
815        subs[i].style.display = "none";
816      }
817      if (subs[i].className == "sel"){
818        subs[i].className = "";
819      }
820   }
821   tab.className='sel';
822   cont.style.display='block';      
823}
824function seeVeic(ref){
825
826      var url="carTecdoc3.php?ref="+ref;
827      var cmsajaxhttp = getXmlHttpRequest();
828     cmsajaxhttp.open("GET", url, true);
829     document.getElementById("conts_3").innerHTML = "<div align='center'><img src='sysimages/loader.gif'></div>";	  
830      cmsajaxhttp.onreadystatechange = function(){
831        if (cmsajaxhttp.readyState==4){
832              var resultado = cmsajaxhttp.responseText;
833              document.getElementById("conts_3").innerHTML = resultado;                          
834    		} 
835    	}
836
837      cmsajaxhttp.send(null);
838      return false;
839  }
840function CreatPop3(ref){
841	//console.info(ref);
842    var url="create_pop3.php?ref="+ref;
843    var cmsajaxhttp = getXmlHttpRequest();
844   	cmsajaxhttp.open("GET", url, true);
845    var p = jQuery(parent.window).scrollTop();
846    var value = "100";
847    var conta = (p*1) - (value*1);
848    
849    cmsajaxhttp.onreadystatechange = function(){
850      if (cmsajaxhttp.readyState==4){
851            
852            var resultado = cmsajaxhttp.responseText;
853				parent.document.getElementById("creat_pop").style.display = "block";
854				parent.document.getElementById("creat_pop").innerHTML = resultado;            
855            if(p>0)  {
856				parent.document.getElementById("creat_pop").style.paddingTop=conta + "px";
857			}
858            else{
859				parent.document.getElementById("creat_pop").style.paddingTop="0px";
860			}
861              
862  		} 
863  	}
864    cmsajaxhttp.send(null);
865    return false;
866}
867function seeVeic3(ref){
868
869      var url="carTecdoc3.php?ref="+ref;
870      var cmsajaxhttp = getXmlHttpRequest();
871     cmsajaxhttp.open("GET", url, true);
872     document.getElementById("conts_3").innerHTML = "<div align='center'><img src='sysimages/loader.gif'></div>";	  
873      cmsajaxhttp.onreadystatechange = function(){
874        if (cmsajaxhttp.readyState==4){
875              var resultado = cmsajaxhttp.responseText;
876              document.getElementById("conts_3").innerHTML = resultado;                          
877    		} 
878    	}
879
880      cmsajaxhttp.send(null);
881      return false;
882  }
883function view_search(){
884  if(document.getElementById('pvei').style.display == 'block'){
885    if(document.getElementById('manufacturer').value==0 || document.getElementById('model').value==0 || document.getElementById('motor').value==0){
886      alert("Seleccione todas as opções");
887      return false;
888    } else {
889		var values = 'manu=' + document.getElementById('manufacturer').value + '&model=' + document.getElementById('model').value + '&motor=' + document.getElementById('motor').value;
890		$.ajax({
891				url: "home_search_submit.php",
892				type: "post",
893				data: values,
894				success: function(response){
895					console.info("Response: "+response);
896				},
897				error:function(){
898					console.info("falhou");
899					$("#result").html('There is error while submit');
900				}
901			});		
902      return true;
903    }
904  } else if(document.getElementById('pmat').style.display == 'block'){
905		getMatricula();
906  }
907  else {
908    if(document.getElementById('ref_tec').value.length<3)
909    {
910      alert("Digite uma referência com um minimo de 3 caracteres");
911      return false;    
912    } else {
913      return true;    
914    }
915  }
916  
917}
918
919function submit_left_alternacao(){
920		var values = 'manu=' + document.getElementById('manufacturer').value + '&model=' + document.getElementById('model').value + '&motor=' + document.getElementById('motor').value;
921		$.ajax({
922				url: "home_search_submit.php",
923				type: "post",
924				data: values,
925				success: function(response){
926					console.info("Response: "+response);
927				},
928				error:function(){
929					$("#titulocarro").html('Occorreu um erro');
930				}
931			});		
932}
933
934function actualiza_shopCart(aux){
935    var url="actualiza_cart.php";
936    var cmsajaxhttp = getXmlHttpRequest();
937   	cmsajaxhttp.open("GET", url, true);
938    cmsajaxhttp.onreadystatechange = function(){
939      if (cmsajaxhttp.readyState==4){
940            
941            var resultado = cmsajaxhttp.responseText;
942            var JSONobject = JSON.parse(resultado);
943            total_int = JSONobject.total_itens;
944            total_prc = JSONobject.total_preco;
945            parent.document.getElementById('n_basket').innerHTML = "("+total_int+" artigos)";
946            parent.document.getElementById('t_price').innerHTML = total_prc+"€" ;
947            if(aux==1){
948              parent.document.getElementById('info_carr_top').style.display='block';
949              if(parent.document.getElementById('lnk_compras'))
950                parent.document.getElementById('lnk_compras').style.display='none';
951            } else {
952              document.getElementById('info_carr_top').style.display='block';
953              if(document.getElementById('lnk_compras'))
954                document.getElementById('lnk_compras').style.display='none';
955            }
956            
957            
958              
959  		} 
960  	}
961    cmsajaxhttp.send(null);
962    return false;
963}
964
965
966function insere_shopCart(action,prod){
967	//console.info(prod);
968	var matricula = "t";
969    var qnt = document.getElementById('qnt_'+prod).value;
970	var matricula = document.getElementById('matriculaid');
971	if (typeof matricula !== 'undefined' && matricula !== null){
972		matricula  = document.getElementById('matriculaid').value;			
973	}else {
974		matricula  = "";		
975	}
976
977    if(qnt <= 0){
978      alert("Por favor insira uma quantidade valida");
979      return false;
980    }
981    var prod_ref = document.getElementById('prod_ref_'+prod).value;
982	var prod_tipo = document.getElementById('prod_tipo_'+prod).value;
983	console.info(prod_ref);
984	console.info(prod_tipo);
985    var url="actions_basket.php?action="+action+"&qnt="+qnt+"&prod_ref="+prod_ref+"&prod_tipo="+prod_tipo+"&matricula="+matricula;
986	console.info(url);
987    var cmsajaxhttp = getXmlHttpRequest();
988   	cmsajaxhttp.open("GET", url, true);
989    cmsajaxhttp.onreadystatechange = function(){
990      if (cmsajaxhttp.readyState==4){
991            
992            var resultado = cmsajaxhttp.responseText;
993            alert("Produto inserido com sucesso no carrinho");
994            actualiza_shopCart(0);
995              
996  		} 
997  	}
998    cmsajaxhttp.send(null);
999    return false;
1000}
1001
1002function insere_shopCart2(action,prod){
1003    var qnt = document.getElementById('qnt_'+prod).value;
1004    if(qnt <= 0){
1005      alert("Por favor insira uma quantidade valida");
1006      return false;
1007    }
1008    var prod_ref = document.getElementById('prod_ref_'+prod).value;
1009    var url="actions_basket.php?action="+action+"&qnt="+qnt+"&prod_ref="+prod_ref;
1010    var cmsajaxhttp = getXmlHttpRequest();
1011   	cmsajaxhttp.open("GET", url, true);
1012    cmsajaxhttp.onreadystatechange = function(){
1013      if (cmsajaxhttp.readyState==4){
1014            
1015            var resultado = cmsajaxhttp.responseText;
1016            alert("Produto inserido com sucesso no carrinho");
1017            //parent.location.reload(true);
1018            actualiza_shopCart(1);
1019              
1020  		} 
1021  	}
1022    cmsajaxhttp.send(null);
1023    return false;
1024}
1025
1026function seeMostSell(carid){
1027    var where = document.getElementById('where_enter');
1028    where.innerHTML = '<div class="loader" id="loader"><table cellspacing="0" cellpadding="0" width="542" height="200"><tr><td align="center" valign="center"><img src="sysimages/loader.gif"></td></tr><tr><td align="center" valign="center"><h2>A carregar informação...</h2></td></tr></table></div>'; 
1029    var url="ajax_mostsell.php?carid="+carid;
1030    var cmsajaxhttp = getXmlHttpRequest();
1031    cmsajaxhttp.open("GET", url, true);
1032    cmsajaxhttp.onreadystatechange = function(){
1033      if (cmsajaxhttp.readyState==4){
1034            
1035            var resultado = cmsajaxhttp.responseText;
1036            where.innerHTML = resultado;
1037              
1038    	} 
1039    }
1040    cmsajaxhttp.send(null);
1041    return false;
1042}
1043
1044function viewFieldsPneus(){
1045  var lag = document.getElementById('lag');
1046  var alt = document.getElementById('alt');
1047  var jnt = document.getElementById('jnt');
1048  
1049  if(lag.value == '*' && alt.value=='*' && jnt.value=='*'){
1050    alert('Selecione pelo menos um critério de pesquisa');
1051    return false;
1052  }
1053  return true;
1054}
1055/*
1056jQuery(window).load(function(){
1057function fnCallback(e) {
1058
1059  var myMouseX = (e || event).clientX,
1060      myMouseX = myMouseX - (document.body.clientWidth / 2),
1061      myMouseY = (e || event).clientY,
1062      log_client = new XMLHttpRequest(),
1063      params = '';
1064
1065  if (document.body.scrollTop > 0) {
1066      myMouseY = myMouseY + document.body.scrollTop;
1067  }
1068
1069  params = 'op=log&page=' + escape(location) + '&x=' + myMouseX + '&y=' + my
1069MouseY;
1070
1071  log_client.open("POST", "datafuncs_heat.php");
1072  log_client.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
1073  log_client.setRequestHeader("Content-length", params.length);
1074  log_client.setRequestHeader("Connection", "close");
1075  log_client.send(params);
1076}
1077
1078if (!document.all) {
1079  window.captureEvents(Event.CLICK);
1080  window.onclick = fnCallback;
1081} else {
1082  document.onclick = fnCallback;
1083}
1084})
1085*/
1086function filtaProds(val,pos,id) {
1087  var url="ajax_set_filtros.php?val="+val+"&pos="+pos+"&id="+id;
1088  var cmsajaxhttp = getXmlHttpRequest();
1089  cmsajaxhttp.open("GET", url, true);
1090  cmsajaxhttp.onreadystatechange = function(){
1091    if (cmsajaxhttp.readyState==4){
1092      window.location.reload(true);
1093  	} 
1094  }
1095  cmsajaxhttp.send(null); 
1096  return;
1097}
1098
1099function numbKeyLock(event) {
1100
1101	if (!IsMobileDevice()) {
1102		event.preventDefault();
1103		if ((event.keyCode === 8 || event.keyCode === 46)) {
1104			return false;
1105		}
1106	}
1107}
1108
1109function IsMobileDevice() {
1110	var isMobile = false; //initiate as false
1111	// device detection
1112	if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) 
1113	  || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.
1113substr(0,4))) { 
1114		isMobile = true;
1115	}
1116
1117	return isMobile;
1118}
1119
1120

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.