PageSourceSearch

https://ine.es/widgets/nomen2/nomen2.js?L=

js ine.es collected 2026-10-01 07:32:52 UTC 7,836 bytes, 231 lines download raw bytes

1var servidor = "https://www.ine.es";
2var dominio = "";
3var idioma = "";
4
5var isMobile = {
6    Android: function() {
7        return navigator.userAgent.match(/Android/i);
8    },
9    BlackBerry: function() {
10        return navigator.userAgent.match(/BlackBerry/i);
11    },
12    iOS: function() {
13        return navigator.userAgent.match(/iPhone|iPad|iPod/i);
14    },
15    Opera: function() {
16        return navigator.userAgent.match(/Opera Mini/i);
17    },
18	Mobile: function() {
19        return navigator.userAgent.match(/Mobile/i);
20    },
21	GooglebotMobile: function() {
22        return navigator.userAgent.match(/Googlebot-Mobile/i);
23    },
24    Windows: function() {
25        return navigator.userAgent.match(/IEMobile/i);
26    },
27    any: function() {
28        return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows() || isMobile.Mobile() || isMobile.GooglebotMobile());
29    }
30};
31
32function loadScript(url,callback){
33	var script = document.createElement('script');
34	script.setAttribute('type', 'text/javascript');
35	script.setAttribute('src', url);
36	if(callback!=null)
37		script.addEventListener('load', callback);
38	document.head.appendChild(script);
39}
40
41function loadStyle(url,callback){
42	var script = document.createElement('style');
43	script.setAttribute('type', 'text/css');
44	script.setAttribute('src', url);
45	if(callback!=null)
46		script.addEventListener('load', callback);
47	document.head.appendChild(script);
48}
49
50function exitWidgetNomen(obj){
51	//var frm=$(obj).parent().parent().children("#contWidget");
52	if(document.getElementById("muniToExit").value.trim() != ""){
53		open(encodeURI(servidor + "/nomen2/tabla.do?L=" + idioma + "&accion=busquedaRapida&desagregacionRapida=S&nombrePoblacion=" + document.getElementById("muniToExit").value), "_blank");
54	}else{
55		if(document.getElementById("cajaTxt").value.trim() != "")
56			open(encodeURI(servidor + "/nomen2/tabla.do?L=" + idioma + "&accion=busquedaRapida&desagregacionRapida=S&nombrePoblacion=" + document.getElementById("cajaTxt").value), "_blank");
57		else
58			open(servidor + "/dyngs/INEbase/" + (idioma==1 ? 'en' : 'es') + "/operacion.htm?c=Estadistica_C&cid=1254736177010&menu=resultados&idp=1254735572981", "_blank");
59	}
60}
61
62function descargarNomen(){
63	open(servidor + "/explica/explica_estadymas_widget_cuantos_ayuda.htm", "_blank");
64}
65
66function setZindex(obj){
67	$(obj).parent().css("zIndex", 999999 )
68}
69
70function showAddPpalNomen(){
71	$(function() {
72		var minWidth=400;
73		var minHeight=330;
74		var height= $(document).height()<minHeight  ? $(document).height()-50  : 'auto';
75		var width= $(document).width()<minWidth  ? $(document).width()-50 : 'auto';
76		$( "#addPpal" ).dialog({height: height, width: width,modal: true, open: function( event, ui ) {setZindex(this);}}).prev(".ui-dialog-titlebar").css("background","#f0f8ea");
77	});
78}
79
80function pintarWidgetDestino(miwidget,urldestino,newquery, s,w, h, mw,mh, bc, borc, title, destino, pintarCab, idioma){
81	document.getElementById(destino).innerHTML =getWidget(miwidget,urldestino,newquery, s,w, h, mw,mh, bc, borc, title, pintarCab, idioma);
82}
83
84function pintarWidget(miwidget,urldestino,s,mw,mh,title){
85	return pintarWidgetCab(miwidget,urldestino,s,mw,mh,title,true);
86}
87
88function pintarWidgetCab(miwidget,urldestino,s,mw,mh,title,pintarCab){
89	var w = "";
90	var h = "";
91	var bc = "";
92	var borc = "";
93	
94	var miurl="";
95	var aux="";
96	var sinSubDom = servidor.split(".");
97	sinSubDom = sinSubDom[sinSubDom.length - 2] + "." + sinSubDom[sinSubDom.length - 1];
98	
99	for (var i=0;i<document.scripts.length;i++){
100		aux = document.scripts[i].src;
101		if (aux != "" && aux.indexOf('?') > 0 && aux.split("?")[0].split(sinSubDom).length >= 2 && aux.split("?")[0].split(sinSubDom)[1].toUpperCase() == miwidget.toUpperCase()){
102			miurl=aux;
103			break;
104		}
105	}
106	
107	var hx1 = miurl.substring(eval(miurl.indexOf("h=")+2), miurl.length);
108	var hx2 = hx1.substring(0,hx1.indexOf("px"));
109	
110	var hx3 = miurl.substring(0,eval(miurl.indexOf("h=")+2)) + eval(hx2-19) + hx1.substring(hx1.indexOf("px"), hx1.length);
111	
112	var pos=hx3.indexOf("?");
113	if(pos==-1)
114	  pos=hx3.length;
115	else 
116	  pos++;
117	var query=hx3.substring(pos,hx3.length);
118	
119	var obj = readParams(query);
120
121	idioma = obj.L;
122	if(idioma == "")
123		idioma = 0
124	
125	if (obj.capaDest === undefined || obj.capaDest==null)
126		document.body.insertAdjacentHTML("beforeend", getWidget(miwidget,urldestino,query, obj.fs, obj.w, obj.h, obj.mw, obj.mh, obj.bc, obj.borc, title, pintarCab, idioma));
127	else
128		document.getElementById(obj.capaDest).innerHTML = getWidget(miwidget,urldestino,query, obj.fs, obj.w, obj.h, obj.mw, obj.mh, obj.bc, obj.borc, title, pintarCab, idioma);
129}
130
131function readParams(query){
132	var objStr ="";
133	var valvalue="";
134	
135	if (query.length>0){
136		var n=query.split("&");
137		objStr+="[{";
138		for (var i=0;i<n.length;i++){
139			valvalue = n[i].split("=");
140			if (i>0)
141			   objStr+=",";
142			objStr+="\"" + valvalue[0] + "\":\"" + valvalue[1]+ "\"";			
143		}
144		objStr+="}]";
145	}
146
147	var obj = eval(objStr);
148	if( obj.length>0)
149		return obj[0];
150	else
151		return null;
152	}
153
154function loadText(){
155	document.getElementById("imgInfo").title = texto15;
156	document.getElementById("imgDesc").title = texto16;
157	if (isMobile.any())
158		document.getElementById("imgAcceso").title = texto17;
159	document.getElementById("addPpal").title = texto17;
160		
161	document.getElementById("txt21").innerHTML = texto21;
162	document.getElementById("txt22").innerHTML = texto22;
163	document.getElementById("txt23").innerHTML = texto23;
164	document.getElementById("txt24").innerHTML = texto21;
165	document.getElementById("txt25").innerHTML = texto22;
166	document.getElementById("txt26").innerHTML = texto23;
167	document.getElementById("txt27").innerHTML = texto21;
168	document.getElementById("txt28").innerHTML = texto22;
169	document.getElementById("txt29").innerHTML = texto29;
170	
171	document.getElementById("imgAnd").title = texto30;
172	document.getElementById("imgIos").title = texto30;
173	document.getElementById("imgWp").title = texto30;
174}
175	
176function getWidget(miwidget,urldestino,newquery, s,w, h, mw,mh, bc, borc, title, pintarCab, idioma){
177	return getWidgetCab(miwidget,urldestino,newquery, s,w, h, mw,mh, bc, borc, title, true, idioma);
178}
179
180function getWidgetCab(miwidget,urldestino,newquery, s,w, h, mw,mh, bc, borc, title,pintarC
180ab, idioma){
181	var cadenasalida="";
182	if (pintarCab){
183		cadenasalida ="<div style=\"";
184		cadenasalida +="display: block;";
185		if (bc!== undefined && bc.length>0)
186			cadenasalida +="background-color:#" + bc + ";";
187		cadenasalida +="border-style: solid; ";
188		if (borc!== undefined && borc.length>0)
189			cadenasalida +="border-color:#" + borc + ";";
190			cadenasalida +="border-width: 1px;margin-right: auto;margin-left: auto;";
191			cadenasalida +="padding: 0; box-sizing: border-box;";
192		
193		var wx = w.substring(0, w.indexOf("px"))-15;
194		var hx = h.substring(0, h.indexOf("px"));
195		var hxIframe = eval(hx)-30;
196		
197		cadenasalida +="width: " + wx + "px;";
198		cadenasalida +="height: " + hx + "px;";
199		if (s!== undefined && s.length>0)
200			cadenasalida +="font-size: " + s + ";";
201		cadenasalida +="clear:both;";
202		cadenasalida +=" \">";
203	}
204
205	cadenasalida += "<iframe id=\"contWidget\" name=\"contWidget\" frameborder=\"0\" height=\"100%\" width=\"100%\" src=\"" + urldestino +"?" + newquery +"\"";
206	
207	if (s!== undefined && s.length>0)
208	   cadenasalida+=" scrolling=\"" + s + "\"";
209	if (mw!== undefined && mw.length>0)   
210	  cadenasalida+=" marginwidth=\"" + mw + "\"";
211	if (mh!== undefined && mh.length>0)   
212	  cadenasalida+=" marginheight=\"" + mh + "\"";
213	if (title.length>0)   
214	  cadenasalida+=" title=\"" + title + "\"";
215	       
216	cadenasalida +="></iframe>";
217	
218	if (pintarCab){
219		cadenasalida += ``
220	}
221	return cadenasalida;
222}
223
224var miwidget="/widgets/nomen2/nomen2.js";
225var url=servidor + "/widgets/nomen2/nomen2.shtml";
226
227try{
228pintarWidget(miwidget,url,'','','','');
229} catch(exp){
230	alert(exp);
231}

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.