PageSourceSearch

https://www.elnorte.com/libre/js/GRFunc2.js?grts=202609081823

js elnorte.com collected 2026-09-24 17:43:24 UTC 124,128 bytes, 2,730 lines download raw bytes

1//GRFunc.js
2function GRFunc() {
3	this.grConfig = new GRConfig();
4	this.grConfig.stageBase();
5	if (typeof (URLImagenes) != "undefined")
6		URLImagenes += "/";
7	if (typeof (URLImpresa) != "undefined")
8		URLImpresa += "/";
9	if (typeof (URLFlashes) != "undefined")
10		URLFlashes += "/";
11	this.NuestroHost = this.grConfig.NuestroHost;
12	this.NumeroAleatorio = "P" + Math.round(Math.random() * 1000);
13	this.EsStage = false;
14	this.UsuarioLoggueado = null; //this.Get_UserLogeado();
15	this.stageBase = function() {
16		this.EsStage = false;
17		var host = window.location.hostname;
18		var posicion = host.indexOf(".com");
19		this.NuestroHost = this.grConfig.NuestroHost;
20		this.EsStage = this.grConfig.EsStage;
21		if (this.EsStage || typeof (URLImagenes) == "undefined") {
22			URLFlashes = this.NuestroHost;
23			URLImpresa = this.NuestroHost;
24		}
25	};
26	this.oas = this.grConfig.Protocol + '//anuncios.gruporeforma.com/RealMedia/ads/';
27	this.RN = new String(Math.random());
28	this.RNS = this.RN.substring(2, 11);
29	this.VersionBrowser = this.BrowserVersion();
30	this.IdPlaza = this.grConfig.IdPlaza;
31	this.verificaSitioMovil = function() {
32		var dominio = document.domain.toLowerCase();
33		var navUA = navigator.userAgent.toLowerCase();
34		var tipoBrowser;
35		var tipoPlataforma;
36		if (navUA.indexOf('ipod') != -1)
37			tipoBrowser = 'iphone';
38		else if (navUA.indexOf('iphone') != -1)
39			tipoBrowser = 'iphone';
40		else if (navUA.indexOf('ipad') != -1)
41			tipoBrowser = 'ipad';
42		else if (navUA.indexOf('android') != -1)
43			tipoBrowser = 'android';
44		else if (navUA.indexOf('blackberry') != -1)
45			tipoBrowser = 'blackberry';
46		else if (navUA.indexOf('msie') != -1)
47			tipoBrowser = 'explorer';
48		else if (navUA.indexOf('netscape') != -1)
49			tipoBrowser = 'netscape';
50		else if (navUA.indexOf('firefox') != -1)
51			tipoBrowser = 'firefox';
52		else if (navUA.indexOf('safari') != -1)
53			tipoBrowser = 'safari';
54		else
55			tipoBrowser = 'otros';
56
57		if (navUA.indexOf('windows') != -1)
58			tipoPlataforma = 'windows';
59		else
60			tipoPlataforma = 'mac';
61
62		if (tipoBrowser == 'iphone') {
63			var cookieiphone = this.Get_Cookie('gruporeforma_iphone');
64			if (cookieiphone == null) {
65				window.location.href = this.grConfig.Protocol + '//' + dominio + '/EntradaIphone.htm';
66			}
67		}
68		else if (tipoBrowser == 'blackberry') {
69			var cookieblackberry = this.Get_Cookie('gruporeforma_blackberry');
70			if (cookieblackberry == null) {
71				window.location.href = this.grConfig.Protocol + '//' + dominio + '/EntradaBlackberry.htm';
72			}
73		}
74		else if (tipoBrowser == 'otros' && tipoPlataforma != 'windows' && tipoPlataforma != 'mac') {
75			window.location.href = this.grConfig.Protocol + '//www.elnorte.com/';
76		}
77	};
78	this.stageBase();
79	this.MMConfig = null;
80	//this.MultiMediaConfig();
81	this.NombrePlaza = this.grConfig.NombrePlaza;
82	this.IdProducto = this.grConfig.IdProducto;
83	this.pathHndlr = this.grConfig.pathHndlr;
84	//this.publicidadsound = 'lightsaber';
85	//this.publicidadsound = 'jueves';
86	this.publicidadsound = 'viernes';
87	this.PermiteFullScreen();
88}
89
90// Secuencias bloqueadas por el filtro del IIS (SQL injection).
91const GR_SECUENCIAS_BLOQUEADAS = [
92    // Reglas bare confirmadas empiricamente
93    'sleep', 'length',
94    // Secuencias alfanumericas de la lista del IIS
95    'netsparker', 'waitfor', 'syscolumns', 'varchar', 'acunetix',
96    'injected', 'sysdate', 'vulnweb', 'executionsink', 'domxss',
97    'basedir', 'vbscript', 'mouseover', 'htaccess', 'ctxsys',
98    'extractvalue', 'onstart', 'onerror', 'nslookup', 'saintcorp',
99    'sysdatabases',
100    // Secuencias con guion que pueden aparecer literalmente
101    'x-scriptlet', 'web-inf', 'set-cookie',
102	//Se agregan nuevas palabras
103	'from'
104];
105
106GRFunc.prototype.RomperSecuenciasBloqueadas = function (titulo) {
107    if (titulo == null || titulo === '') return titulo;
108
109    // Decodifica por si llega encodeado. Si viene plano y trae un "%"
110    // literal (ej. "Descuentos al 100%"), decodeURIComponent truena y
111    // se usa el texto tal cual llego.
112    var texto;
113    try { texto = decodeURIComponent(titulo); }
114    catch (e) { texto = titulo; }
115
116    var esAlfaNum = function (ch) {
117        return /[a-z0-9]/i.test(ch);
118    };
119
120    // Punto de corte: mitad de la secuencia detectada, ajustado en zigzag
121    // para caer entre dos alfanumericos (evita que el espacio quede pegado
122    // al guion en secuencias como "set-cookie" o "x-scriptlet").
123    var posicionDeCorte = function (str, inicio, largo) {
124        var mitad = inicio + Math.floor(largo / 2);
125        for (var offset = 0; offset < largo; offset++) {
126            var p = mitad + (offset % 2 === 0 ? offset / 2 : -(Math.floor(offset / 2) + 1));
127            if (p > inicio && p < inicio + largo &&
128                esAlfaNum(str.charAt(p - 1)) && esAlfaNum(str.charAt(p)))
129                return p;
130        }
131        return mitad; // fallback; con la lista actual nunca se llega aqui
132    };
133
134    // La busqueda es case-insensitive (se busca sobre el texto en minusculas)
135    // pero la insercion se hace sobre el texto original para no alterar
136    // mayusculas ni acentos del titulo.
137    var huboCambio = true;
138    while (huboCambio) {
139        huboCambio = false;
140        for (var s = 0; s < GR_SECUENCIAS_BLOQUEADAS.length; s++) {
141            var seq = GR_SECUENCIAS_BLOQUEADAS[s];
142            var idx = texto.toLowerCase().indexOf(seq);
143            while (idx >= 0) {
144                var corte = posicionDeCorte(texto, idx, seq.length);
145                texto = texto.substring(0, corte) + ' ' + texto.substring(corte);
146                huboCambio = true;
147                idx = texto.toLowerCase().indexOf(seq);
148            }
149        }
150    }
151    return encodeURIComponent(texto);
152}
153
154GRFunc.prototype.codificaValor = function (titulo) {
155    if (titulo == null || titulo === '') {
156        return titulo;
157    }
158
159    try {
160        titulo = decodeURIComponent(titulo);
161    } catch (e) { }
162
163    return btoa(encodeURIComponent(titulo));
164}
165
166GRFunc.prototype.grpProfile = function() {
167	// var pProfile = this.Get_Cookie('grpprofile');
168	// console.log(pProfile);
169	//if(this.testFB())
170	if (true)
171		return this.Get_CookieSTW('grpprofile') == null ? this.NuestroHost + 'libre/imgdiseno/header/userDesconocido.png' : this.Get_CookieSTW('grpprofile');
172	else
173		return this.NuestroHost + 'libre/imgdiseno/header/ic_desconectar.png';
174}
175
176GRFunc.prototype.testFB = function() {
177	if (this.Get_Cookie('testfb') == '1')
178		return true;
179	else
180		return false;
181}
182
183GRFunc.prototype.pintaCintillaConFB = function() {
184	var strDivs = '';
185	var style = document.createElement('link');
186	style.rel = 'stylesheet';
187	style.type = 'text/css';
188	style.href = '/libre/acceso/css/loginrs/estiloshome.css';
189
190	var style2 = document.createElement('link');
191	style2.rel = 'stylesheet';
192	style2.type = 'text/css';
193	style2.href = '/libre/js/jquery.fancybox/jquery.fancybox.css?v=2.1.5';
194
195	var style3 = document.createElement('link');
196	style3.rel = 'stylesheet';
197	style3.type = 'text/css';
198	style3.href = this.grConfig.Protocol + '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css';
199
200	var style4 = document.createElement('link');
201	style4.rel = 'stylesheet';
202	style4.type = 'text/css';
203	style4.href = this.grConfig.Protocol + '//gruporeforma.elnorte.com/graficohtml5/especial/fonts/Gotham-Book.css';
204
205	var style5 = document.createElement('link');
206	style5.rel = 'stylesheet';
207	style5.type = 'text/css';
208	style5.href = this.grConfig.Protocol + '//gruporeforma.elnorte.com/graficohtml5/especial/fonts/Gotham-Bold.css';
209
210	var style6 = document.createElement('link');
211	style6.rel = 'stylesheet';
212	style6.type = 'text/css';
213	style6.href = this.grConfig.Protocol + '//gruporeforma.elnorte.com/graficohtml5/especial/fonts/Gotham-Light.css';
214
215	var style7 = document.createElement('link');
216	style7.rel = 'stylesheet';
217	style7.type = 'text/css';
218	style7.href = this.grConfig.Protocol + '//gruporeforma.elnorte.com/graficohtml5/especial/fonts/GothamXNarrow-Book.css';
219
220	var style8 = document.createElement('link');
221	style8.rel = 'stylesheet';
222	style8.type = 'text/css';
223	style8.href = this.grConfig.Protocol + '//gruporeforma.elnorte.com/graficohtml5/especial/fonts/GothamCondensed-Light.css';
224
225	var script = document.createElement('script');
226	script.type = 'text/javascript'
227	script.onload = function() { console.log(estatusfb_gr); };
228	script.src = this.grConfig.Protocol + '//www.gruporeforma.com/libre/acceso/rsc.asp';
229	document.head.appendChild(script);
230
231	var btnFB = false;
232	var esTop = !(window.top !== window.self);
233	var tipoCinta = this.Get_Cookie('tipocinta');
234	var ctipou = this.Get_Cookie('ctipou');
235	var estatusfb = this.Get_Cookie("estatusfb");
236	var diasacceso = this.Get_Cookie("diasacceso");
237	var nombrePlaza = this.grConfig.NombrePlaza.toUpperCase().replace(" ", "");
238	var csusc = this.Get_Cookie('csusc');
239	var userCusuario = this.UsuarioLoggueado;
240
241	var color = '#1eab1e';
242	var charLogo = 'r';
243	var bgImg = 'reforma';
244	if (this.IdPlaza == 101) {
245		color = '#0166ff';
246		charLogo = 'n';
247		bgImg = 'norte';
248	}
249	else if (this.IdPlaza == 103) {
250		color = '#e64241';
251		charLogo = 'm';
252		bgImg = 'mural';
253	}
254
255	if (esTop)
256		$(document).ready(function() {
257			if (estatusfb_gr != "") { estatusfb = estatusfb_gr; }
258			if (ctipou_gr != "") { ctipou = ctipou_gr; }
259			if (tipocinta_gr != "") { tipoCinta = tipocinta_gr; }
260			if (ctipou != null) { ctipou = ctipou.toLowerCase(); }
261
262
263			//CintaConectaConFB
264			if (tipoCinta == '0') {
265				if (ctipou == 'at1' || ctipou == 'st1' || ctipou == 'it1') {
266					if (estatusfb == '0') {
267						// strDivs = '<div class="fancybox-overlay fancybox-overlay-fixed" style="width: auto; height: auto; display: none; z-index: 999999;" id="fndModal" ></div><div class="ad-flotante" style="display:block; z-index: 99999;" id="adFltn"> <div class="header-ad-flotante"> <p style="text-align: left; margin-left: 30px; margin-bottom: 0; z-index: 10;" id="txtAd" onclick="grFunc.abreLgInFB();"> <a style="color: #fff; cursor: pointer;" class="fancybox"> <img src="/libre/imgdiseno/acceso/logo_n.png" width="25px" style="margin-right: 15px;" /> Ingresa a ELNORTE.COM con tu cuenta de Facebook y disfruta de sus beneficios </a></p> <a class="btn_cerrar-flotante" id="btnCerrar" onclick="grFunc.cierraCinta();"><img src="/libre/imgdiseno/acceso/cerrar-copy.png"/></a> </div> </div> <div class="fancybox-wrap fancybox-desktop fancybox-type-inline fancybox-opened" tabindex="-1" style="width: 960px; height: auto; position: absolute; top: 20px; left: 79px; opacity: 1; overflow: visible; display: none; z-index: 9999999;" id="modalFB"> <div class="fancybox-skin" style="padding: 0px; width: auto; height: auto;"> <div class="fancybox-outer"> <div class="fancybox-inner" style="overflow: auto; width: 960px; height: auto;"> <div id="login" style="background: rgb(255, 255, 255); padding: 30px; max-width: 960px; display: block;"> <div class="header_fancy"></div> <div class="mtop30"></div> <div class="row text-center" id="conectado"> <table> <tr><td> <div class="col-sm-4" style="padding-right:30px;"> <h4 class="text-primary">Hola, Marcia</h4> <h5>Te invitamos a ingresar <br/>a ELNORTE.COM <br/>usando Facebook</h5> <div class="btn-group"> <div id="ifrRs"></div> </div> <p style="color: #444;font-size: 20px; line-height: 24px; margin: 0 0 1em;">Para EL NORTE,<br/> tu privacidad es esencial.</p> <p class="text-muted"> No se publicará en tu muro.<br/> Tu identidad está protegida.<br/> Conoce nuestro <a href="#" style="text-decoration: none !important; transition: all 0.2s; color: #0066ff; background-color: transparent;">Aviso de Privacidad</a> </p> </div> </td> <td> <div class="col-sm-8">
267 <img src="/libre/imgdiseno/acceso/promo_relaciona_red_social.png" class="img-responsive center-block" style="vertical-align: middle; border: 0; color: transparent; font-size: 0;"/> </div> </td></tr> </table> </div>  </div> </div> </div> <a title="Close" class="fancybox-item fancybox-close" onclick="grFunc.cierraLgInFB();"></a> </div> </div> ';
268						strDivs = '<section class="pleca-vincular-norte" id="adFltn" style="padding: 15px 0; background-color: ' + color + '; box-sizing: inherit; position: fixed; bottom: 0; width: 100%; z-index: 1000;"><div class="container-fluid" style="padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; display: table;"><div id="txtAd" class="row" style="height: 100%; display: table-row; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333;"><div class="col-xs-3 col-sm-1 col-md-1 col-lg-1 vertical-center" onclick="grFunc.abreLgInFB();" style=" cursor: pointer; display: table-cell; float: none; vertical-align: middle;"><img src="/libre/imgdiseno/acceso/logo_' + charLogo + '.png"/></div><div class="col-xs-9 col-sm-11 col-md-11 col-lg-11 full-width" onclick="grFunc.abreLgInFB();" style="cursor: pointer; width: 100%; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333;"><p style="font-size: 16px; color: #fff; margin-bottom: 0;">Ingresa a ' + nombrePlaza + '.COM con tu cuenta de Facebook y comparte tu acceso con más usuarios</p></div><div><a class="btn_cerrar-flotante" id="btnCerrar" onclick="grFunc.cierraCinta();" style=" bottom: 22px; right: 110px;"><img src="/libre/imgdiseno/acceso/cerrar-copy.png"></a></div></div></div></section> <!-- Comienza Modal --> <div class="fancybox-wrap fancybox-desktop fancybox-type-inline fancybox-opened" tabindex="-1" style="width: auto; height: auto; position: fixed; top: 62px; left: 79px; opacity: 1; overflow: visible; display: none; z-index: 9999999;" id="modalFB"><div class="fancybox-skin" style="padding: 0px; width: auto; height: auto;"><div class="fancybox-outer"><div class="fancybox-inner" style=" width: 960px; height: 570px;"><div class="header plaza_norte" style="background-color: ' + color + '; background-image: url(/libre/imgdiseno/acceso/logo_header_' + bgImg + '.png); background-position: center; width: 100%; height: 40px; background-repeat: no-repeat; margin-bottom: 15px;"></div><section><div class="container text-center"><div class="row"><div class="col-xs-12 col-sm-8 col-sm-offset-2"><h3 class="text-primary" style=" font-family: Gotham-Book; font-size: 24px; margin-top: 20px; margin-bottom: 10px;">Hola, ' + userCusuario + '</h3><p class="headline-text" style="line-height: 1.42857143; font-family: Gotham-Book; color: #444; font-size: 20px; margin: 0 0 10px; text-align: center; display: block; -webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 0px; -webkit-margin-end: 0px; box-sizing: inherit;">Ingresa<br> a ' + nombrePlaza + '.COM<br> usando Facebook</p><div class="btn-group"><div id="ifrRs"></div></div><p style="line-height: 1.42857143; font-family: Gotham-Book; font-size: 18px; color: #444; margin: 0 0 10px;">Tu privacidad es esencial</p><p class="text-muted" style="line-height: 1.42857143; color: #777; font-family: Gotham-Book; font-size: 18px; margin: 0 0 10px;">No se publicará en tu muro.<br>Tu identidad está protegida.</p><a class="anchor-aviso-privacidad" href="" style="font-size: 16px; color: #337ab7; text-decoration: none;">Aviso de privacidad</a></div></div></div><div class="container-fluid" style="padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333;"><div class="row"><div class="col-xs-12 col-sm-12 bg-norte" style="background-image: url(/libre/imgdiseno/acceso/facebook-mobile-content-' + bgImg + '.png); margin: 30px 0; padding: 15px; background-size: cover; background-position: center top;"><h3 style=" color: #fff; font-family: Gotham-Book; text-align: center; font-size: 24px; margin-top: 20px; margin-bottom: 10px;">Al conectarte con Facebook tu suscripción te da más: <br><br><b>Más usuarios<br>Más dispositivos</b></h3></div></div></div></section></div></div><a title="Close" class="fancybox-item fancybox-close" onclick="grFunc.cierraLgInFB();"></a></div></div> <div class="fancybox-overlay fancybox-overlay-fixed" style="width: auto; height: auto; display: none; z-index: 999999;" id="fndModal" ></div>';
269						btnFB = true;
270					}
271				}
272			}
273			//CintaUnDía
274			else if (tipoCinta == '1') {
275				// strDivs = '<section class="pleca-vincular-norte" id="adFltn" style="padding: 15px 0; background-color: '+color+'; box-sizing: inherit; position: fixed; bottom: 0; width: 100%; z-index: 1000;"><div class="container-fluid" style="padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; display: table;"><div id="txtAd" class="row" style="height: 100%; display: table-row; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333;"><div class="col-xs-3 col-sm-1 col-md-1 col-lg-1 vertical-center" onclick="grFunc.abreLgInFB();" style=" cursor: pointer; display: table-cell; float: none; vertical-align: middle;">
275<img src="/libre/imgdiseno/acceso/logo_'+charLogo+'.png"/></div><div class="col-xs-9 col-sm-11 col-md-11 col-lg-11 full-width" onclick="grFunc.abreLgInFB();" style="cursor: pointer; width: 100%; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333;"><p style="font-size: 16px; color: #fff; margin-bottom: 0;">Ingresa a '+nombrePlaza+'.COM con tu cuenta de Facebook y comparte tu acceso con más usuarios</p></div><div><a class="btn_cerrar-flotante" id="btnCerrar" onclick="grFunc.cierraCinta();" style=" bottom: 22px; right: 110px;"><img src="/libre/imgdiseno/acceso/cerrar-copy.png"></a></div></div></div></section> <!-- Comienza Modal --> <div class="fancybox-wrap fancybox-desktop fancybox-type-inline fancybox-opened" tabindex="-1" style="width: auto; height: auto; position: fixed; top: 62px; left: 79px; opacity: 1; overflow: visible; display: none; z-index: 9999999;" id="modalFB"><div class="fancybox-skin" style="padding: 0px; width: auto; height: auto;"><div class="fancybox-outer"><div class="fancybox-inner" style=" width: 960px; height: 570px;"><div class="header plaza_norte" style="background-color: '+color+'; background-image: url(/libre/imgdiseno/acceso/logo_header_'+bgImg+'.png); background-position: center; width: 100%; height: 40px; background-repeat: no-repeat; margin-bottom: 15px;"></div><section><div class="container text-center"><div class="row"><div class="col-xs-12 col-sm-8 col-sm-offset-2"><h3 class="text-primary" style=" font-family: Gotham-Book; font-size: 24px; margin-top: 20px; margin-bottom: 10px;">Hola, '+userCusuario+'</h3><p class="headline-text" style="line-height: 1.42857143; font-family: Gotham-Book; color: #444; font-size: 20px; margin: 0 0 10px; text-align: center; display: block; -webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 0px; -webkit-margin-end: 0px; box-sizing: inherit;">Ingresa<br> a '+nombrePlaza+'.COM<br> usando Facebook</p><div class="btn-group"><div id="ifrRs"></div></div><p style="line-height: 1.42857143; font-family: Gotham-Book; font-size: 18px; color: #444; margin: 0 0 10px;">Tu privacidad es esencial</p><p class="text-muted" style="line-height: 1.42857143; color: #777; font-family: Gotham-Book; font-size: 18px; margin: 0 0 10px;">No se publicará en tu muro.<br>Tu identidad esta protegida</p><a class="anchor-aviso-privacidad" href="" style="font-size: 16px; color: #337ab7; text-decoration: none;">Aviso de privacidad</a></div></div></div><div class="container-fluid" style="padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333;"><div class="row"><div class="col-xs-12 col-sm-12 bg-norte" style="background-image: url(/libre/imgdiseno/acceso/facebook-mobile-content-'+bgImg+'.png); margin: 30px 0; padding: 15px; background-size: cover; background-position: center top;"><h3 style=" color: #fff; font-family: Gotham-Book; text-align: center; font-size: 24px; margin-top: 20px; margin-bottom: 10px;">Al conectarte con Facebook tu suscripción te da más: <br><br><b>Más usuarios<br>Más dispositivos</b></h3></div></div></div></section></div></div><a title="Close" class="fancybox-item fancybox-close" onclick="grFunc.cierraLgInFB();"></a></div></div> <div class="fancybox-overlay fancybox-overlay-fixed" style="width: auto; height: auto; display: none; z-index: 999999;" id="fndModal" ></div>';
276				// btnFB = true;
277				// strDivs = '<div id="alerta_usuario_basico" class="navbar-fixed-bottom" style="padding:5px; background:rgba(0,0,0,0.75); -webkit-box-shadow: 0px 0px 96px -7px rgba(0,0,0,0.75); -moz-box-shadow: 0px 0px 96px -7px rgba(0,0,0,0.75); box-shadow: 0px 0px 96px -7px rgba(0,0,0,0.75);"><div class=" container container960 text-center"><div class="row" style="margin-bottom:10px;"><div class="col-sm-6" style="padding:15px;"><div style="background:#FFFF00; border-radius:5px; padding:10px;"><h5 class="text-primary">Podrás navegar lo que resta del día.</h5><div class="text-small text-center"><a href="#usuario_suscriptor" class="fancybox" style="color:#fff;"><div class="btnn btn-default">Vincular cuenta</div></a></div></div></div>
277<a href="../planes/planes.html" style="float: left;"><div class="col-sm-6" style="padding:15px; width: 100%;"><div style="background:#FFFF00; border-radius:5px; padding:10px;"><h5 class="text-primary">O SUSCRÍBETE CON ACCESO TOTAL<i class="fa fa-chevron-right" aria-hidden="true"></i></h5></div></div></a></div></div></div>';
278				strDivs = '<div class="pleca-btn-vincular" style="z-index: 999; background: rgba(0,0,0,0.9); position: fixed; bottom: 0; width: 100%; padding: 5px 0; display: block; box-sizing: inherit; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box;"><div class="container-fluid" style="padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; box-sizing: inherit;"><div class="row text-center"><div class=" col-xs-12 col-sm-12 col-md-12"> <p style="color: #fff;font-family: &quot;Gotham-Book&quot;;font-size: 18px;display: block;-webkit-margin-before: 1em;-webkit-margin-after: 1em;-webkit-margin-start: 0px;-webkit-margin-end: 0px;line-height: 1.42857143;">Podrás navegar lo que resta del día.</p> </div><div class="col-xs-12 col-sm-6 col-md-6"><a class="btn btn-info" onclick="grFunc.AbrirPagina(\'fancybox\',\'libre/acceso/logonfb.asp?token_for_business=' + csusc + '\'); return false;" style="font-family: Gotham-Book;background-color: #ffff00; color: #0166ff; border: none; margin: 10px 0; display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px;">ASOCIAR CUENTA <i class="fa fa-chevron-right" aria-hidden="true"></i></a></div> <div class="col-xs-12 col-sm-6 col-md-6"><a class="btn btn-info" href="https://secure.gruporeforma.com/' + nombrePlaza + '/suscribete/?utm_campaign=include_suscripciones_en_portada_' + nombrePlaza + '&utm_source=categorias&utm_medium=digital" style="font-family: Gotham-Book;background-color: #ffff00; color: #0166ff; border: none; margin: 10px 0; display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px;">O SUSCRÍBETE CON ACCESO TOTAL <i class="fa fa-chevron-right" aria-hidden="true"></i></a></div></div></div></div>';
279			}
280			//CintaDíasAcceso
281			else if (tipoCinta == '2') {
282				strDivs = '<div id="alerta_usuario_basico" class="navbar-fixed-bottom" style="padding:5px; background:rgba(0,0,0,0.75); -webkit-box-shadow: 0px 0px 96px -7px rgba(0,0,0,0.75); -moz-box-shadow: 0px 0px 96px -7px rgba(0,0,0,0.75); box-shadow: 0px 0px 96px -7px rgba(0,0,0,0.75);"><div class=" container container960 text-center"><a href="../planes/planes.html"><div class="row" style="background:#FFFF00; margin-bottom:10px; border-radius:10px;"><div class="col-sm-6"><h5 class="text-primary">Quedan 5 días de acceso</h5></div><div class="col-sm-6"><h5 class="text-primary">SUSCRÍBETE CON ACCESO TOTAL<i class="fa fa-chevron-right" aria-hidden="true"></i></h5></div></div></a><div class="text-small text-center"><a href="#usuario_suscriptor" class="fancybox" style="color:#fff;"><div class="btnn btn-default">Ya soy suscriptor</div></a></div></div></div>';
283			}
284
285			document.head.appendChild(style);
286			document.head.appendChild(style2);
287			document.head.appendChild(style3);
288
289			document.head.appendChild(style4);
290			document.head.appendChild(style5);
291			document.head.appendChild(style6);
292			document.head.appendChild(style7);
293			document.head.appendChild(style8);
294
295			$("body").append(strDivs);
296
297			if (btnFB)
298				document.getElementById("ifrRs").innerHTML = "<iframe scrolling='no' frameborder='0' border='0' width='315' height='37' src='/libre/acceso/Facebook/accesoFacebook.html?autLogIn=false&Origen=1&cinta=1' />";
299		});
300}
301
302GRFunc.prototype.cierraCinta = function() {
303	$('#adFltn').addClass('cerrado');
304	$('#adFltn').css('width', 'auto');
305	$('#adFltn').css('right', '0px');
306	document.getElementById('txtAd').innerHTML = '<p style="text-align: left; margin-left: 30px; margin-bottom: 0; z-index: 10; cursor: pointer" onclick="grFunc.abreLgInFB();"> <a style="color: white;">Regístrate con Facebook</a>	</p>'
307}
308
309GRFunc.prototype.abreLgInFB = function() {
310	document.getElementById('modalFB').style.display = 'block';
311	document.getElementById('fndModal').style.display = 'block';
312}
313
314GRFunc.prototype.cierraLgInFB = function() {
315	document.getElementById('modalFB').style.display = 'none';
316	document.getElementById('fndModal').style.display = 'none';
317}
318
319GRFunc.prototype.EsCrossDomain = function() {
320	return document.location.href.indexOf(this.NuestroHost) == -1;
321}
322
323GRFunc.prototype.MultiMediaConfigBuscador = function(idproducto) {
324    if (idproducto == 2) {
325    this.MMConfig = { xmlMedia: this.grConfig.Protocol + '//busquedas.elnorte.com/grplayer/libre/players/media_' + idproducto + '.xml', xmlListaMedia: this.grConfig.Protocol + '//busquedas.elnorte.com/grplayer/libre/players/listamedia_' + idproducto + '.xml', gr: '', ak: '', lm: [], ok: false };
326    }
327    else if (idproducto == 3) {
328    this.MMConfig = { xmlMedia: this.grConfig.Protocol + '//busquedas.reforma.com/grplayer/libre/players/media_' + idproducto + '.xml', xmlListaMedia: this.grConfig.Protocol + '//busquedas.reforma.com/grplayer/libre/players/listamedia_' + idproducto + '.xml', gr: '', ak: '', lm: [], ok: false };
329    }
330    else if (idproducto == 5) {
331    this.MMConfig = { xmlMedia: this.grConfig.Protocol + '//busquedas.mural.com.mx/grplayer/libre/players/media_' + idproducto + '.xml', xmlListaMedia: this.grConfig.Protocol + '//busquedas.mural.com.mx/grplayer/libre/players/listamedia_' + idproducto + '.xml', gr: '', ak: '', lm: [], ok: false };
332    }
333    else{
334    this.MMConfig = { xmlMedia: this.grConfig.Protocol + '//busquedas.reforma.com/grplayer/libre/players/media_' + idproducto + '.xml', xmlListaMedia: this.grConfig.Protocol + '//busquedas.reforma.com/grplayer/libre/players/listamedia_' + idproducto + '.xml', gr: '', ak: '', lm: [], ok: false };
335    }
336	
337	function ajaxMM(url, config, tipoXML) {
338		var oRequest = (window.XMLHttpRequest ? new window.XMLHttpRequest() : new window.ActiveXObject('Microsoft.XMLHTTP'));
339		oRequest.onreadystatechange = function() {
340			var t;
341			if (this.readyState == 4 && this.status == 200) {
342				if (tipoXML == 1 && this.responseXML != null) {
343					t = this.responseXML.getElementsByTagName("DomainStage");
344					config.st = t[0].childNodes[0].nodeValue;
345					t = this.responseXML.getElementsByTagName("DomainGReforma");
346					config.gr = t[0].childNodes[0].nodeValue;
347					t = this.responseXML.getElementsByTagName("DomainAkamai");
348					config.ak = t[0].childNodes[0].nodeValue;
349					config.ok = false;
350					ajaxMM(config.xmlListaMedia, config, 2);
351				} else if (tipoXML == 2 && this.responseXML != null) {
352					t = this.responseXML.getElementsByTagName("Id");
353					if (t != null) {
354						if (t.length > 0) {
355							for (var node = 0; node < t.length; node++) {
356								if (t[node].childNodes.length > 0) { if (t[node].childNodes[0].nodeValue != "") { config.lm.push(t[node].childNodes[0].nodeValue); }; }
357							};
358						};
359					};
360					config.ok = true;
361				}
362			}
363		};
364		try {
365			oRequest.open('GET', url, true);
366			oRequest.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
367			oRequest.setRequestHeader('Accept', 'text/xml');
368			//oRequest.setRequestHeader('Accept-Charset', 'utf-8');
369			oRequest.send(null);
370		} catch (ex) { }
371	}
372	ajaxMM(this.MMConfig.xmlMedia, this.MMConfig, 1);
373}
374
375GRFunc.prototype.MultiMediaConfig = function() {
376
377	this.MMConfig = { xmlMedia: this.NuestroHost + 'libre/players/media.xml', xmlListaMedia: this.NuestroHost + 'libre/players/listamedia.xml', gr: '', ak: '', lm: [], ok: false };
378	function ajaxMM(url, config, tipoXML) {
379		var oRequest = (window.XMLHttpRequest ? new window.XMLHttpRequest() : new window.ActiveXObject('Microsoft.XMLHTTP'));
380		oRequest.onreadystatechange = function() {
381			var t;
382			if (this.readyState == 4 && this.status == 200) {
383				if (tipoXML == 1 && this.responseXML != null) {
384					t = this.responseXML.getElementsByTagName("DomainStage");
385					config.st = t[0].childNodes[0].nodeValue;
386					t = this.responseXML.getElementsByTagName("DomainGReforma");
387					config.gr = t[0].childNodes[0].nodeValue;
388					t = this.responseXML.getElementsByTagName("DomainAkamai");
389					config.ak = t[0].childNodes[0].nodeValue;
390					config.ok = false;
391					ajaxMM(config.xmlListaMedia, config, 2);
392				} else if (tipoXML == 2 && this.responseXML != null) {
393					t = this.responseXML.getElementsByTagName("Id");
394					if (t != null) {
395						if (t.length > 0) {
396							for (var node = 0; node < t.length; node++) {
397								if (t[node].childNodes.length > 0) { if (t[node].childNodes[0].nodeValue != "") { config.lm.push(t[node].childNodes[0].nodeValue); }; }
398							};
399						};
400					};
401					config.ok = true;
402				}
403			}
404		};
405		try {
406			oRequest.open('GET', url, true);
407			oRequest.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
408			oRequest.setRequestHeader('Accept', 'text/xml');
409			//oRequest.setRequestHeader('Accept-Charset', 'utf-8');
410			oRequest.send(null);
411		} catch (ex) { }
412	}
413	ajaxMM(this.MMConfig.xmlMedia, this.MMConfig, 1);
414}
415
416GRFunc.prototype.getMultimediaConDominio = function(mmConfig, multiMedia) {
417	var urlMM = new String(multiMedia.PathMedio);
418	if (multiMedia.IdFuente == 2) urlMM = urlMM.replace(/flv\/100/gi, "mp4");
419	urlMM = urlMM.replace(/\.flv/gi, ".mp4");
420	var ak = false;
421	if (multiMedia.IdFuente == 2) {
422		var auxDominio = this.grConfig.Protocol + "//flash.reforma.com/flash/";
423		urlMM = auxDominio + urlMM;
424	} else {
425		if (mmConfig.lm.length > 0) {
426			for (i = 0; i < mmConfig.lm.length; i++) {
427				ak = (i == 0 && mmConfig.lm[i] == "*");
428				if (ak) { break; }
429				ak = (parseInt(mmConfig.lm[i], 10) == parseInt(multiMedia.IdElementoSubcategoria, 10));
430				if (ak) { break; }
431			}
432		}
433		if (mmConfig.ak != '' && mmConfig.gr != '' && mmConfig.st != '') {
434			if (urlMM.indexOf('http') == -1) {
435				var dominioFinal = (multiMedia.MultimediaEstatus == 1 ? mmConfig.st : (ak ? mmConfig.ak : mmConfig.gr));
436				if (urlMM.split("/")[0] == "online") {
437					urlMM = dominioFinal + urlMM;
438				}
439				else {
440					var arrDominio = dominioFinal.split("/");
441					var urlAux = "";
442					for (var i = 0; i < (arrDominio.length - 2); i++) {
443						urlAux = urlAux + arrDominio[i] + "/";
444					}
445					urlMM = urlAux + urlMM;
446				}
447			}
448		}
449	}
450	return urlMM;
451}
452
453GRFunc.prototype.setHTML5Multimedia = function(multiMedia) {
454	var strV = "";
455	var isIframe = false;
456	try {
457		isIframe = window.self !== window.top
458	}
459	catch (e) {
460		isIframe = true;
461	}
462	if (multiMedia.PathMedio.indexOf(".mp3") != -1) {
463		strV = "<div>";
464		if (isIframe) {
465			strV += "<img src='" + multiMedia.auxFotoCropPlayer + "' style='position:absolute; width:100%; height:100%' />";
466		}
467		strV += "<audio id='" + multiMedia.Ancho + "x" + multiMedia.Alto + "' autoplay controls class='audio-podcast'>";
468		strV += "<source src='" + multiMedia.PathMedio + "' type='audio/mpeg'>"
469		strV += "</audio>"
470		strV += "</div>"
471	}
472	else {
473		strV = "<video id='" + multiMedia.Ancho + "x" + multiMedia.Alto + "' name='" + multiMedia.Ancho + "x" + multiMedia.Alto + "' width='100%' height='100%' preload='none' autoplay controls='controls' poster='" + multiMedia.auxFotoCropPlayer + "'>";
474		strV += "<source src='" + multiMedia.PathMedio + "' />";
475		strV += "</video>";
476	}
477	return strV;
478}
479
480GRFunc.prototype.setFlashMultimedia = function(multiMedia, firstTime) {
481	//console.log(multiMedia.PathMedio);
482	var FlashVars = "Origen=" + this.NuestroHost + "&Id=" + multiMedia.IdElementoSubcategoria + "&Media=" + multiMedia.PathMedio + "&Imagen=" + multiMedia.auxFotoCropPlayer + "&Stage=" + multiMedia.MultimediaEstatus;
483	var strO = "<object width='" + multiMedia.Ancho + "' height='" + multiMedia.Alto + "'>";
484	strO += "<param name='codebase' value='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' />";
485	strO += "<param name='classid' value='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' />";
486	strO += "<param name='width' value='" + multiMedia.Ancho + "' />";
487	strO += "<param name='height' value='" + multiMedia.Alto + "' />";
488	strO += "<param name='id' value='" + multiMedia.Ancho + "x" + multiMedia.Alto + "' />";
489	strO += "<param name='movie' value='" + this.NuestroHost + "libre/players/" + multiMedia.Ancho + "x" + multiMedia.Alto + "s.swf' />";
490	strO += "<param name='FlashVars' value='" + FlashVars + "' />";
491	strO += "<param name='wmode' value='transparent' />";
492	strO += "<param name='quality' value='high' />";
493	strO += "<param name='align' value='middle' />";
494	strO += "<param name='bgcolor' value='#000000' />";
495	strO += "<param name='allowFullScreen' value='true' />";
496	strO += "<param name='allowScriptAccess' value='always' />";
497	strO += "<embed pluginspage='" + this.grConfig.Protocol + "//www.macromedia.com/go/getflashplayer' ";
498	strO += "type='application/x-shockwave-flash'";
499	strO += "width='" + multiMedia.Ancho + "' ";
500	strO += "height='" + multiMedia.Alto + "' ";
501	strO += "name='" + multiMedia.Ancho + "x" + multiMedia.Alto + "' ";
502	strO += "src='" + this.NuestroHost + "libre/players/" + multiMedia.Ancho + "x" + multiMedia.Alto + "s.swf' ";
503	strO += "flashvars='" + FlashVars + "' ";
504	strO += "wmode='transparent' ";
505	strO += "quality='high' ";
506	strO += "align='middle' ";
507	strO += "bgcolor='#000000' ";
508	strO += "allowfullscreen='true' ";
509	strO += "allowscriptaccess='always' ";
510	strO += "/></object>";
511	return this.replaceTextosObject(firstTime, strO);
512}
513
514GRFunc.prototype.replaceTextosObject = function(firsttime, textObject) {
515	returnstring = "";
516	if ((this.NuestroHost.indexOf('.com') != -1) || (textObject.indexOf('//www.youtube.com/') != -1)) {
517		returnstring = textObject;
518	} else {
519		returnstring = textObject;
520	}
521	if (!firsttime && (textObject.indexOf('//www.youtube.com/') == -1)) { returnstring = returnstring.replace(/PlayMedia=0/g, 'PlayMedia=1'); }
522	return returnstring;
523}
524
525GRFunc.prototype.EscribeMultiMedia = function(firstTime, medioScreen, grFunciones, multiMedia) {
526	var html5 = false;
527	//se valida si es movil para usar html 5    
528	(function(a) { if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|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|xda|xiino/i.test(a) || /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 )|
528sy(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|ipad|android 3.0|xoom|sch-i800|playbook|tablet|kindle|nexus|gt-p1000|sgh-t849|shw-m180s|a510|a511|a100|dell streak|silk|zte\-/i.test(a.substr(0, 4))) html5 = true })(navigator.userAgent || navigator.vendor || window.opera)
529	var strMM;
530	var timeout = setTimeout(function() {
531		if (grFunciones.MMConfig.ok) {
532			clearTimeout(timeout);
533			if (multiMedia.auxFotoCropPlayer != '') { multiMedia.auxFotoCropPlayer = (multiMedia.auxFotoCropPlayer.indexOf('http') > -1 ? '' : URLImagenes) + multiMedia.auxFotoCropPlayer; };
534			multiMedia.PathMedio = grFunciones.getMultimediaConDominio(grFunciones.MMConfig, multiMedia);
535			if (html5) {
536				strMM = grFunciones.setHTML5Multimedia(multiMedia);
537			} else {
538				strMM = grFunciones.setFlashMultimedia(multiMedia, firstTime);
539			};
540			//alert(strMM);
541			document.getElementById(medioScreen).innerHTML = strMM;
542		} else {
543			grFunciones.EscribeMultiMedia(firstTime, medioScreen, grFunciones, multiMedia);
544		};
545	}, 100);
546}
547//Player.aspx
548GRFunc.prototype.EscribeMultiMedia2 = function(firstTime, medioScreen, grFunciones, multiMedia, compartirSocial) {
549	if (multiMedia == null) { return; }
550	var html5 = false;
551	//se valida si es movil para usar html 5    
552	//(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|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|xda|xiino/i.test(a)||/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(a.substr(0,4)))html5 = true})(navigator.userAgent||navigator.vendor||window.opera)            
553	if (getIEVersion() != "8")
554		html5 = true;
555	var strMM;
556	var timeout = setTimeout(function() {
557		if (grFunciones.MMConfig.ok) {
558			clearTimeout(timeout);
559			if (multiMedia.auxFotoCropPlayer != '') { multiMedia.auxFotoCropPlayer = (multiMedia.auxFotoCropPlayer.indexOf('http') > -1 ? '' : URLImagenes) + multiMedia.auxFotoCropPlayer; };
560			multiMedia.PathMedio = grFunciones.getMultimediaConDominio(grFunciones.MMConfig, multiMedia);
561			if (html5) {
562				strMM = grFunciones.setHTML5Multimedia(multiMedia);
563			} else {
564				strMM = grFunciones.setFlashMultimedia2(multiMedia, firstTime);
565			};
566			document.getElementById(medioScreen).innerHTML = strMM + (medioScreen.indexOf("divHtmlVideo") > -1 ? compartirSocial : "");
567			if (medioScreen.indexOf("divHtmlVideo") > -1) {
568				var videoId = multiMedia.Ancho + "x" + multiMedia.Alto;
569				var isIframe = false;
570				try { isIframe = window.self !== window.top } catch (e) { isIframe = true; }
571				document.getElementById(videoId).addEventListener('ended', termina, false);
572				document.getElementById(videoId).addEventListener('play', hideDiscover, false);
573				document.getElementById(videoId).volume = cargaVolumen();
574				if (multiMedia.PathMedio.indexOf(".mp3") > -1 && isIframe) {
575					$(".gmultimedia1").hide();
576				}
577			}
578		} else {
579			grFunciones.EscribeMultiMedia2(firstTime, medioScreen, grFunciones, multiMedia, compartirSocial);
580		};
581	}, 100);
582}
583//Player.aspx
584GRFunc.prototype.setFlashMultimedia2 = function(multiMedia, firstTime) {
585
586	//var intAncho = 640;
587	//var intAlto = 360;
588
589	//alert(multiMedia.Ancho);
590	//alert(multiMedia.Alto);
591
592	var intAncho = multiMedia.Ancho;
593	var intAlto = multiMedia.Alto;
594
595	var FlashVars = "Origen=" + this.NuestroHost + "&Id=" + multiMedia.IdElementoSubcategoria + "&Media=" + multiMedia.PathMedio + "&Imagen=" + multiMedia.auxFotoCropPlayer + "&Stage=" + multiMedia.MultimediaEstatus;
596	var strO = "<object width='" + intAncho + "' height='" + intAlto + "'>";
597	strO += "<param name='codebase' value='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' />";
598	strO += "<param name='classid' value='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' />";
599	strO += "<param name='width' value='" + intAncho + "' />";
600	strO += "<param name='height' value='" + intAlto + "' />";
601	strO += "<param name='id' value='" + intAncho + "x" + intAlto + "' />";
602	strO += "<param name='movie' value='" + this.NuestroHost + "libre/players/" + intAncho + "x" + intAlto + "s.swf' />";
603	strO += "<param name='FlashVars' value='" + FlashVars + "' />";
604	strO += "<param name='wmode' value='transparent' />";
605	strO += "<param name='quality' value='high' />";
606	strO += "<param name='align' value='middle' />";
607	strO += "<param name='bgcolor' value='#000000' />";
608	strO += "<param name='allowFullScreen' value='true' />";
609	strO += "<param name='allowScriptAccess' value='always' />";
610	strO += "<embed pluginspage='" + this.grConfig.Protocol + "//www.macromedia.com/go/getflashplayer' ";
611	strO += "type='application/x-shockwave-flash'";
612	strO += "width='" + intAncho + "' ";
613	strO += "height='" + intAlto + "' ";
614	strO += "name='" + intAncho + "x" + intAlto + "' ";
615	strO += "src='" + this.NuestroHost + "libre/players/" + intAncho + "x" + intAlto + "s.swf' ";
616	strO += "flashvars='" + FlashVars + "' ";
617	strO += "wmode='transparent' ";
618	strO += "quality='high' ";
619	strO += "align='middle' ";
620	strO += "bgcolor='#000000' ";
621	strO += "allowfullscreen='true' ";
622	strO += "allowscriptaccess='always' ";
623	strO += "/></object>";
624
625	//alert(strO);
626
627	return this.replaceTextosObject(firstTime, strO);
628}
629
630GRFunc.prototype.BrowserVersion = function() {
631	var _version = 11;
632	if (navigator.userAgent.indexOf('Mozilla/3') != -1) {
633		_version = 10;
634	}
635	return _version;
636}
637
638GRFunc.prototype.WriteBase = function(urlBase) {
639	document.write("<base href='" + this.NuestroHost + "'>");
640}
641
642GRFunc.prototype.ObscurecePagina = function() {
643	$('#obscurecePagina').css({ display: "block" });
644
645	var body = document.body;
646	var html = document.documentElement;
647	var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.offsetHeight);
648	var width = $(window).width();
649	$('#obscurecePagina').css({ width: width + "px" });
650	$('#obscurecePagina').css({ height: height + "px" });
651
652}
653
654GRFunc.prototype.ObscurecePaginaResize = function() {
655	if (window.location.href.indexOf("cobertura") == -1) {
656		$('#obscurecePagina').css({ display: "block" });
657
658		var body = document.body;
659		var html = document.documentElement;
660		var heightModal = (document.getElementById("iModal") ? $("#iModal").contents().height() + 100 : 0);
661
662		var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.offsetHeight, heightModal);
663		var width = $(window).width();
664		$('#obscurecePagina').css({ width: width + "px" });
665		$('#obscurecePagina').css({ height: height + "px" });
666	}
667
668}
669
670GRFunc.prototype.CerrarZoom = function() {
671	if ($("#zoomPiePagina").length > 0) {
672		$('#zoomPiePagina').remove();
673	}
674	if ($("#zoomCerrar").length > 0) {
675		$('#zoomCerrar').remove();
676	}
677	$("body").css("overflow", "visible");
678}
679
680GRFunc.prototype.CerrarGaleria = function() {
681
682	GRFunc.prototype.CerrarZoom();
683	if ($("#iframeGalerias").length > 0) {
684		$('#iframeGalerias').remove();
685		$('#obscurecePagina').remove();
686
687	}
688
689	if ($("#zoomPiePaginaAux").length > 0) {
690		$('#zoomPiePaginaAux').remove();
691		$('#zoomPiePagina').remove();
692
693	}
694
695
696}
697
698//Abre pagina SE AGREGA EL PARAMETRO SCROLL 2019 05 29
699GRFunc.prototype.AbrirPagina = function(tipo, urlPagina, ancho, alto, resize, scroll) {
700	var _resize = (typeof resize !== 'undefined') ? resize : false;
701	var _scroll = (typeof scroll !== 'undefined') ? scroll : false;
702
703	var descripcionPlaza = "";
704	if (this.NuestroHost.indexOf("mural") > -1) { descripcionPlaza = "mural"; }
705	else if (this.NuestroHost.indexOf("elnorte") > -1) { descripcionPlaza = "elnorte"; }
706	else if (this.NuestroHost.indexOf("reforma") > -1) { descripcionPlaza = "reforma"; }
707
708	var urlPaginaPlaza = "";
709	if (urlPagina.indexOf("mural.com") > -1) { urlPaginaPlaza = "mural"; }
710	else if (urlPagina.indexOf("elnorte.com") > -1) { urlPaginaPlaza = "elnorte"; }
711	else if (urlPagina.indexOf("reforma.com") > -1) { urlPaginaPlaza = "reforma"; }
712
713	if (urlPagina.indexOf("/gruporeforma.") > -1 && urlPaginaPlaza != "" && descripcionPlaza != "" && urlPaginaPlaza != descripcionPlaza)
714	{ urlPagina = urlPagina.replace(urlPaginaPlaza + ".com", descripcionPlaza + ".com" + this.grConfig.TLD); }
715
716	//if (urlPagina.indexOf("/ojociudadano/") <= 0)
717	//{ urlPagina = urlPagina.toLowerCase(); }
718
719	if (!(urlPagina.indexOf("http") == 0)) { urlPagina = this.NuestroHost + urlPagina; }
720
721	if (/^http:\/\/(www|gruporeforma|img).(elnorte|reforma|mural|canch
721a|gruporeforma).com/.test(urlPagina)) {
722		urlPagina = urlPagina.replace(/^http:/, this.grConfig.Protocol);
723	}
724
725	var vAncho = (ancho != null) ? ancho : 800;
726	var vAlto = (alto != null) ? alto : 400;
727
728	// Valida que las aplicaciones que se abren como modal hagan lo propio cuando las lanzan de una FotoNota
729	if ((/[\.\/](elnorte|reforma|mural)[\.\/]/i).test(urlPagina) && urlPagina.indexOf("/escuchalo") == -1) {
730		if ((/\.com\/(aplicaciones|aplicacioneslibre)\/(articulo|editoriales|fotogaleria|galeriamultimedia|sondeo)/i).test(urlPagina) || (/\.com\/[a-z0-9-]+(\/gr)*\/(ar|op|ca|fg|vg)\d+?/i).test(urlPagina)) {
731			if (urlPagina.indexOf(grFunc.NuestroHost) > -1 && typeof resize === 'undefined') {
732				vAlto = 0;
733				vAncho = 0;
734				_resize = true;
735			}
736			else {
737				//tipo='tab';
738				if (urlPagina.indexOf("&pc=") == -1 && urlPagina.indexOf("?pc=") == -1) {
739					if (urlPagina.indexOf("?") == -1) {
740						urlPagina = urlPagina + "?pc=" + this.IdPlaza;
741					}
742					else {
743						urlPagina = urlPagina + "&pc=" + this.IdPlaza;
744					}
745				}
746			}
747		}
748	}
749	if (typeof (urlPagina) !== 'undefined' || urlPagina != '') {
750		if (tipo == 'normal') {
751			if (urlPagina.toString().indexOf(".cancha") > -1) {
752				if (urlPagina.toString().toLowerCase().indexOf("fotogaleria") > -1 || urlPagina.toString().toLowerCase().indexOf("galeriamultimedia") > -1) {
753					var defaultPlaza = "";
754					if (this.NuestroHost.indexOf("mural") > -1) {
755						defaultPlaza = "defaultm"
756					}
757					else if (this.NuestroHost.indexOf("reforma") > -1) {
758						defaultPlaza = "defaultr"
759					}
760					else {
761						defaultPlaza = "defaultn"
762					}
763					urlPagina = this.grConfig.Protocol + "//www.cancha.com/" + defaultPlaza + ".htm?urlembed=" + urlPagina + "&preferrer=" + encodeURIComponent(window.location.href);
764				}
765				else {
766					if (urlPagina.indexOf("articulo/default.aspx?id=") > -1) {
767						urlPagina = urlPagina.replace("cancha", descripcionPlaza);
768						if (urlPagina.indexOf("&.html#comart") > -1) {
769							var agregacomentario = urlPagina.indexOf("&.html#comart");
770							urlPagina = urlPagina.substr(0, agregacomentario) + "&po=1&.html#comart";
771						}
772						else {
773							urlPagina = urlPagina + "&po=1";
774						}
775					}
776				}
777			}
778			else if (urlPagina.toString().indexOf(".negocios") > -1) {
779				if (urlPagina.indexOf("articulo/default.aspx?id=") > -1) {
780					var plazaCom = "";
781					if (this.NuestroHost.indexOf("mural") > -1) {
782						plazaCom = ".mural";
783					}
784					else if (this.NuestroHost.indexOf("elnorte") > -1) {
785						plazaCom = ".elnorte";
786					}
787					else if (this.NuestroHost.indexOf("reforma") > -1) {
788						plazaCom = ".reforma";
789					}
790					urlPagina = urlPagina.replace(".negociosreforma", plazaCom);
791					urlPagina = urlPagina.replace(".negocioselnorte", plazaCom);
792					urlPagina = urlPagina.replace(".negociosmural", plazaCom);
793					if (urlPagina.indexOf("&.html#comart") > -1) {
794						var agregacomentario = urlPagina.indexOf("&.html#comart");
795						urlPagina = urlPagina.substr(0, agregacomentario) + "&po=4&.html#comart";
796					}
797					else {
798						urlPagina = urlPagina + "&po=4";
799					}
800				}
801				else {
802					var descripcionPlaza = "";
803					if (this.NuestroHost.indexOf("mural") > -1) {
804						descripcionPlaza = ".negociosmural"
805					}
806					else if (this.NuestroHost.indexOf("elnorte") > -1) {
807						descripcionPlaza = ".negocioselnorte"
808					}
809					else if (this.NuestroHost.indexOf("reforma") > -1) {
810						descripcionPlaza = ".negociosreforma"
811					}
812					if (descripcionPlaza != "") {
813						if (urlPagina.toString().indexOf(descripcionPlaza) < 0) {
814							if (urlPagina.indexOf("mural.") > -1) {
815								urlPagina = urlPagina.replace(".negociosmural", descripcionPlaza);
816							}
817							else if (urlPagina.indexOf("elnorte.") > -1) {
818								urlPagina = urlPagina.replace(".negocioselnorte", descripcionPlaza);
819							}
820							else if (urlPagina.indexOf("reforma.") > -1) {
821								urlPagina = urlPagina.replace(".negociosreforma", descripcionPlaza);
822							}
823						}
824					}
825				}
826			}
827			var isIE = false;
828			var ua = navigator.userAgent;
829			var re = new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})");
830			if (ua.indexOf('MSIE ') != -1 || re.exec(ua) != null) { isIE = true; }
831			if (isIE) {
832				var targetWndName = "_parent";
833				if (this.EsStage) {
834					targetWndName = "_self";
835				}
836				var wnd = window.open("", targetWndName);
837				var link = document.createElement('a');
838				link.href = urlPagina;
839				document.body.appendChild(link);
840				link.target = targetWndName;
841				link.href = urlPagina;
842				link.click();
843			}
844			else {
845				if (this.EsStage) {
846					window.open(urlPagina, '_self');
847				}
848				else {
849					window.open(urlPagina, '_parent');
850				}
851			}
852		}
853		else if (tipo == 'tab') {
854			if (urlPagina.toString().indexOf("cancha") > -1 || urlPagina.toString().indexOf("negocios") > -1) {
855				if (urlPagina.toString().indexOf("fotogaleria") > -1 || urlPagina.toString().indexOf("galeriamultimedia") > -1) {
856					var defaultPlaza = "";
857					if (this.NuestroHost.indexOf("mural") > -1) {
858						defaultPlaza = "defaultm"
859					}
860					else if (this.NuestroHost.indexOf("reforma") > -1) {
861						defaultPlaza = "defaultr"
862					}
863					else {
864						defaultPlaza = "defaultn"
865					}
866					if (urlPagina.toString().indexOf("cancha") > -1) {
867						urlPagina = this.grConfig.Protocol + "//www.cancha.com/" + defaultPlaza + ".htm?urlembed=" + urlPagina + encodeURIComponent("&preferrer=" + window.location.href);
868					}
869				}
870			}
871			else if (urlPagina.toString().indexOf(".negocios") > -1) {
872				if (urlPagina.indexOf("articulo/default.aspx?id=") > -1) {
873					var plazaCom = "";
874					if (this.NuestroHost.indexOf("mural") > -1) {
875						plazaCom = ".mural";
876					}
877					else if (this.NuestroHost.indexOf("elnorte") > -1) {
878						plazaCom = ".elnorte";
879					}
880					else if (this.NuestroHost.indexOf("reforma") > -1) {
881						plazaCom = ".reforma";
882					}
883					urlPagina = urlPagina.replace(".negociosreforma", plazaCom);
884					urlPagina = urlPagina.replace(".negocioselnorte", plazaCom);
885					urlPagina = urlPagina.replace(".negociosmural", plazaCom);
886					if (urlPagina.indexOf("&.html#comart") > -1) {
887						var agregacomentario = urlPagina.indexOf("&.html#comart");
888						urlPagina = urlPagina.substr(0, agregacomentario) + "&po=4&.html#comart";
889					}
890					else {
891						urlPagina = urlPagina + "&po=4";
892					}
893				}
894				else {
895					var descripcionPlaza = "";
896					if (this.NuestroHost.indexOf("mural") > -1) {
897						descripcionPlaza = ".negociosmural"
898					}
899					else if (this.NuestroHost.indexOf("elnorte") > -1) {
900						descripcionPlaza = ".negocioselnorte"
901					}
902					else if (this.NuestroHost.indexOf("reforma") > -1) {
903						descripcionPlaza = ".negociosreforma"
904					}
905					if (descripcionPlaza != "") {
906						if (urlPagina.toString().indexOf(descripcionPlaza) < 0) {
907							if (urlPagina.indexOf("mural.") > -1) {
908								urlPagina = urlPagina.replace(".negociosmural", descripcionPlaza);
909							}
910							else if (urlPagina.indexOf("elnorte.") > -1) {
911								urlPagina = urlPagina.replace(".negocioselnorte", descripcionPlaza);
912							}
913							else if (urlPagina.indexOf("reforma.") > -1) {
914								urlPagina = urlPagina.replace(".negociosreforma", descripcionPlaza);
915							}
916						}
917					}
918				}
919			}
920			window.open(urlPagina, '_blank');
921		}
922		else if (tipo == "modal") {
923			var construir = "";
924			var strScroll = "";
925			var cerrarOffset = 40;
926			if ((/\.com\/(aplicaciones|aplicacioneslibre)\/fotogaleria/i).test(urlPagina) || (/\.com\/[a-z0-9-]+(\/gr)*\/fg\d+?/i).test(urlPagina)) {
927				construir += "<iframe id='iModal' name='iModal' onload=\"grFunc.AjustarIframeJQ('iModal')\" src='" + urlPagina + "' width='770' height='710' scrolling='no' frameborder='0'></iframe>";
928			} else if (urlPagina.toLowerCase().indexOf("/imagenes/630x945/", 0) > -1) {
929				cerrarOffset = 20;
930				construir += "<img border='0' alt='' width='" + (ancho * .85) + "px' height='" + (alto * .85) + "px' src='" + urlPagina + "'></img>";
931			} else if (urlPagina.toLowerCase().indexOf("/imagenes/960x640/", 0) > -1) {
932				cerrarOffset = 20;
933				construir += "<img border='0' alt='' width='" + (ancho) + "px' height='" + (alto) + "px' src='" + urlPagina + "'></img>";
934			} else {
935				vAncho = ancho != null ? ancho : this.grConfig.AnchoModal;
936				vAlto = alto != null ? alto : this.grConfig.AltoModal;
937				strScroll = "scrolling='auto'" + (_scroll ? " style='{ overflow-x:hidden; overflow-y:auto; }'" : "");
938				if (_resize)
939					construir += "<iframe id='iModal' name='iModal' height='0' onload=\"grFunc.AjustarIframeJQ('iModal')\" src='" + urlPagina + "' scrolling='no' frameborder='0'></iframe>";
940				else
941					construir += "<iframe src='" + urlPagina + "' width='" + vAncho + "' height='" + vAlto + "' " + strScroll + " frameborder='0' webkitAllowFullScreen='' mozallowfullscreen='' allowFullScreen=''></iframe>";
942			}
943			this.CerrarGaleria();
944			var divObjIframeGalerias = document.createElement('div');
945			divObjIframeGalerias.id = "iframeGalerias";
946			document.body.insertBefore(divObjIframeGalerias, document.body.firstChild)
947			var divObjObscurecePagina = document.createElement('div');
948			divObjObscurecePagina.id = "obscurecePagina";
949			divObjObscurecePagina.onclick = this.CerrarGaleria;
950			document.body.insertBefore(divObjObscurecePagina, divObjIframeGalerias)
951			if (urlPagina.toLowerCase().indexOf("/imagenes/630x945/", 0) > -1) {
952				$("#iframeGalerias").css({ position: 'absolute', zIndex: '10001', width: (vAncho * .85), height: (vAlto * .85), padding: '0px', margin: '0px' });
953				$("#iframeGalerias").html(construir);
954				var width = $(window).width();
955				$("#iframeGalerias").css({ top: 0 + "px" });
956				$("#iframeGalerias").css({ left: 0 + "px" });
957				$("#iframeGalerias").css({ marginLeft: (width / 2) - ($("#iframeGalerias").width() / 2) + "px" });
958				$("#iframeGalerias").css({ marginTop: $(window).scrollTop() + 65 + "px" });
959				$("body").css("overflow", "hidden");
960			} else {
961				//if (urlPagina.toLowerCase().indexOf("/imagenes/960x640/", 0) > -1) {
962				$("#iframeGalerias").css({ position: 'absolute', zIndex: '10001', width: vAncho, height: vAlto, padding: '0px', margin: '0px' });
963				//} else {
964				//$("#iframeGalerias").css({ position: 'absolute', zIndex: '10001', width: 'auto', height: 'auto', padding: '0px', margin: '0px' });
965				//}
966				$("#iframeGalerias").html(construir);
967				var width = $(window).width();
968				if (_resize) {
969					$('#iModal').on("load", function() {
970						$("#iframeGalerias").css({ top: 0 + "px" });
971						$("#iframeGalerias").css({ left: 0 + "px" });
972						if (window.location.href.indexOf("cobertura") > -1)
973							widthAux = 960;
974						else
975							widthAux = $("#iModal").contents().width();
976						$("#iframeGalerias").css({ marginLeft: (width / 2) - (widthAux / 2) + "px" });
977						$("#iframeGalerias").css({ marginTop: $(window).scrollTop() + 65 + "px" });
978						if (urlPagina.toLowerCase().indexOf('cartonzoom') > -1) {
979							if (navigator.userAgent.toLowerCase().indexOf('edg') != -1 || navigator.userAgent.indexOf('MSIE') != -1 || (!!window.MSInputMethodContext && !!document.documentMode)) {
980								$("#iframeGalerias").css({ marginTop: $(window).scrollTop() + 7 + "px" });
981							}
982							else {
983								$("#iframeGalerias").css({ marginTop: $(window).scrollTop() + 14 + "px" });
984							}
985						}
986						$("body").css("overflow", "hidden");
987						grFunc.ObscurecePaginaResize();
988					});
989				} else {
990					$("#iframeGalerias").css({ top: 0 + "px" });
991					$("#iframeGalerias").css({ left: 0 + "px" });
992					$("#iframeGalerias").css({ marginLeft: (width / 2) - ($("#iframeGalerias").width() / 2) + "px" });
993					$("#iframeGalerias").css({ marginTop: $(window).scrollTop() + 50 + "px" });
994					$("body").css("overflow", "hidden");
995					this.ObscurecePagina();
996				}
997			}
998			var c = document.createElement('div');
999			c.id = "zoomCerrar";
1000			c.innerHTML = "<a onclick='javascript:grFunc.CerrarGaleria();return false;'></a>";
1001			document.body.insertBefore(c, divObjIframeGalerias)
1002			c.style.cssText = "position:absolute; z-index:10002; padding:0; margin:0; top:" + parseInt(parseInt(divObjIframeGalerias.style.marginTop) - cerrarOffset) + "px; left:" + parseInt(parseInt(divObjIframeGalerias.style.marginLeft) + vAncho - cerrarOffset) + "px;";
1003			window.parent.onresize = function() {
1004				if (typeof window.parent.grFunc !== 'undefined') window.parent.grFunc.ObscurecePagina();
1005			}
1006		}
1007		else if (tipo == "fancybox") {
1008			abrirVideoFancyBox(urlPagina);
1009		}
1010		else {
1011			this.OpenWindow(urlPagina, tipo == "scroll", ancho, alto);
1012		}
1013	}
1014}
1015
1016//Abre un popup para darle Zoom a las imagenes de las apps (2019 05 31 quitar cerrar, ya lo tiene AbrirPagina en modal)
1017GRFunc.prototype.Zoom = function(tipo, urlPagina, ancho, alto, piepagina, autor, resize) {
1018
1019	var usuarioInterno = this.EsStage ? "si" : this.Get_Cookie("EdWeb_UsInt");
1020	if (!this.UsuarioLoggueado && !(usuarioInterno === "si")) return;
1021	// && urlRedirect.indexOf("/articulo/") < 0 && urlRedirect.indexOf("/cobertura/") < 0) {
1022	//window.parent.location = this.NuestroHost + "libre/acceso/accesofb.htm?if=1&conectar=true&urlredirect=" + urlRedirect;
1023
1024	var vAncho = 800;
1025	var vAlto = 400;
1026	if (ancho != null)
1027		vAncho = ancho;
1028	if (alto != null)
1029		vAlto = alto;
1030
1031	this.CerrarZoom();
1032	this.AbrirPagina(tipo, urlPagina, ancho, alto, resize);
1033
1034	var body = document.body;
1035	var html = document.documentElement;
1036
1037	//Creamos Div para el pie de pagina
1038	var divPiePaginaZoom = document.createElement('div');
1039	divPiePaginaZoom.id = "zoomPiePagina";
1040	document.body.insertBefore(divPiePaginaZoom, document.body.firstChild)
1041
1042	//Creamos Div para el pie de pagina que hará el over
1043	var divPiePaginaZoomAux = document.createElement('div');
1044	divPiePaginaZoomAux.id = "zoomPiePaginaAux";
1045	document.body.insertBefore(divPiePaginaZoomAux, document.body.firstChild)
1046
1047	//Agregamos el div que hará el juego del over del pie de página
1048	$("#zoomPiePaginaAux").html("<!---->");
1049
1050	//Agregamos SPAN con pie da pagina y con autor
1051	$("#zoomPiePagina").html("<span>" + piepagina + "</span><span>" + autor + "</span>")
1052
1053	if (urlPagina.toLowerCase().indexOf("/imagenes/630x945/", 0) > -1) {
1054		vAncho = vAncho * .85;
1055		vAlto = vAlto * .85;
1056	}
1057
1058	var MarginTopIframeGalerias = parseInt($("#iframeGalerias").css("marginTop").replace("px", ""));
1059	var MarginLeftIframeGalerias = parseInt($("#iframeGalerias").css("marginLeft").replace("px", ""));
1060	var heightTop = 0;
1061
1062	// Se asignan propiedades para el div Auxiliar del pie 
1063	if (piepagina == "") {
1064		$("#zoomPiePaginaAux").css({ width: vAncho, height: '0px', padding: '0px', margin: '0px', zIndex: '0', position: 'absolute' });
1065	}
1066	else {
1067		$("#zoomPiePaginaAux").css({ width: vAncho, height: vAlto / 4, padding: '0px', margin: '0px', zIndex: '20000', position: 'absolute' });
1068	}
1069	$("#zoomPiePaginaAux").css({ top: 0 + "px" });
1070	$("#zoomPiePaginaAux").css({ left: 0 + "px" });
1071	$("#zoomPiePaginaAux").css({ marginLeft: $("#iframeGalerias").css("marginLeft") });
1072	heightTop = parseInt($("#zoomPiePagina").css("height").replace("px", ""));
1073	$("#zoomPiePaginaAux").css({ marginTop: (MarginTopIframeGalerias + vAlto - vAlto / 4) + "px" });
1074
1075	//Se asignan propiedades para el div zoomPiePagina         
1076	$("#zoomPiePagina").css({ width: vAncho, padding: '0px', margin: '0px', zIndex: '10002' });
1077	$("#zoomPiePagina").css({ top: 0 + "px" });
1078	$("#zoomPiePagina").css({ left: 0 + "px" });
1079	$("#zoomPiePagina").css({ marginLeft: $("#iframeGalerias").css("marginLeft") });
1080	heightTop = parseInt($("#zoomPiePagina").css("height").replace("px", ""));
1081	$("#zoomPiePagina").css({ marginTop: (MarginTopIframeGalerias + vAlto - heightTop) + "px" });
1082	$("#zoomPiePagina").fadeOut(3000);
1083
1084	/*
1085	//Creamos Div para boton de cerrar
1086	var divCerrarZoom = document.createElement('div');
1087	divCerrarZoom.id = "zoomCerrar";
1088	document.body.insertBefore(divCerrarZoom, document.body.firstChild)
1089	//Agregamos el boton de cerrar 
1090	$("#zoomCerrar").html("<a onclick='grFunc.CerrarGaleria()'></a>")
1091	//Se asignan propiedades para el div zoomCerrar
1092	$("#zoomCerrar").css({ padding: '0px', margin: '0px', zIndex: '10002' });
1093	$("#zoomCerrar").css({ top: 0 + "px" });
1094	$("#zoomCerrar").css({ left: 0 + "px" });
1095	$("#zoomCerrar").css({ marginLeft: (MarginLeftIframeGalerias + vAncho - 20) + "px" });
1096	$("#zoomCerrar").css({ marginTop: (MarginTopIframeGalerias - 20) + "px" });
1097	*/
1098
1099	//se asigna evento para aparecer el texto
1100	$("#zoomPiePaginaAux").on("mouseenter", function() {
1101		$("#zoomPiePagina").fadeIn(500);
1102	});
1103	$("#zoomPiePaginaAux").on("mouseleave", function() {
1104		$("#zoomPiePagina").fadeOut(500);
1105	});
1106
1107	this.ObscurecePagina();
1108
1109}
1110
1111//Abre un popup con o sin scroll
1112GRFunc.prototype.OpenWindow = function(urlPagina, scroll, ancho, alto) {
1113	var vAncho = window.screen.availWidth;
1114	var vAlto = window.screen.availHeight;
1115
1116	scroll = "scroll";
1117
1118	if (ancho != null)
1119		vAncho = ancho;
1120	if (alto != null)
1121		vAlto = alto;
1122
1123	LeftPosition = (screen.width) ? (screen.width - vAncho) / 2 : 0;
1124	TopPosition = (screen.height) ? (screen.height - vAlto) / 2 : 0;
1125	//if (urlPagina.indexOf("http:") == -1) urlPagina = this.NuestroHost + urlPagina;
1126	window.open(urlPagina, this.NumeroAleatorio, 'top=' + TopPosition + ',left=' + LeftPosition + ',width=' + vAncho + ',height=' + vAlto + ',directories=no,location=no,menubar=no,scrollbars=' + (scroll ? "yes" : "no") + ',status=no,toolbar=no,resizable=no');
1127}
1128
1129GRFunc.prototype.trim = function(str) {
1130	var str = str.replace(/^\s\s*/, ''),
1131            ws = /\s/,
1132            i = str.length;
1133	while (ws.test(str.charAt(--i)));
1134	return str.slice(0, i + 1);
1135}
1136
1137//Manejo de hora y fecha en notas de portada
1138GRFunc.prototype.HoraOFechaGeneracion = function(ArtHora, ArtFecha) {
1139	if (ArtHora != '' && ArtFecha != '') {
1140		var FechaAux = ArtFecha.split(' ');
1141		if (FechaAux.length > 2) {
1142			var ArtDia = parseInt(FechaAux[0], 10);
1143			if (isNaN(ArtDia)) { return; }
1144			var ArtMes = FechaAux[1];
1145			ArtMes = this.trim(ArtMes.toLowerCase()).substring(0, 3);
1146			var meses = { ene: 1, feb: 2, mar: 3, abr: 4, may: 5, jun: 6, jul: 7, ago: 8, sep: 9, oct: 10, nov: 11, dic: 12 };
1147			var MesAux = parseInt(meses[ArtMes], 10);
1148			if (isNaN(MesAux)) { return; }
1149			var ArtAnio = parseInt(FechaAux[2], 10);
1150			if (isNaN(ArtAnio)) { return; }
1151			var FechaHoy = new Date();
1152			var DiaHoy = FechaHoy.getDate();
1153			var MesHoy = FechaHoy.getMonth() + 1;
1154			var AnioHoy;
1155			if (navigator.appName == 'Netscape') { AnioHoy = FechaHoy.getYear() + 1900; } else { AnioHoy = FechaHoy.getYear(); }
1156			if (DiaHoy == ArtDia && MesHoy == MesAux && AnioHoy == ArtAnio)
1157				document.write(ArtHora);
1158			else
1159				document.write((ArtDia < 10 ? "0" + ArtDia : ArtDia) + "/" + (MesAux < 10 ? "0" + MesAux : MesAux) + "/" + ArtAnio);
1160		}
1161	}
1162}
1163
1164//Editar una zona en modo debug
1165GRFunc.prototype.ZonaDebug = function(IdContenedorAreaZona) {
1166	//window.parent.window.location.hash = IdContenedorAreaZona;
1167}
1168
1169//Escribir la BASE sabiendo el dominio
1170//, escribirBase: function() {
1171// document.write('<base href="'+this.stageBase()+'">');
1172//}
1173GRFunc.prototype.ValidaComentario = function(strCaracter) {
1174	//abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 áéíóúüñÑ .,¿?¡!
1175	var miCode = strCaracter.charCode ? strCaracter.charCode : strCaracter.keyCode;
1176
1177	if (miCode == 46) { return true; }  //.
1178
1179	if (this.ValidaTeclado(strCaracter) == true) { return true; }
1180
1181	if (this.ValidaNumero(strCaracter) == true) { return true; }
1182
1183	if (this.ValidaLetra(strCaracter) == true) { return true; }
1184
1185	if (this.ValidaSigno(strCaracter) == true) { return true; }
1186
1187	return false;
1188}
1189
1190GRFunc.prototype.ValidaTeclado = function(strCaracter) {
1191	var miCode = strCaracter.charCode ? strCaracter.charCode : strCaracter.keyCode;
1192
1193	if (miCode == 8) { return true; }   //Backspace
1194
1195	if (miCode == 9) { return true; }   //Tab
1196
1197	if (miCode == 13) { return true; }  //Enter
1198
1199	return false;
1200}
1201
1202GRFunc.prototype.ValidaNumero = function(strCaracter) {
1203	var miCode = strCaracter.charCode ? strCaracter.charCode : strCaracter.keyCode;
1204
1205	//Números
1206	if (miCode >= 48 && miCode <= 57) { return true; }
1207
1208	return false;
1209}
1210
1211GRFunc.prototype.ValidaLetra = function(strCaracter) {
1212	var miCode = strCaracter.charCode ? strCaracter.charCode : strCaracter.keyCode;
1213
1214	//Letras minúsculas
1215	if (miCode >= 65 && miCode <= 90) { return true; }
1216
1217	//Letras mayúsculas
1218	if (miCode >= 97 && miCode <= 122) { return true; }
1219
1220	return false;
1221}
1222
1223GRFunc.prototype.ValidaSigno = function(strCaracter) {
1224	var miCode = strCaracter.charCode ? strCaracter.charCode : strCaracter.keyCode;
1225
1226	if (miCode == 44) { return true; }  //,
1227
1228	if (miCode == 191) { return true; } //¿
1229
1230	if (miCode == 63) { return true; }  //?
1231
1232	if (miCode == 161) { return true; } //¡
1233
1234	if (miCode == 33) { return true; }  //!
1235
1236	if (miCode == 32) { return true; }  //Espacio
1237
1238	if (miCode == 225) { return true; } //á
1239
1240	if (miCode == 233) { return true; } //é
1241
1242	if (miCode == 237) { return true; } //í
1243
1244	if (miCode == 243) { return true; } //ó
1245
1246	if (miCode == 250) { return true; } //ú
1247
1248	if (miCode == 241) { return true; } //ñ
1249
1250	if (miCode == 209) { return true; } //Ñ
1251
1252	if (miCode == 252) { return true; } //ü
1253
1254	//Se agregan los siguientes caracteres "°#$%()=';:-_
1255
1256	if (miCode == 34) { return true; }  //"
1257
1258	if (miCode == 176) { return true; } //°
1259
1260	if (miCode == 35) { return true; }  //#
1261
1262	if (miCode == 36) { return true; }  //$
1263
1264	if (miCode == 37) { return true; }  //%
1265
1266	if (miCode == 40) { return true; }  //(
1267
1268	if (miCode == 41) { return true; }  //)
1269
1270	if (miCode == 61) { return true; }  //=
1271
1272	if (miCode == 39) { return true; }  //'
1273
1274	if (miCode == 59) { return true; }  //;
1275
1276	if (miCode == 58) { return true; }  //:
1277
1278	if (miCode == 45) { return true; }  //-
1279
1280	if (miCode == 95) { return true; }  //_
1281
1282	return false;
1283}
1284GRFunc.prototype.ValidaCorreo = function(strCaracter) {
1285	var miCode = strCaracter.charCode ? strCaracter.charCode : strCaracter.keyCode;
1286
1287	if (miCode == 45) { return true; }  //-
1288
1289	if (miCode == 46) { return true; }  //.
1290
1291	if (miCode == 64) { return true; }  //@
1292
1293	if (miCode == 95) { return true; }  //_
1294
1295	if (this.ValidaTeclado(strCaracter) == true) { return true; }
1296
1297	if (this.ValidaNumero(strCaracter) == true) { return true; }
1298
1299	if (this.ValidaLetra(strCaracter) == true) { return true; }
1300
1301	return false;
1302}
1303
1304GRFunc.prototype.RegresaComentarios = function(intCantidad, strXmlRuta) {
1305	try {
1306		if (intCantidad == null || intCantidad == '') { intCantidad = 0; }
1307
1308		var grcuser = this.UsuarioLoggueado;
1309
1310		if (grcuser == null || grcuser == '') { return intCantidad; }
1311
1312		var miXml = this.LeeXml(this.NuestroHost + strXmlRuta);
1313
1314		if (miXml == null) { return intCantidad; }
1315
1316		var miNodo = miXml.getElementsByTagName("ComentariosCuenta")[0];
1317
1318		var miNodoHijo = miNodo.childNodes[0];
1319
1320		intCuenta = miNodoHijo.nodeValue;
1321
1322		return intCuenta;
1323	}
1324	catch (ex) { return intCantidad; }
1325}
1326
1327GRFunc.prototype.LeeXml = function(strXmlRuta) {
1328	try {
1329		if (window.XMLHttpRequest) {
1330			miXMLHttpRequest = new XMLHttpRequest();
1331		}
1332		else {
1333			miXMLHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
1334		}
1335		miXMLHttpRequest.open("GET", strXmlRuta, false);
1336		miXMLHttpRequest.send();
1337
1338		return miXMLHttpRequest.responseXML;
1339	}
1340	catch (ex) { return null; }
1341}
1342
1343GRFunc.prototype.ResizeIframe = function(miIframeName) {
1344	var miIframe = $("#" + miIframeName);
1345
1346	miIframe.css.height = miIframe.contentWindow.document.body.scrollHeight;
1347}
1348
1349GRFunc.prototype.GetForm = function(_form, _action, _params) {
1350	try {
1351		if (_action.toString().length > 0)
1352			document.getElementById(_form).action = _action;
1353		var params = _params.toString().split('|');
1354		for (i = 0; i < params.length; i++) {
1355			var values = params[i].split('.:.');
1356			document.getElementById(values[0]).value = values[1];
1357		}
1358
1359		document.getElementById(_form).submit();
1360	}
1361	catch (ex)
1362                { }
1363
1364}
1365GRFunc.prototype.Compartir = function(url, tipo, TitORes) {
1366	var type = parseInt(tipo, 10);
1367
1368	if ((!(url.indexOf("http") == 0)) && (tipo != 0)) {
1369		var NuestroHostEscapado = escape(this.NuestroHost);
1370		while (NuestroHostEscapado.indexOf("/") != -1) {
1371			NuestroHostEscapado = NuestroHostEscapado.replace("/", "%2F");
1372		}
1373		url = NuestroHostEscapado + url;
1374	}
1375
1376
1377	var urlFinal = "";
1378	var params = "";
1379	var nameFinal = "";
1380	var settingFinal = "";
1381	switch (type) {
1382		case 0: //twitter
1383			{
1384
1385				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
1386				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
1387				urlFinal = this.grConfig.Protocol + "//twitter.com/intent/tweet?text=" + encodeURIComponent(url);
1388				nameFinal = "twitterfinal";
1389				settingFinal = "top=" + TopPosition + ",left=" + LeftPosition + ",resizable=yes,scrollbars=yes,toolbar=0,status=0,width=760,height=436";
1390				window.open(urlFinal, "_self", settingFinal);
1391			} break;
1392		case 1: //twitter
1393			{
1394				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
1395				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
1396				urlFinal = this.NuestroHost + "aplicaciones/redessociales/enviaTwitter.aspx?url=" + url + "&resumen=" + TitORes;
1397				nameFinal = "twitter";
1398				settingFinal = "top=" + TopPosition + ",left=" + LeftPosition + ",resizable=yes,scrollbars=yes,toolbar=0,status=0,width=760,height=436";
1399				window.open(urlFinal, nameFinal, settingFinal);
1400			} break;
1401		case 2: //facebook
1402			{
1403				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
1404				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
1405				urlFinal = this.grConfig.Protocol + "//www.facebook.com/sharer.php?u=" + url + "&t=" + TitORes;
1406				nameFinal = "facebook";
1407				settingFinal = "top=" + TopPosition + ",left=" + LeftPosition + ",toolbar=0,status=0,width=626,height=436";
1408				window.open(urlFinal, nameFinal, settingFinal);
1409			} break;
1410		case 3: //mail a amigo
1411			{
1412				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
1413				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
1414				urlFinal = this.NuestroHost + "aplicaciones/correos/CorreoEnvio.aspx?CorreoTipo=3&Url=" + url + "&Titulo=" + TitORes;
1415				this.AbrirPagina("noscroll", urlFinal);
1416			} break;
1417	}
1418}
1419GRFunc.prototype.ValidaAccesoModal = function() {
1420	//var urlembed = this.Get_PlazaQueryString('urlembed');
1421	var wlUE = window.location.href;
1422	var urlEP = wlUE.split('urlembed=');
1423	var urlembed = urlEP[1];
1424	if (urlembed != null && urlembed.length > 0 && urlembed.indexOf('galeria') > -1) {
1425		if (urlembed.indexOf(this.grConfig.Protocol + '//') == -1 && urlembed.substring(0, 1) == "/")
1426			urlembed = this.NuestroHost + urlembed.substring(1); //Se omite el primer slash ya que la variable nuestro host lo concatena.
1427		this.AbrirPagina('modal', urlembed);
1428	}
1429
1430}
1431
1432GRFunc.prototype.AjustarIframe = function(IdObj, Tipo) {
1433	try {
1434		IdObj = (Tipo != null ? Tipo.toString() + IdObj.toString() : IdObj.toString());
1435		if (navigator.userAgent.indexOf('MSIE') != -1) {
1436			//explorer
1437			height = window.frames[IdObj].document.body.scrollHeight;
1438			if (height == 0 && Tipo == 'sondeo') height = 250;
1439			var objIframe = document.getElementById(IdObj);
1440			objIframe.height = height;
1441		}
1442		else {
1443			//mozilla
1444			//height = $(IdObj).contentWindow.document.body.offsetHeight;
1445			var body = $("#" + IdObj).contentWindow.document.body;
1446			var heightAlterno = $("#" + IdObj).contentWindow.innerHeight;
1447			height = Math.max(body.scrollHeight, body.offsetHeight, body.clientHeight, heightAlterno);
1448			var objIframe = document.getElementById(IdObj);
1449			objIframe.height = height;
1450		}
1451	}
1452	catch (ex) { }
1453}
1454
1455GRFunc.prototype.AjustarIframeJQ = function(IdObj, afectarParent) {
1456	try {
1457
1458		//height = $(IdObj).contentWindow.document.body.offsetHeight;
1459		//var body = $("#"+IdObj).contentWindow.document.body;
1460		if (window.location.href.indexOf("cobertura") == -1) {
1461			var widthAlterno = $("#" + IdObj).contents().width();
1462			width = Math.max(widthAlterno);
1463			var heightAlterno = $("#" + IdObj).contents().height();
1464			height = Math.max(heightAlterno);
1465			var objIframe = document.getElementById(IdObj);
1466			objIframe.height = (height == 150 ? 120 : height);
1467			objIframe.width = width;
1468			if (afectarParent) {
1469				if (objIframe.parentNode && height > 100) {
1470					objIframe.parentNode.style.width = width + "px";
1471					objIframe.parentNode.style.height = height + "px";
1472				}
1473			}
1474		}
1475
1476	}
1477	catch (ex) { }
1478}
1479
1480GRFunc.prototype.SetCookie = function(cookieName, cookieValue, nDays) {
1481	var today = new Date();
1482	var expire = new Date();
1483	if (nDays == null || nDays == 0) nDays = 30;
1484	expire.setTime(today.getTime() + 3600000 * 24 * nDays);
1485	if (this.EsStage) {
1486		expire.setTime(today.getTime() + 24 * 60 * 60 * 1000 * nDays);
1487		document.cookie = cookieName + "=" + escape(cookieValue) + "; expires=" + expire.toGMTString() + "; path = /";
1488	}
1489	else {
1490		document.cookie = cookieName + "=" + escape(cookieValue) + "; expires=" + expire.toGMTString() + "; path = /;domain=." + this.obtieneDominio();
1491	}
1492	//document.cookie += "domain=.cancha.com";
1493}
1494
1495GRFunc.prototype.GetCookieVal = function(offset) {
1496	var endstr = document.cookie.indexOf(";", offset);
1497	if (endstr == -1)
1498		endstr = document.cookie.length;
1499	var clave = unescape(document.cookie.substring(offset, endstr));
1500	return clave.toLowerCase();
1501}
1502
1503GRFunc.prototype.Get_Cookie = function(name) {
1504	var arg = name + "=";
1505	var alen = arg.length;
1506	var clen = document.cookie.length;
1507	var i = 0;
1508	while (i < clen) {
1509		var j = i + alen;
1510		if (document.cookie.substring(i, j) == arg)
1511			return this.GetCookieVal(j);
1512		i = document.cookie.indexOf(" ", i) + 1;
1513		if (i == 0) break;
1514	}
1515	return null;
1516}
1517
1518
1519GRFunc.prototype.GetCookieValSTW = function(offset) {
1520	var endstr = document.cookie.indexOf(";", offset);
1521	if (endstr == -1)
1522		endstr = document.cookie.length;
1523	var clave = unescape(document.cookie.substring(offset, endstr));
1524	return clave;
1525}
1526
1527GRFunc.prototype.Get_CookieSTW = function(name) {
1528	var arg = name + "=";
1529	var alen = arg.length;
1530	var clen = document.cookie.length;
1531	var i = 0;
1532	while (i < clen) {
1533		var j = i + alen;
1534		if (document.cookie.substring(i, j) == arg)
1535			return this.GetCookieValSTW(j);
1536		i = document.cookie.indexOf(" ", i) + 1;
1537		if (i == 0) break;
1538	}
1539	return null;
1540}
1541
1542GRFunc.prototype.Delete_Cookie = function(name) {
1543	if (this.Get_Cookie(name)) document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
1544}
1545
1546//GRFunc.prototype.Get_UserLogeado = function() {
1547//	var usuario;
1548//	//if(this.Get_CookieSTW('testfb') == '1')
1549//	if (true)
1550//		usuario = this.Get_CookieSTW('grdisplay') == null ? this.Get_CookieSTW('cusuarioss2') : this.Get_CookieSTW('grdisplay');
1551//	else
1552//		var usuario = this.Get_CookieSTW('cusuarioss2');
1553//	return usuario == null ? this.Get_CookieSTW('cusuarioss') : usuario;
1554//}
1555
1556GRFunc.prototype.Get_CookiePlaza = function() {
1557	return this.Get_Cookie('grcidfte');
1558}
1559
1560GRFunc.prototype.obtieneDominio = function() {
1561	var dominio = document.domain;
1562	dominio = dominio.toString().replace("www.", "");
1563	return dominio;
1564}
1565
1566GRFunc.prototype.CambiaTamanioTexto = function(objs) {
1567
1568	for (ind = 0; ind < objs.length; ind++) {
1569		var obj = objs[ind];
1570		if ($("#" + obj) != null) {
1571			if ($("#" + obj).className.toString().indexOf('zoom') > -1)
1572				$("#" + obj).className = $("#" + obj).className.toString().split('zoom').join('');
1573			else
1574				$("#" + obj).className = $("#" + obj).className.toString() + "zoom";
1575
1576		}
1577	}
1578}
1579
1580GRFunc.prototype.cookie_Habilitada = function() {
1581	if (navigator.cookieEnabled)
1582		return true;
1583	return false;
1584}
1585
1586GRFunc.prototype.Get_Plaza = function() {
1587	var plaza = '';
1588	if (!this.cookie_Habilitada())
1589		console.log("Para poder accesar al sitio correctamente se debe tener las Cookies habilitadas!");
1590	plaza = this.Get_PlazaQueryString('pc');
1591	if (plaza == null || typeof (plaza) == "undefined" || !this.Valida_Plaza(plaza)) {
1592		//plaza = this.Get_CookiePlaza();
1593		if (window.location.href.indexOf("Defaultn.htm") > -1 || window.location.href.indexOf("defaultn.htm") > -1) {
1594			this.Set_CookiePlaza("101", 30);
1595			plaza = '101';
1596			//plaza = this.Get_CookiePlaza();
1597		}
1598		else if (window.location.href.indexOf("Defaultr.htm") > -1 || window.location.href.indexOf("defaultr.htm") > -1) {
1599			this.Set_CookiePlaza("102", 30);
1600			plaza = '102';
1601			//plaza = this.Get_CookiePlaza();
1602		}
1603		else if (window.location.href.indexOf("Defaultm.htm") > -1 || window.location.href.indexOf("defaultm.htm") > -1) {
1604			this.Set_CookiePlaza("103", 30);
1605			plaza = '103';
1606			//plaza = this.Get_CookiePlaza();
1607		}
1608		else {
1609			plaza = this.GetPlazaByUrl();
1610			this.Set_CookiePlaza(plaza, 30);
1611		}
1612	}
1613	else
1614		this.Set_CookiePlaza(plaza, 30);
1615	return plaza;
1616}
1617
1618
1619
1620GRFunc.prototype.Valida_Plaza = function(plaza) {
1621	var plazas_disp = ["101", "102", "103"];
1622	if (plazas_disp.indexOf(plaza) != -1)
1623		return true;
1624	else
1625		return false;
1626}
1627
1628GRFunc.prototype.Set_CookiePlaza = function(cookieValue, nDays) {
1629	this.SetCookie("grcidfte", cookieValue, nDays);
1630}
1631
1632GRFunc.prototype.Get_PlazaQueryString = function(qs) {
1633	var qsParam = new Array();
1634	if (window.location.search) {
1635		var querys = window.location.search.substring(1);
1636		var param = querys.split('&');
1637		for (var i = 0; i < param.length; i++) {
1638			var pos = param[i].indexOf('=');
1639			if (pos > 0) {
1640				var key = param[i].substring(0, pos);
1641				var val = param[i].substring(pos + 1);
1642				qsParam[key] = val;
1643			}
1644		}
1645		querystring = qsParam[qs];
1646		return querystring;
1647	}
1648	return null;
1649}
1650
1651GRFunc.prototype.Switch_Plaza = function(str_plaza) {
1652	var id_plaza;
1653	switch (str_plaza) {
1654		case "Norte":
1655			id_plaza = "101";
1656			break;
1657		case "Reforma":
1658			id_plaza = "102";
1659			break;
1660		case "Mural":
1661			id_plaza = "103";
1662			break;
1663	}
1664	return id_plaza;
1665}
1666
1667GRFunc.prototype.Default_Plaza = function(idPlaza) {
1668	var nomdefault = "";
1669	switch (idPlaza) {
1670		case "101":
1671			nomdefault = "Defaultn.htm";
1672			break;
1673		case "102":
1674			nomdefault = "Defaultr.htm";
1675			break;
1676		case "103":
1677			nomdefault = "Defaultm.htm";
1678			break;
1679	}
1680	return nomdefault;
1681}
1682
1683GRFunc.prototype.AbrirFotoZoom = function(autor, tipo, urlfoto) {
1684	var liga = this.NuestroHost + 'aplicaciones/fotozoom/verfoto.aspx?autor=' + autor + '&tipo=' + tipo + '&urlfoto=' + urlfoto;
1685	this.AbrirPagina('noscroll', liga);
1686}
1687
1688GRFunc.prototype.PintaComentarios = function(IdComentario, CantidadComentario, OcultarComentario, RutaComentario, TituloEncoded, URLEncoded, IdCategoria, Tipoburbuja) {
1689
1690	//var RutaComentario = '\\cntxml\\Comentario\\1\\1\\41.xml';
1691
1692	//RutaComentario = RutaComentario.replace(/\\/g, '/');
1693
1694	CantidadComentario = grFunc.RegresaComentarios(CantidadComentario, RutaComentario);
1695
1696	if (CantidadComentario > 0) {
1697		var Comentarios = Class.create({
1698			initialize: function(IdComentario, CantidadComentario, OcultarComentario, RutaComentario, TituloEncoded, URLEncoded, IdCategoria) {
1699				this.Aplicacion = 'aplicaciones/comentarios/ComentarioPublicoCompleto.aspx';
1700				this.IdComentario = IdComentario;
1701				this.CantidadComentario = CantidadComentario;
1702				this.OcultarComentario = OcultarComentario;
1703				this.RutaComentario = RutaComentario;
1704				this.TituloEncoded = TituloEncoded;
1705				this.URLEncoded = URLEncoded;
1706				this.IdCategoria = IdCategoria;
1707			},
1708			AbrirComentarios: function() {
1709				var LigaComentario = grFunc.NuestroHost + this.Aplicacion;
1710				LigaComentario += '?IdComentario=' + this.IdComentario;
1711				LigaComentario += '&OcultarComentarios=' + this.OcultarComentario;
1712				LigaComentario += '&Titulo=' + this.TituloEncoded;
1713				LigaComentario += '&Url=' + this.URLEncoded;
1714				LigaComentario += '&IdCategoria=' + this.IdCategoria;
1715				//LigaComentario += 'grFunc.AbrirPagina(' +  String.fromCharCode(39) + 'scroll' +  String.fromCharCode(39) + ',' +  String.fromCharCode(39) + LigaComentario +  String.fromCharCode(39) + ');'
1716				return LigaComentario;
1717			} /*,
1718                 EscribeCantidad: function() {
1719                     var intCantidad = grFunc.RegresaComentarios(this.CantidadComentario, this.RutaComentario);
1720                     return intCantidad;
1721                 }
1722                 */
1723		});
1724		var AppComentarios = new Comentarios(IdComentario, CantidadComentario, OcultarComentario, RutaComentario, TituloEncoded, URLEncoded, IdCategoria);
1725
1726		switch (Tipoburbuja) {
1727			case 'App2':
1728				document.write('<td width="7" align="right" valign="middle" class="arblanco11">');
1729				document.write('<a onclick=grFunc.AbrirPagina("noscroll","' + AppComentarios.AbrirComentarios() + '",690,600)>');
1730				document.write('<img src="libre/imgdiseno/coment_left.png" border="0" width="7" height="16" /></a></td>');
1731				document.write('<td height="16" align="right" valign="middle" class="arblanco11" background="libre/imgdiseno/comentario_01.gif">');
1732				document.write('<a onclick=grFunc.AbrirPagina("noscroll","' + AppComentarios.AbrirComentarios() + '",690,600)>');
1733				//document.write('<span class="arblanco10"><span class="comenblanco11">' + AppComentarios.EscribeCantidad() + '</span></span></a></td>');
1734				document.write('<span class="arblanco10"><span class="comenblanco11">' + AppComentarios.CantidadComentario + '</span></span></a></td>');
1735				document.write('<td width="18">');
1736				document.write('<a onclick=grFunc.AbrirPagina("noscroll","' + AppComentarios.AbrirComentarios() + '",690,600)>');
1737				document.write('
1737<img src="libre/imgdiseno/coment_right.png" border="0" width="19" height="16" /></a></td>');
1738				break;
1739			case 'App3':
1740				document.write('<td width="7" align="right" valign="middle" class="arblanco11">');
1741				document.write('<a onclick=grFunc.AbrirPagina("noscroll","' + AppComentarios.AbrirComentarios() + '",690,600)>');
1742				document.write('<img src="libre/imgdiseno/coment_left.png" border="0" width="7" height="16" /></a></td>');
1743				document.write('<td height="16" align="right" valign="middle" class="arblanco11" background="libre/imgdiseno/comentario_01.gif">');
1744				document.write('<a onclick=grFunc.AbrirPagina("noscroll","' + AppComentarios.AbrirComentarios() + '",690,600)>');
1745				//document.write('<span class="arblanco10"><span class="comenblanco11">' + AppComentarios.EscribeCantidad() + '</span></span></a></td>');
1746				document.write('<span class="arblanco10"><span class="comenblanco11">' + AppComentarios.CantidadComentario + '</span></span></a></td>');
1747				document.write('<td width="18">');
1748				document.write('
1748<a onclick=grFunc.AbrirPagina("noscroll","' + AppComentarios.AbrirComentarios() + '",690,600)>');
1749				document.write('<img src="libre/imgdiseno/coment_right.png" border="0" width="19" height="16" /></a></td>');
1750				break;
1751			case 'App4':
1752				document.write('<a onclick=grFunc.AbrirPagina("noscroll","' + AppComentarios.AbrirComentarios() + '",690,600)>');
1753				document.write(AppComentarios.CantidadComentario + '</a>');
1754				break;
1755		}
1756	}
1757}
1758
1759GRFunc.prototype.caractEspec = function(strr) {
1760	myStrr = new String(strr);
1761	myStrr = myStrr.replace(/[á]/g, '&aacute;');
1762	myStrr = myStrr.replace(/[é]/g, '&eacute;');
1763	myStrr = myStrr.replace(/[í]/g, '&iacute;');
1764	myStrr = myStrr.replace(/[ó]/g, '&oacute;');
1765	myStrr = myStrr.replace(/[ú]/g, '&uacute;');
1766	myStrr = myStrr.replace(/[Á]/g, '&Aacute;');
1767	myStrr = myStrr.replace(/[É]/g, '&Eacute;');
1768	myStrr = myStrr.replace(/[Í]/g, '&Iacute;');
1769	myStrr = myStrr.replace(/[Ó]/g, '&Oacute;');
1770	myStrr = myStrr.replace(/[Ú]/g, '&Uacute;');
1771	myStrr = myStrr.replace(/[ñ]/g, '&ntilde;');
1772	myStrr = myStrr.replace(/[Ñ]/g, '&Ntilde;');
1773	myStrr = myStrr.replace(/[ë]/g, '&euml;');
1774	myStrr = myStrr.replace(/[Ë]/g, '&Euml;');
1775	myStrr = myStrr.replace(/[ü]/g, '&uuml;');
1776	myStrr = myStrr.replace(/[Ü]/g, '&Uuml;');
1777	myStrr = myStrr.replace(/[*]/g, '');
1778	myStrr = myStrr.replace(/[-]/g, '');
1779	myStrr = myStrr.replace(/[+]/g, '');
1780	myStrr = myStrr.replace(/[|]/g, '');
1781	myStrr = myStrr.replace(/[!]/g, '');
1782	myStrr = myStrr.replace(/[(]/g, '');
1783	myStrr = myStrr.replace(/[)]/g, '');
1784	myStrr = myStrr.replace(/[{]/g, '');
1785	myStrr = myStrr.replace(/[}]/g, '');
1786	myStrr = myStrr.replace(/[<]/g, '');
1787	myStrr = myStrr.replace(/[>]/g, '');
1788	myStrr = myStrr.replace(/[:]/g, '');
1789	myStrr = myStrr.replace(/[?]/g, '');
1790	myStrr = myStrr.replace(/[~]/g, '');
1791	myStrr = myStrr.replace(/[#]/g, '');
1792	myStrr = myStrr.replace(/[\\]/g, '');
1793	myStrr = myStrr.replace(/[\^]/g, '');
1794	myStrr = myStrr.replace(/[\[]/g, '');
1795	myStrr = myStrr.replace(/[\]]/g, '');
1796	return myStrr;
1797}
1798
1799GRFunc.prototype.ligaBuscador = function(zona) {
1800
1801	if (this.NuestroHost.indexOf('plazaconsulta=elnorte') != -1)
1802		sitePcob = 'elnorte';
1803	else if (this.NuestroHost.indexOf('plazaconsulta=reforma') != -1)
1804		sitePcob = 'reforma';
1805	else if (this.NuestroHost.indexOf('plazaconsulta=mural') != -1)
1806		sitePcob = 'mural';
1807	else if (this.NuestroHost.indexOf('periodico=elnorte') != -1)
1808		sitePcob = 'elnorte';
1809	else if (this.NuestroHost.indexOf('periodico=reforma') != -1)
1810		sitePcob = 'reforma';
1811	else if (this.NuestroHost.indexOf('periodico=mural') != -1)
1812		sitePcob = 'mural';
1813	else if (this.NuestroHost.indexOf('.reforma.') != -1)
1814		sitePcob = 'reforma';
1815	else if (this.NuestroHost.indexOf('.elnorte.') != -1)
1816		sitePcob = 'elnorte';
1817	else if (this.NuestroHost.indexOf('.mural.') != -1)
1818		sitePcob = 'mural';
1819	else
1820		sitePcob = "elnorte";
1821	/*busqueda en la plaza o en google*/
1822
1823	if (zona == 10 || zona == 11)/*Se agrego nuevo para quitar google de las portadas sin afectar otros buscadores*/
1824	{
1825		if (zona == 10) {
1826			document.buscador.strbusqueda.value = this.caractEspec(document.buscador.strbusqueda.value);
1827			document.buscador.q.value = document.buscador.strbusqueda.value;
1828			document.buscador.method = "POST";
1829			document.buscador.target = "_top";
1830			document.buscador.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/' + sitePcob + '/Pages/Buscaimpresa.aspx';
1831		}
1832		else {
1833			document.buscador.strbusqueda.value = this.caractEspec(document.buscador11.strbusqueda.value);
1834			document.buscador.q.value = document.buscador11.strbusqueda.value;
1835			document.buscador11.method = "POST";
1836			document.buscador11.target = "_top";
1837			document.buscador11.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/' + sitePcob + '/Pages/Buscaimpresa.aspx';
1838		}
1839	}
1840	else {
1841
1842		if (zona == 1) {
1843			var buscarG = document.buscador.radioG.checked;
1844			document.buscador.strbusqueda.value = this.caractEspec(document.buscador.strbusqueda.value);
1845			document.buscador.q.value = document.buscador.strbusqueda.value;
1846			if (buscarG == true) //si es google
1847			{
1848				document.buscador.method = "GET";
1849				document.buscador.target = "_top";
1850				document.buscador.action = siteMenu + "/google/default.asp";
1851			}
1852			else {
1853				document.buscador.method = "POST";
1854				document.buscador.target = "_top";
1855				document.buscador.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/' + sitePcob + '/Pages/Buscaimpresa.aspx';
1856			}
1857
1858		}
1859		else if (zona == 6)//buscador para mas buscado de cancha
1860		{
1861			document.buscadormas.strbusqueda.value = this.caractEspec(document.buscadormas.strbusqueda.value);
1862			document.buscadormas.method = "POST";
1863			document.buscadormas.target = "_top";
1864			document.buscadormas.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/canchacom/Pages/Buscaimpresa.aspx';
1865			document.buscadormas.submit();
1866		}
1867		else if (zona == 4) {
1868			document.buscadormas.strbusqueda.value = this.caractEspec(document.buscadormas.strbusqueda.value);
1869			document.buscadormas.method = "POST";
1870			document.buscadormas.target = "_top";
1871			document.buscadormas.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/' + sitePcob + '/Pages/Buscaimpresa.aspx';
1872			document.buscadormas.submit();
1873		}
1874		else if (zona == 3)//buscador en categoria para articulos
1875		{
1876			document.buscador3.strbusqueda.value = this.caractEspec(document.buscador3.strbusqueda.value);
1877			document.buscador3.method = "POST";
1878			document.buscador3.target = "_top";
1879			document.buscador3.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/' + sitePcob + '/Pages/Buscaimpresa.aspx';
1880		}
1881		else if (zona == 5)//buscador en categoria WSJAméricas
1882		{
1883			document.buscador5.strbusqueda.value = this.caractEspec(document.buscador5.strbusqueda.value);
1884			document.buscador5.method = "POST";
1885			document.buscador5.target = "_top";
1886			document.buscador5.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/' + sitePcob + '/Pages/BuscaWSJ.aspx';
1887		}
1888		else {
1889			var buscarG = document.buscador2.radioG.checked;
1890			document.buscador2.strbusqueda.value = this.caractEspec(document.buscador2.strbusqueda.value);
1891			document.buscador2.q.value = document.buscador2.strbusqueda.value;
1892			if (buscarG == true) //si es google
1893			{
1894				document.buscador2.method = "GET";
1895				document.buscador2.target = "_top";
1896				document.buscador2.action = siteMenu + "/google/default.asp";
1897			}
1898			else {
1899				document.buscador2.method = "POST";
1900				document.buscador2.target = "_top";
1901				document.buscador2.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/' + sitePcob + '/Pages/Buscaimpresa.aspx';
1902			}
1903		}
1904	}
1905}
1906
1907GRFunc.prototype.validaFecha = function(dia, mes, ano) {
1908	var fecha = new Date(ano, mes - 1, dia);
1909	return fecha;
1910}
1911
1912GRFunc.prototype.Block_Copy = function(e) {
1913	if ((grFunc.IdPlaza == '101'))
1914		msg = "Derechos Reservados ©\nEditora el Sol, S.A. de C.V.";
1915	else
1916		msg = "Derechos Reservados ©\nC.I.C.S.A";
1917	if (navigator.appName == 'Netscape' && e.which == 3) {
1918		alert(msg);
1919		return false;
1920	}
1921	if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2) {
1922		alert(msg);
1923		return false;
1924	}
1925	else return true;
1926}
1927
1928GRFunc.prototype.AgregaImg_BlockCopy = function() {
1929	if (document.images) {
1930		for (i = 0; i < document.images.length; i++) {
1931			document.images[i].onmousedown = this.Block_Copy;
1932			document.images[i].onmouseup = this.Block_Copy;
1933		}
1934	}
1935}
1936
1937GRFunc.prototype.GetNombre_Plaza = function() {
1938	var sitepage = ''
1939	switch (grFunc.IdPlaza) {
1940		case '101':
1941			sitepage = 'elnorte.com/'; break;
1942		case '102':
1943			sitepage = 'reforma.com/'; break;
1944		case '103':
1945			sitepage = 'mural.com.mx/'; break;
1946	}
1947	return sitepage;
1948}
1949
1950GRFunc.prototype.ObtieneNombrexPlaza = function() {
1951	var nameplaza = ''
1952	switch (this.IdPlaza) {
1953		case '101':
1954			nameplaza = 'el norte'; break;
1955		case '102':
1956			nameplaza = 'reforma'; break;
1957		case '103':
1958			nameplaza = 'mural'; break;
1959		default:
1960			nameplaza = 'reforma'; break;
1961	}
1962	return nameplaza;
1963}
1964
1965GRFunc.prototype.GetIdPlazacom = function() {
1966	var plazacom = '2';
1967	if (this.IdPlaza != "undefined") {
1968		switch (this.IdPlaza) {
1969			case '101':
1970				plazacom = '1'; break;
1971			case '102':
1972				plazacom = '2'; break;
1973			case '103':
1974				plazacom = '3'; break;
1975		}
1976	}
1977	return plazacom;
1978}
1979GRFunc.prototype.GoSiteByPlaza = function() {
1980	var plaza = this.GetPlazaByUrl();
1981	if (plaza != undefined || plaza != null) {
1982		switch (plaza) {
1983			case '101':
1984				document.location.href = this.NuestroHost + "defaultn.htm"; //'http://www.negocioselnorte.com/defaultn.htm';
1985				break;
1986			case '102':
1987				document.location.href = this.NuestroHost + "defaultr.htm"; //'http://www.negociosreforma.com/defaultr.htm';
1988				break;
1989			case '103':
1990				document.location.href = this.NuestroHost + "defaultm.htm"; //'http://www.negociosmural.com/defaultm.htm';
1991				break;
1992		}
1993	}
1994}
1995
1996
1997/*
1998Busqueda en fotoTienda        
1999*El idFototienda es el id de fototienda que se le asigno a la categoria
2000*Las fechas va en formato yyyy/mm/dd        
2001*/
2002GRFunc.prototype.AbrirFototienda = function(Nombre, idFototienda, fechaInicial, fechaFinal) {
2003
2004	if (fechaInicial == "" || fechaInicial == null) {
2005		fechaInicial = "2001/01/01";
2006	}
2007
2008	if (fechaFinal == "" || fechaFinal == null) {
2009		var f = new Date();
2010		fechaFinal = f.getFullYear() + "/" + ("0" + (f.getMonth() + 1)).slice(-2) + "/" + ("0" + f.getDate()).slice(-2);
2011	}
2012
2013	//alert(this.NuestroHost+"/fototienda/Busquedaresultado.aspx?texto="+Nombre+"&FIni="+fechaInicial+"&FFin="+fechaFinal+"&Seccion="+idFototienda+"&grcidorigen=3");
2014	//window.location.href = 'http://www.elnorte.com/fototienda/Busquedaresultado.aspx?texto='+Nombre+"&FIni="+fechaInicial+"&FFin="+fechaFinal+"&Seccion="+idFototienda+"&grcidorigen=3";
2015	parent.window.location.href = this.NuestroHost + "fototienda/Busquedaresultado.aspx?texto=" + Nombre + "&FIni=" + fechaInicial + "&FFin=" + fechaFinal + "&Seccion=" + idFototienda + "&grcidorigen=3";
2016
2017
2018}
2019
2020
2021/*FUNCIONES MULTIPROMO CANCHA*/
2022
2023GRFunc.prototype.GetInternetExplorerVersion = function() {
2024	// Returns the version of Internet Explorer or a -1
2025	// (indicating the use of another browser).
2026
2027	var rv = -1; // Return value assumes failure.
2028	if (navigator.appName == 'Microsoft Internet Explorer') {
2029		var ua = navigator.userAgent;
2030		var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
2031		if (re.exec(ua) != null)
2032			rv = parseFloat(RegExp.$1);
2033	}
2034	return rv;
2035}
2036
2037
2038GRFunc.prototype.SetUpPanes = function(containerId, defaultTabId) {
2039	// go through the DOM, find each tab-container
2040	// set up the panes array with named panes
2041	// find the max height, set tab-panes to that height
2042	panes[containerId] = new Array();
2043	var maxHeight = 0; var maxWidth = 0;
2044	var container = document.getElementById(containerId);
2045	var paneContainer = container.getElementsByTagName("div")[0];
2046	var paneList = paneContainer.childNodes;
2047	for (var i = 0; i < paneList.length; i++) {
2048		var pane = paneList[i];
2049		if (pane.nodeType != 1) continue;
2050		if (pane.offsetHeight > maxHeight) maxHeight = pane.offsetHeight;
2051		if (pane.offsetWidth > maxWidth) maxWidth = pane.offsetWidth;
2052		panes[containerId][pane.id] = pane;
2053
2054		pane.style.display = "none";
2055	}
2056	paneContainer.style.height = maxHeight + "px";
2057	paneContainer.style.width = maxWidth + "px";
2058	document.getElementById("tab1").onclick();
2059}
2060
2061GRFunc.prototype.ShowPane = function(paneId, activeTab, urlproducto) {
2062	// make tab active class
2063	// hide other panes (siblings)
2064	// make pane visible
2065	var container = document.getElementById("containercancha");
2066	var paneContainer = container.getElementsByTagName("div")[0];
2067	var paneList = paneContainer.childNodes;
2068	var lastpane = "pane" + paneList.length
2069	//alert('lastpane' + lastpane);
2070
2071
2072	for (var con in panes) {
2073		activeTab.blur();
2074		if (paneId == "pane1") {
2075			activeTab.className = "tab-active1";
2076			var ver = this.GetInternetExplorerVersion();
2077			if (ver > -1) {
2078				document.getElementById("imgterminacioncurva").align = "top";
2079				document.getElementById("imgterminacioncurva").src = urlproducto + "libre/imgdiseno/terminacion_curvaroja.gif";
2080			}
2081			else {
2082				document.getElementById("imgterminacioncurva").align = "absmiddle";
2083				document.getElementById("imgterminacioncurva").src = urlproducto + "libre/imgdiseno/terminacion_curvaroja.gif";
2084			}
2085		}
2086		else {
2087			if (paneId == lastpane) {
2088				activeTab.className = "tab-activelast";
2089			}
2090			else {
2091				activeTab.className = "tab-active";
2092			}
2093
2094		}
2095
2096		if (panes[con][paneId] != null) {
2097			// tab and pane are members of this container
2098			var pane = document.getElementById(paneId);
2099			pane.style.display = "block";
2100			var container = document.getElementById(con);
2101			var tabs = container.getElementsByTagName("ul")[0];
2102			var tabList = tabs.getElementsByTagName("a")
2103			//alert('tablist ' + tabList.length);
2104			for (var i = 1; i <= tabList.length; i++) {
2105				var tab = tabList[i - 1];
2106				if (tab != activeTab) {
2107					var ultimo = "pane" + i
2108					if (ultimo == lastpane) {
2109						tab.className = "tab-disabledlast";
2110					}
2111					else {
2112						if (i == 1) {
2113							tab.className = "tab-disabled1";
2114							var ver = this.GetInternetExplorerVersion();
2115							if (ver > -1) {
2116								document.getElementById("imgterminacioncurva").align = "top";
2117								document.getElementById("imgterminacioncurva").src = urlproducto + "libre/imgdiseno/terminacion_curva.gif";
2118							}
2119							else {
2120								document.getElementById("imgterminacioncurva").align = "absmiddle";
2121								document.getElementById("imgterminacioncurva").src = urlproducto + "libre/imgdiseno/terminacion_curva.gif";
2122							}
2123						}
2124						else {
2125							tab.className = "tab-disabled";
2126						}
2127					}
2128				}
2129				else {
2130					var imagenact = document.getElementById("imagenpane" + i).src;
2131					if (imagenact.indexOf("pix.gif") > -1) {
2132						//alert(imagenact);
2133						var nuevaimagen = imagenes[i];
2134						//alert(nuevaimagen);
2135						document.getElementById("imagenpane" + i).src = nuevaimagen;
2136					}
2137				}
2138
2139			}
2140
2141
2142			for (var i in panes[con]) {
2143				var pane = panes[con][i];
2144				if ((undefined != pane.id) && (pane.id != null)) {
2145					if (pane.id != paneId) {
2146						document.getElementById(pane.id).style.display = "none";
2147					}
2148				}
2149				else {
2150					continue;
2151				}
2152			}
2153
2154
2155		}
2156
2157
2158
2159	}
2160	return false;
2161}
2162
2163/************************************
2164* IDENTIFICAR PLATAFORMA Y BROWSER *
2165************************************/
2166
2167GRFunc.prototype.autoResizeIframe = function(idIframe) {
2168	var bodyalto = document.getElementById(idIframe).contentWindow.document.body;
2169	var htmlalto = document.getElementById(idIframe).contentWindow.document.documentElement;
2170	var maxheight = Math.max(bodyalto.clientHeight, bodyalto.offsetHeight, bodyalto.scrollHeight, htmlalto.clientHeight, htmlalto.offsetHeight, htmlalto.scrollHeight);
2171	document.getElementById(idIframe).style.height = maxheight + 'px';
2172}
2173
2174GRFunc.prototype.obtieneDominio = function() {
2175	var dominio = document.domain;
2176	dominio = dominio.toString().replace("www.", "");
2177	return dominio;
2178}
2179
2180GRFunc.prototype.GetPlazaByUrl = function() {
2181	var plaza = '';
2182	if (window.location.href.indexOf("negocioselnorte") > -1 || window.location.href.indexOf("elnortenegocios") > -1) {
2183		this.Set_CookiePlaza("101", 30);
2184		plaza = '101';
2185		//plaza = this.Get_CookiePlaza();
2186	}
2187	else if (window.location.href.indexOf("negociosreforma") > -1 || window.location.href.indexOf("reformanegocios") > -1) {
2188		this.Set_CookiePlaza("102", 30);
2189		plaza = '102';
2190		//plaza = this.Get_CookiePlaza();
2191	}
2192	else if (window.location.href.indexOf("negociosmural") > -1 || window.location.href.indexOf("muralnegocios") > -1) {
2193		this.Set_CookiePlaza("103", 30);
2194		plaza = '103';
2195		//plaza = this.Get_CookiePlaza();
2196	}
2197	else {
2198		this.Set_CookiePlaza("102", 30);
2199		plaza = '102';
2200		//plaza = this.Get_CookiePlaza();
2201	}
2202	return plaza;
2203}
2204
2205GRFunc.prototype.CompartirNuevo = function(url, tipo, TitORes) {
2206	var type = parseInt(tipo, 10);
2207
2208	if ((!(url.indexOf("http") == 0)) && (tipo != 0)) {
2209		var NuestroHostEscapado = escape(this.NuestroHost);
2210		while (NuestroHostEscapado.indexOf("/") != -1) {
2211			NuestroHostEscapado = NuestroHostEscapado.replace("/", "%2F");
2212		}
2213		url = NuestroHostEscapado + url;
2214	}
2215
2216	var FechaSalida = "";
2217	if (TitORes.indexOf('|-|') > -1) {
2218		var arrTitFecha = TitORes.split('|-|');
2219		TitORes = arrTitFecha[0];
2220		FechaSalida = arrTitFecha[1];
2221	}
2222
2223	var urlFinal = "";
2224	var params = "";
2225	var nameFinal = "";
2226	var settingFinal = "";
2227	switch (type) {
2228		case 0: //twitter
2229			{
2230
2231				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
2232				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
2233				urlFinal = this.grConfig.Protocol + "//twitter.com/intent/tweet?text=" + encodeURIComponent(url);
2234				nameFinal = "twitterfinal";
2235				settingFinal = "top=" + TopPosition + ",left=" + LeftPosition + ",resizable=yes,scrollbars=yes,toolbar=0,status=0,width=760,height=436";
2236				window.open(urlFinal, "_self", settingFinal);
2237			} break;
2238		case 1: //twitter
2239			{
2240				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
2241				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
2242				urlFinal = this.NuestroHost + "aplicacioneslibre/redessociales/enviaTwitter.aspx?url=" + encodeURIComponent(url) + "&resumen=" + TitORes;
2243				nameFinal = "twitter";
2244				settingFinal = "top=" + TopPosition + ",left=" + LeftPosition + ",resizable=yes,scrollbars=yes,toolbar=0,status=0,width=760,height=436";
2245				window.open(urlFinal, nameFinal, settingFinal);
2246			} break;
2247		case 2: //facebook
2248			{
2249				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
2250				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
2251				urlFinal = this.grConfig.Protocol + "//www.facebook.com/sharer.php?u=" + url;
2252				nameFinal = "facebook";
2253				settingFinal = "top=" + TopPosition + ",left=" + LeftPosition + ",toolbar=0,status=0,width=626,height=436";
2254				window.open(urlFinal, nameFinal, settingFinal);
2255			} break;
2256		case 3: //mail a amigo
2257			{
2258				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
2259				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
2260				urlFinal = this.NuestroHost + "aplicaciones/correos/CorreoEnvio.aspx?CorreoTipo=3&Url=" + url + "&Titulo=" + TitORes + "&FechaSalida=" + FechaSalida;
2261				this.AbrirPagina("noscroll", urlFinal);
2262			} break;
2263		case 4: //Google +
2264			{
2265				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
2266				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
2267				urlFinal = "https://plus.google.com/share?url=" + url + "&t=" + TitORes;
2268				nameFinal = "facebook";
2269				settingFinal = "top=" + TopPosition + ",left=" + LeftPosition + ",toolbar=0,status=0,width=626,height=436";
2270				window.open(urlFinal, nameFinal, settingFinal);
2271			} break;
2272		case 5: //Linked In
2273			{
2274				LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0;
2275				TopPosition = (screen.height) ? (screen.height - 400) / 2 : 0;
2276				urlFinal = "https://www.linkedin.com/cws/share?url=" + url;
2277				nameFinal = "facebook";
2278				settingFinal = "top=" + TopPosition + ",left=" + LeftPosition + ",toolbar=0,status=0,width=626,height=436";
2279				window.open(urlFinal, nameFinal, settingFinal);
2280			} break;
2281
2282
2283	}
2284}
2285
2286GRFunc.prototype.CargaAnuncioEspecialBottom = function() {
2287	try {
2288		if (typeof jQuery != 'undefined') {
2289			if ($("#bannerbot_pubbottom").length > 0) {
2290				var Esp = grAnuncio.Especial;
2291				if (grAnuncio.OrdenEspecial.indexOf("3") > -1) {
2292					document.getElementById('wrapperbanner_pubbottom').style.display = 'block';
2293					$("#bannerbot_pubbottom").css({ bottom: -207 });
2294					$("#bannerbot_pubbottom").delay("900").animate({ "bottom": "-5" }, { duration: 600 });
2295				}
2296			}
2297		}
2298	}
2299	catch (ex) { }
2300}
2301
2302GRFunc.prototype.CerrarBannerEspecialBottom = function() {
2303	try {
2304		if (typeof jQuery != 'undefined') {
2305			if ($("#bannerbot_pubbottom").length > 0) {
2306				$("#wrapperbanner_pubbottom").animate({ "bottom": "-207" }, { duration: 600 }).fadeOut(300);
2307			}
2308		}
2309	}
2310	catch (ex) { }
2311}
2312
2313GRFunc.prototype.CargaAnuncioEspecialExpandible = function() {
2314	try {
2315		$("#ad_wallpaper").delay(100).fadeIn('slow');
2316
2317		if (typeof _TemaEspecialHeader !== 'undefined') {
2318			if (_TemaEspecialHeader && this.EsPortadaHome()) {
2319				$("#publicidad_wallpaper_center").delay(10000).animate({ "height": "90" }, { duration: 400 });
2320			}
2321			else {
2322				$("#publicidad_wallpaper_center").delay(10000).animate({ "height": "60" }, { duration: 400 });
2323			}
2324		}
2325		else
2326			$("#publicidad_wallpaper_center").delay(10000).animate({ "height": "60" }, { duration: 400 });
2327		$("#btnclosepub").delay(9500).fadeOut('slow');
2328		$("#btnexpandpub").delay(9500).fadeIn('slow');
2329		var Esp = grAnuncio.Especial;
2330		if (grAnuncio.OrdenEspecial.indexOf("1") > -1) {
2331
2332			if (typeof _TemaEspecialHeader !== 'undefined') {
2333				if (_TemaEspecialHeader && this.EsPortadaHome()) {
2334					//var lightsaber = new Audio('lightsaber.mp3');
2335					if (typeof _AudioEspecialHeader !== 'undefined') {
2336						this.publicidadsound = _AudioEspecialHeader
2337					}
2338					var lightsaber = new Audio(this.NuestroHost + 'libre/publicidad/sounds/' + this.publicidadsound + '.mp3');
2339					$("body").append('<div id="sound_element" style="position:absolute; azimuth:-1; width:1px; height:1px;"></div>');
2340					$("body").append('<div id="soundfx"><audio src="' + this.NuestroHost + 'libre/publicidad/sounds/' + this.publicidadsound + '.mp3" type="audio/mp3" id="swoosh"></div>');
2341				}
2342			}
2343
2344			document.getElementById('publicidad_wallpaper_center').style.display = 'block';
2345			document.getElementById('contenido').style.padding = '15px';
2346			document.getElementById('contenido').style.maxWidth = '990px';
2347			if (temaActivo != undefined) {
2348				if (temaActivo == 1)
2349					document.getElementById('contenido').style.backgroundColor = '#292929';
2350				else
2351					document.getElementById('contenido').style.backgroundColor = '#eaeaea';
2352			}
2353			if ($("#header").length > 0) {
2354				document.getElementById('header').style.marginBottom = '15px';
2355			}
2356		}
2357
2358	} catch (ex) { }
2359}
2360
2361GRFunc.prototype.ExpandeEspecialExp = function() {
2362	try {
2363		//document.getElementById('publicidad_wallpaper_center').innerHTML = '';
2364		//document.getElementById('publicidad_wallpaper_center').innerHTML = genelabanner;
2365
2366		if (typeof _TemaEspecialHeader !== 'undefined') {
2367			if (_TemaEspecialHeader && this.EsPortadaHome())
2368				if ($('#sound_element').length > 0) {
2369				if (typeof _AudioEspecialHeader !== 'undefined') {
2370					this.publicidadsound = _AudioEspecialHeader
2371				}
2372				$('#sound_element').empty();
2373				$('#sound_element').html("<embed src='" + this.NuestroHost + "libre/publicidad/sounds/" + this.publicidadsound + ".mp3" + "' hidden=true autostart=true loop=false>");
2374				var lightsaber = $("#soundfx #swoosh")[0];
2375				lightsaber.play();
2376			}
2377		}
2378
2379		$("#publicidad_wallpaper_center").stop();
2380		$("#btnclosepub").stop();
2381		$("#btnexpandpub").stop();
2382		if (typeof _TemaEspecialHeader !== 'undefined') {
2383			if (_TemaEspecialHeader && this.EsPortadaHome())
2384				$("#publicidad_wallpaper_center").animate({ "height": "430" }, { duration: 400 });
2385			else
2386				$("#publicidad_wallpaper_center").animate({ "height": "400" }, { duration: 400 });
2387		}
2388		else
2389			$("#publicidad_wallpaper_center").animate({ "height": "400" }, { duration: 400 });
2390		$("#btnclosepub").fadeIn('slow');
2391		$("#btnexpandpub").fadeOut('slow');
2392	} catch (ex) { }
2393}
2394
2395GRFunc.prototype.ContraeEspecialExp = function() {
2396	try {
2397
2398		if (typeof _TemaEspecialHeader !== 'undefined') {
2399			if (_TemaEspecialHeader && this.EsPortadaHome())
2400				if ($('#sound_element').length > 0) {
2401				if (typeof _AudioEspecialHeader !== 'undefined') {
2402					this.publicidadsound = _AudioEspecialHeader
2403				}
2404				$('#sound_element').empty();
2405				$('#sound_element').html("<embed src='" + this.NuestroHost + "libre/publicidad/sounds/" + this.publicidadsound + ".mp3" + "' hidden=true autostart=true loop=false>");
2406				var lightsaber = $("#soundfx #swoosh")[0];
2407				lightsaber.play();
2408			}
2409		}
2410
2411		$("#publicidad_wallpaper_center").stop();
2412		$("#btnclosepub").stop();
2413		$("#btnexpandpub").stop();
2414		if (typeof _TemaEspecialHeader !== 'undefined') {
2415			if (_TemaEspecialHeader && this.EsPortadaHome())
2416				$("#publicidad_wallpaper_center").animate({ "height": "90" }, { duration: 400 });
2417			else
2418				$("#publicidad_wallpaper_center").animate({ "height": "60" }, { duration: 400 });
2419		}
2420		else
2421			$("#publicidad_wallpaper_center").animate({ "height": "60" }, { duration: 400 });
2422		$("#btnclosepub").fadeOut('slow');
2423		$("#btnexpandpub").fadeIn('slow');
2424	} catch (ex) { }
2425}
2426
2427GRFunc.prototype.ObtieneNombreSitio = function() {
2428	if (this.IdProducto != undefined && this.IdProducto != null) {
2429		var sitepage = '';
2430		switch (this.IdProducto) {
2431			case 1: sitepage = 'canchacom'; break;
2432			case 2: sitepage = 'elnorte'; break;
2433			case 3: sitepage = 'reforma'; break;
2434			case 4: sitepage = 'negocioscom'; break;
2435			case 5: sitepage = 'mural'; break;
2436		}
2437		return sitepage;
2438	}
2439}
2440
2441GRFunc.prototype.LigaBuscadorCOM = function() {
2442	if (this.IdProducto != undefined && this.IdProducto != null) {
2443		var pagbusqueda = "BusquedasComs.aspx";
2444		var sitePcob = 'reforma';
2445		switch (this.IdProducto) {
2446			case 2: sitePcob = 'elnorte/'; break;
2447			case 3: sitePcob = 'reforma/'; break;
2448			case 5: sitePcob = 'mural/'; break;
2449		}
2450		//http://busquedas.gruporeforma.com/elnorte/Pages/Buscaimpresa.aspx
2451		//document.buscador.texto.value = this.caractEspec(document.buscador.texto.value);
2452		//document.buscador.q.value = document.buscador.strbusqueda.value;
2453		//document.buscador.idcatalogo.value = zona;
2454		document.buscadorheader.method = "POST";
2455		document.buscadorheader.target = "_top";
2456		document.buscadorheader.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/' + sitePcob + pagbusqueda;
2457	}
2458}
2459
2460GRFunc.prototype.LigaBuscadorMultimedia = function() {
2461	if (this.IdProducto != undefined && this.IdProducto != null) {
2462		var pagbusqueda = "BusquedasComs.aspx";
2463		var sitePcob = 'reforma';
2464		switch (this.IdProducto) {
2465			case 2: sitePcob = 'elnorte/'; break;
2466			case 3: sitePcob = 'reforma/'; break;
2467			case 5: sitePcob = 'mural/'; break;
2468		}
2469		document.buscadorMultimedia.method = "POST";
2470		document.buscadorMultimedia.target = "_top";
2471		document.buscadorMultimedia.action = this.grConfig.Protocol + '//busquedas.gruporeforma.com/' + sitePcob + pagbusqueda;
2472	}
2473}
2474
2475GRFunc.prototype.CreaDivAlertaWeb = function(titulo, resumen, id) {
2476	var tituloEncoded = escape(titulo);
2477	var resumenEncoded = escape(resumen);
2478	var divAlerta = '';
2479	divAlerta += '<div id="alertaweb">';
2480	divAlerta += '<div class="ics">
2480<a onclick="grFunc.CompartirNuevo(\'' + this.NuestroHost + 'libre/ultimahora.aspx?id=' + id + '\', 2,\'' + tituloEncoded + '\');"><img src="libre/imgdiseno/alertas/icAlerta_facebook.png" width="34" height="25" /></a></div>';
2481	divAlerta += '<div class="ics"><a onclick="grFunc.CompartirNuevo(\'' + this.NuestroHost + '\', 1,\'' + resumenEncoded + '\');"><img src="libre/imgdiseno/alertas/icAlerta_twitter.png" width="34" height="25" /></a></div>';
2482	divAlerta += '<div class="pleca"></div>';
2483	divAlerta += '<div class="texto"><h2>' + titulo + '</h2></div>';
2484	divAlerta += '<div class="texto"><p>' + resumen + '</p></div>';
2485	divAlerta += '</div>';
2486	return divAlerta;
2487}
2488
2489GRFunc.prototype.CreaDivTickerWeb = function(titulo, resumen, id) {
2490	var tituloEncoded = escape(titulo);
2491	var resumenEncoded = escape(resumen);
2492	var divTicker = '';
2493	divTicker += '<div id="ticker">';
2494	divTicker += '<div class="ics"><a onclick="grFunc.CompartirNuevo(\'' + this.NuestroHost + 'libre/ultimahora.aspx?id=' + id + '\', 2,\'' + tituloEncoded + '\');"><img src="libre/imgdiseno/alertas/icAlerta_facebook.png" width="34" height="25" /></a></div>';
2495	divTicker += '<div class="ics"><a onclick="grFunc.CompartirNuevo(\'' + this.NuestroHost + '\', 1,\'' + resumenEncoded + '\');"><img src="libre/imgdiseno/alertas/icAlerta_twitter.png" width="34" height="25" /></a></div>';
2496	divTicker += '<div class="pleca"></div>';
2497	divTicker += '<div class="texto"><h2>' + titulo + '</h2></div>';
2498	divTicker += '<div class="texto"><p>' + resumen + '</p></div>';
2499	divTicker += '</div>';
2500	return divTicker;
2501}
2502
2503GRFunc.prototype.DisplayAlertaWeb = function(tipo, titulo, resumen, id, fecha) {
2504	try {
2505		var divEnvioAlertaWeb = $('#divEnvioAlertaWeb');
2506		if (divEnvioAlertaWeb != undefined) {
2507			if (tipo == 0)
2508				$('#divEnvioAlertaWeb').append(this.CreaDivAlertaWeb(titulo, resumen, id));
2509			else {
2510				$('#divEnvioAlertaWeb').append(this.CreaDivTickerWeb(titulo, resumen, id));
2511			}
2512		}
2513	} catch (ex) { }
2514}
2515GRFunc.prototype.GetParameterByName = function(name) {
2516	name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
2517	var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
2518            results = regex.exec(location.search);
2519	return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
2520}
2521GRFunc.prototype.IsMobileSafariIphone = function() {
2522	return navigator.userAgent.match(/(iPod|iPhone)/) && navigator.userAgent.match(/AppleWebKit/)
2523}
2524GRFunc.prototype.RedirectCookie = function() {
2525	var referer = document.referrer;
2526	var res = referer.split("refor.ma");
2527	//si es una página de paso asigna cookie
2528	if (this.EsPaginaDePaso(window.location.href)) {
2529		if (valorCookie == "" && this.IsMobileSafariIphone() && (res.length <= 0)) {
2530			window.location = location.protocol + "//refor.ma/stats/redirect.aspx?referer=" + encodeURIComponent(referer);
2531		}
2532		else {
2533			document.getElementById('iframeReferer').src = location.protocol + "//refor.ma/stats/default.aspx?referer=" + encodeURIComponent(referer);
2534		}
2535	}
2536}
2537GRFunc.prototype.EsPaginaDePaso = function(pagina) {
2538	if (pagina.toLowerCase().indexOf("galeriamultimedia/default.aspx") > -1)
2539		return true
2540	else if (pagina.toLowerCase().indexOf("visormultimedia/default.aspx") > -1)
2541		return true
2542	else
2543		return false
2544}
2545GRFunc.prototype.EsPortadaHome = function() {
2546	try {
2547		if ((window.location.href.toLowerCase() == grFunc.NuestroHost.toLowerCase())
2548                    || (window.location.href.toLowerCase() == grFunc.NuestroHost.toLowerCase() + 'default.htm')
2549                    || (window.location.href.toLowerCase() == grFunc.NuestroHost.toLowerCase() + 'dummy.htm')
2550                    || (window.location.href.toLowerCase() == grFunc.NuestroHost.toLowerCase() + 'pruebasw2.htm'))
2551			return true;
2552		return false;
2553	} catch (e) { return false; }
2554}
2555
2556GRFunc.prototype.PermiteFullScreen = function() {
2557	if (document.location.href.indexOf("libre/players") < 0 &&
2558				document.location.href.indexOf("p/p.aspx") < 0) {
2559		$(document).ready(function() {
2560			var iframes = document.getElementsByTagName('iframe'), ifr, i = 0, id = null;
2561			while (ifr = iframes[i++]) {
2562				if (ifr.id) {
2563					id = "#" + ifr.id;
2564					$(id).attr("allowfullscreen", "");
2565				}
2566			}
2567		});
2568	}
2569}
2570
2571function abrir(tipo, url) {
2572	try {
2573		if (url.toString().indexOf("cancha") > -1 || url.toString().indexOf("negocios") > -1) {
2574			window.top.location.href = url;
2575			return;
2576		}
2577		if (window.parent != window.self)
2578			window.parent.window.grFunc.AbrirPagina(tipo, url, 0, 0, true);
2579		else
2580			window.grFunc.AbrirPagina(tipo, url, 0, 0, true);
2581	}
2582	catch (ex) {
2583		window.location.href = url;
2584	}
2585}
2586
2587function cerrarModal() {
2588	try {
2589		window.parent.window.grFunc.CerrarGaleria();
2590	} catch (e) { }
2591
2592}
2593function cerrar() {
2594	if (document.location.href.indexOf("&pxs=1") > -1) {
2595		document.location = grFunc.NuestroHost;
2596	} else {
2597		if (document.referrer.indexOf("elnorte") > -1 || document.referrer.indexOf("reforma") > -1 || document.referrer.indexOf("mural") > -1) {
2598			window.history.back();
2599		}
2600		else
2601			document.location = grFunc.NuestroHost;
2602	}
2603}
2604
2605function abrironclick(url, tipo, idelemento, esOpinion) {
2606	try {
2607		var urlAux = url;
2608		urlAux = urlAux.toLowerCase();
2609		if ((urlAux.indexOf("http") > -1 && urlAux.indexOf(grFunc.NuestroHost) > -1) || urlAux.indexOf("/escuchalo") > -1) {
2610			tipo = 'modal'
2611		} else {
2612			tipo = 'normal'
2613		}
2614		if (window.location.href.indexOf("cobertura") > -1) tipo = 'normal'
2615		//cambio para que artículos, fotogalerías y galerías multimedias no se abran en modal, agarra urlAux para no afectar parametros de url
2616		if (tipo == 'modal' && (urlAux.search(/\/(ar|fg|vg|op|ca)\d+($|\?|\&)/i) > -1 || urlAux.search(/\/(articulo|fotogaleria|galeriamultimedia|visormultimedia|editoriales|grafico|interactivo)/i) > -1)) {
2617			tipo = 'normal'
2618		}
2619		var atributoOnclick = $(idelemento).attr("onclick");
2620		if (atributoOnclick == "undefined" || atributoOnclick == undefined) {
2621			$(idelemento).click(function(event) {
2622				if (event.preventDefault) {
2623					event.preventDefault();
2624				} else {
2625					event.returnValue = false;
2626				}
2627				if (tipo != 'modal') {
2628					if (!esOpinion) {
2629						window.grFunc.AbrirPagina(tipo, url);
2630					} else {
2631						if (window.parent != window.self) window.parent.window.grFunc.AbrirPagina(tipo, url, 0, 0, true);
2632						else window.grFunc.AbrirPagina(tipo, url, 0, 0, true);
2633					}
2634				} else {
2635					if (!esOpinion) {
2636						//if (window.parent != window.self)
2637						//  window.parent.window.grFunc.AbrirPagina(tipo, url, 0, 0, true);
2638						//else
2639						//  window.grFunc.AbrirPagina(tipo, url, 0, 0, true);
2640						window.grFunc.AbrirPagina(tipo, url, 0, 0, true);
2641					} else {
2642						if (url.toString().indexOf("cancha") > -1 || url.toString().indexOf("negocios") > -1) {
2643							var descripcionPlaza = "";
2644							if (this.NuestroHost.indexOf("mural") > -1) {
2645								descripcionPlaza = "mural"
2646							} else if (this.NuestroHost.indexOf("elnorte") > -1) {
2647								descripcionPlaza = "elnorte"
2648							} else if (this.NuestroHost.indexOf("reforma") > -1) {
2649								descripcionPlaza = "reforma"
2650							}
2651							if (url.toString().indexOf("cancha") > -1) {
2652								url = url.replace("cancha", descripcionPlaza);
2653								if (url.indexOf("&.html#comart") > -1) {
2654									var agregacomentario = url.indexOf("&.html#comart");
2655									url = url.substr(0, agregacomentario) + "&po=1&.html#comart";
2656								} else {
2657									url = url + "&po=1";
2658								}
2659							} else {
2660								url = url.replace("negocios", descripcionPlaza);
2661								if (url.indexOf("&.html#comart") > -1) {
2662									var agregacomentario = url.indexOf("&.html#comart");
2663									url = url.substr(0, agregacomentario) + "&po=4&.html#comart";
2664								} else {
2665									url = url + "&po=4";
2666								}
2667							}
2668							window.top.location.href = url;
2669							//return;
2670						}
2671						if (window.parent != window.self) window.parent.window.grFunc.AbrirPagina("modal", url, 0, 0, true);
2672						else window.grFunc.AbrirPagina("modal", url, 0, 0, true);
2673					}
2674				}
2675				return false;
2676			});
2677		} else {
2678			$(idelemento).click(function(event) {
2679				if (event.preventDefault) {
2680					event.preventDefault();
2681				} else {
2682					event.returnValue = false;
2683				}
2684				return false;
2685			});
2686		}
2687	} catch (e) { }
2688}
2689
2690// CAMBIA TODOS LOS HREF POR ONCLICK
2691/*
2692$(window).on("load", function() {
2693	ReemplazaLigas();
2694})
2695function ReemplazaLigas() {
2696	// ARTICULOS,FOTOGALERIAS,GALERIASMM,SONDEO
2697	var collection = $(".ligaonclick");
2698	collection.each(function() {
2699		var br = "";
2700		if (location.pathname.indexOf("28dediciembre") != -1) {
2701			br = location.pathname.indexOf("?") != -1 ? "&br=1" : "?br=1";
2702		}
2703		abrironclick(this.href + br, 'modal', this)
2704	});
2705
2706	// TEST Y GRAFICO ANIMADO
2707	var collection = $(".ligaonclickpopup");
2708	collection.each(function() {
2709		abrironclick(this.href, 'popup', this)
2710	});
2711
2712	// OPINION
2713	var collectionopinion = $(".ligaopinion");
2714	collectionopinion.each(function() {
2715		abrironclick(this.href, 'modal', this, true)
2716	});
2717}
2718*/
2719
2720function getIEVersion() {
2721	var rv = -1; // Return value assumes failure.
2722	if (navigator.appName == 'Microsoft Internet Explorer') {
2723		var ua = navigator.userAgent;
2724		var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
2725		if (re.test(ua) != null)
2726			rv = parseFloat(RegExp.$1);
2727	}
2728	return rv;
2729}
2730//Este texto es solo para probar que cambió el archivo y no hace cache RRO 2026/08/24 17:26

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.