1/**FUNCIONES**/ 2function enviar(formul) 3{ 4var cam = buscador.search_theme_form_keys.value; 5if (cam!="Buscar..."){ 6location='/Servicios/Municipios/pueblos.nsf/buscar?OpenAgent&'+cam; 7} 8} 9 10function google(campo) 11{ 12var cam = buscador_web.query.value; 13if (cam!="Buscar..."){ 14location='http://google.com/search?q='+cam+'&hl=es'; 15} 16} 17 18function limpiar(campo) 19{ 20var cam = campo.value; 21if (cam=="Buscar..."){ 22campo.value=""; 23} 24} 25 26function escribir(campo) 27{ 28var camp = campo.value; 29if (camp==""){ 30campo.value ="Buscar..."; 31} 32} 33/**FIN FUNCIONES**/ 34 35/**COMPAT**/ 36// UPGRADE: The following attribute helpers should now be used as: 37// .attr("title") or .attr("title","new title") 38jQuery.each(["id","title","name","href","src","rel"], function(i,n){ 39 jQuery.fn[ n ] = function(h) { 40 return h == undefined ? 41 this.length ? this[0][n] : null : 42 this.attr( n, h ); 43 }; 44}); 45 46// UPGRADE: The following css helpers should now be used as: 47// .css("top") or .css("top","30px") 48jQuery.each("top,left,position,float,overflow,color,background".split(","), function(i,n){ 49 jQuery.fn[ n ] = function(h) { 50 return h == undefined ? 51 ( this.length ? jQuery.css( this[0], n ) : null ) : 52 this.css( n, h ); 53 }; 54}); 55 56// UPGRADE: The following event helpers should now be used as such: 57// .oneblur(fn) -> .one("blur",fn) 58// .unblur(fn) -> .unbind("blur",fn) 59var e = ("blur,focus,load,resize,scroll,unload,click,dblclick," + 60 "mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," + 61 "submit,keydown,keypress,keyup,error").split(","); 62 63// Go through all the event names, but make sure that 64// it is enclosed properly 65for ( var i = 0; i < e.length; i++ ) new function(){ 66 67 var o = e[i]; 68 69 // Handle event unbinding 70 jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; 71 72 // Finally, handle events that only fire once 73 jQuery.fn["one"+o] = function(f){ 74 // save cloned reference to this 75 var element = jQuery(this); 76 var handler = function() { 77 // unbind itself when executed 78 element.unbind(o, handler); 79 element = null; 80 // apply original handler with the same arguments 81 return f.apply(this, arguments); 82 }; 83 return this.bind(o, handler); 84 }; 85 86}; 87 88// UPGRADE: .ancestors() was removed in favor of .parents() 89jQuery.fn.ancestors = jQuery.fn.parents; 90 91// UPGRADE: The CSS selector :nth-child() now starts at 1, instead of 0 92jQuery.expr[":"]["nth-child"] = "jQuery.nth(a.parentNode.firstChild,parseInt(m[3])+1,'nextSibling')==a"; 93 94// UPGRADE: .filter(["div", "span"]) now becomes .filter("div, span") 95jQuery.fn._filter = jQuery.fn.filter; 96jQuery.fn.filter = function(arr){ 97 return this._filter( arr.constructor == Array ? arr.join(",") : arr ); 98}; 99 100/**FIN COMPAT**/ 101 102/**DHTMLMENU**/ 103// $Id: DEV-dhtml_menu.js,v 1.1.2.1 2007/07/31 04:09:19 brmassa Exp $ 104 105dhtmlMenu = {}; 106 107/** 108 * Changes the state of a submenu from open to close. 109 */ 110dhtmlMenu.switchMenu = function(submenu, parent) { 111 if($(parent).is(".expanded")) { 112 if (Drupal.settings.dhtmlMenu.useEffects) { 113 $(submenu).slideUp("fast"); 114 } else { 115 $(submenu).css("display", "none"); 116 } 117 $(parent).removeClass("expanded").addClass("collapsed"); 118 } else { 119 if (Drupal.settings.dhtmlMenu.useEffects) { 120 $(submenu).slideDown("fast"); 121 } else { 122 $(submenu).css("display", "inline"); 123 } 124 $(parent).removeClass("collapsed").addClass("expanded"); 125 } 126 dhtmlMenu.saveMenuState(); 127}; 128 129/** 130 * Grabs the cookie data. 131 */ 132dhtmlMenu.getCookie = function(name) { 133 var search = name + "="; 134 var returnvalue = ""; 135 if (document.cookie.length > 0) { 136 offset = document.cookie.indexOf(search); 137 if (offset != -1) { 138 offset += search.length; 139 var end = document.cookie.indexOf(";", offset); 140 if (end == -1) { 141 end = document.cookie.length; 142 } 143 returnvalue = unescape(document.cookie.substring(offset, end)); 144 } 145 } 146 return returnvalue; 147}; 148 149/** 150 * Saves the states of the menus. 151 */ 152dhtmlMenu.saveMenuState = function() { 153 var blocks = ""; 154 $("div.submenu").each(function(i) { 155 if (this.style.display != "none") { 156 if (blocks != "") { 157 blocks += ","; 158 } 159 blocks += this.id; 160 } 161 }); 162 document.cookie = "dhtml_menu=" + blocks + ";path=/"; 163}; 164 165/** 166 * Start everything: Attaches the online users autoupdate behaviour 167 * to the block content. 168 */ 169$(function() { 170 var cookievalue = dhtmlMenu.getCookie("dhtml_menu"); 171 if (cookievalue != "") { 172 var cookieList = cookievalue.split(","); 173 for (var i = 0; i < cookieList.length; i++) { 174 $("#"+ cookieList[i]).show(); 175 $("#menu-" + cookieList[i]).addClass("expanded"); 176 } 177 } 178 $("ul.dhtml_menu li[@class!=leaf] > a").each(function() { 179 if ($(this).parent().children("div.submenu").length > 0) { 180 //$(this).css({paddingLeft: "2em", marginLeft: "-2em", zIndex: 2}).click(function(e) { 181 $(this).css({zIndex: 2}).click(function(e) { 182 id = $(this).parents()[0].id.replace("menu-", "");
183 dhtmlMenu.switchMenu($("#"+ id)[0], $(this).parents()[0]); 184 return false; 185 }) 186 .dblclick(function(e) { 187 window.location = this.href; 188 }); 189 } 190 }); 191 $(window).unload(dhtmlMenu.saveMenuState); 192}); 193 194/**FIN DHTMLMENU**/ 195 196 197 198/**FUNCIONES**/ 199/* ----- Funcions d'utilitat ------ */ 200 201function getCookie(name) { 202 var re=new RegExp(name+"=[^;]+", "i"); //construct RE to search for target name/value pair 203 if (document.cookie.match(re)) { //if cookie found 204 //alert(document.cookie.match(re)[0].split("=")[1]); 205 return document.cookie.match(re)[0].split("=")[1]; //return its value 206 } 207 return "" 208} 209 210function setCookie(name, value, domain, path, days) { 211 if (typeof days!="undefined"){ //if set persistent cookie 212 var expireDate = new Date() 213 var expstring=expireDate.setDate(expireDate.getDate()+days) 214 document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; domain="+domain+"; path="+path; 215 } 216 else //else if this is a session only cookie 217 document.cookie = name+"="+value+"; domain="+domain+"; path="+path; 218} 219/**FIN FUNCIONES**/ 220 221/**FUNCIONES**/ 222$(function() { 223 $('.content-and-links-wrapper a.lightbox').lightBox(); 224 $('.node_images a.lightbox').lightBox(); 225 }); 226 227/**FIN FUNCIONES**/ 228 229/**FUNCIONES**/ 230 231/**FIN FUNCIONES**/
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.