PageSourceSearch

https://www.vivecastellon.com/eventos-castellon-agenda/js/scripts.js

js vivecastellon.com collected 2026-10-02 11:54:41 UTC 4,054 bytes, 147 lines download raw bytes

1var http = createRequestObject();
2
3// Creamos conexion
4function createRequestObject() {
5    var xmlhttp;
6    try {
7        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
8    } catch(e) {
9        try {
10            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
11        } catch(f) {
12            xmlhttp = null;
13        }
14    }
15    if (!xmlhttp && typeof XMLHttpRequest != "undefined") {
16        try {
17            xmlhttp = new XMLHttpRequest();
18        } catch (e) {
19            xmlhttp = false;
20        }
21    }
22    if (!xmlhttp && window.createRequest) {
23        try {
24            xmlhttp = window.createRequest();
25        } catch (e) {
26            xmlhttp = false;
27        }
28    }
29    return xmlhttp;
30}
31
32// Envia TEXTO por POST
33function sendRequestTextPost(k,v) {
34    var rnd = Math.random();
35    try{
36        k = escape(k);
37        v = escape(v);
38
39        http.open('POST', '/register.php', true);
40        http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
41        http.onreadystatechange = handleResponseText;
42        http.send(k+'='+v+'&rnd='+rnd+'&ajaxenabled=1');
43    } catch(e) {
44//        alert("error send: "+e);
45    } finally {}
46}
47
48// Recoge respuesta del servidor como TEXTO
49function handleResponseText() {
50    try {
51        if (http.readyState == 4 && http.status == 200) {
52            var response = http.responseText;
53        }
54    } catch(e) {
55//        alert("error rcv: "+e);
56    } finally {}
57}
58
59function setClick() {
60    var id = this.id.substring(7);
61    if (id) {
62        sendRequestTextPost('bannerid', id);
63    }
64}
65
66function initBanners() {
67    var objs = $$('a');
68    $each(objs, function(elem, index) {
69        if (elem.id.substring(0,7) == 'banner_') {
70            elem.addEvent('click', setClick);
71        }
72    });
73}
74window.addEvent('load', initBanners);
75
76<!-- // Cambio de color celda
77
78	function cambiar_color_over(celda){
79		celda.style.backgroundColor="#f4f4f5"
80	}
81	function cambiar_color_out(celda){
82		celda.style.backgroundColor="#ffffff"
83	}
84
85
86<!-- // Funciones pestaƱa noticias dcha
87
88
89function procesaPestanas() {
90    var objs = document.getElementsByTagName('span');
91    if (objs && objs.length) {
92        for (var i = 0; i < objs.length; i++) {
93            if (objs[i].className == 'pestana') {
94                objs[i].onclick = activaPestana;
95                var id  = objs[i].id.substring(1);
96                var obj = document.getElementById(id);
97                if (obj && obj.style) {
98                    obj.style.display = 'none';
99                }
100            }
101        }
102    }
103}
104
105function activaPestana() {
106    if (!this.id) {
107        return false;
108    }
109
110    var objs = document.getElementsByTagName('span');
111    if (objs && objs.length) {
112
113        // Verificamos que el DIV destino existe
114        for (var i = 0; i < objs.length; i++) {
115            if (objs[i].className=='pestana' || objs[i].className=='pestana sel') {
116                var idcontent = objs[i].id.substring(1);
117                var obj       = document.getElementById(idcontent);
118                if (objs[i].id == this.id && !obj) {
119                    alert('No se ha encontrado el DIV del contenido');
120                    return false;
121                }
122            }
123        }
124
125        // Todo OK
126        for (var i = 0; i < objs.length; i++) {
127            if (objs[i].className=='pestana' || objs[i].className=='pestana sel') {
128                var idcontent = objs[i].id.substring(1);
129                var obj       = document.getElementById(idcontent);
130                if (objs[i].id == this.id) {
131                    if (obj && obj.style) {
132                        obj.style.display = 'block';
133                    }
134                    objs[i].className = 'pestana sel';
135                    objs[i].onclick = null;
136                } else {
137                    if (obj && obj.style) {
138                        obj.style.display = 'none';
139                    }
140                    objs[i].className = 'pestana';
141                    objs[i].onclick = activaPestana;
142                }
143            }
144        }
145    }
146}
147

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.