Se ha producido un error al procesar la plantilla.
Unable to find Velocity template with ID _TEMPLATE_CONTEXT_/109967/111471/20102/8808512
1#*  
2fl_LinNva_Pym-Aaa_Insert-OFERTA-FRONT.vm 
3 
4457073 
5<Texto dummy para cambiar si publicación falla>  
6*# 
7 
8## ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
9## Plantillas flujo - inicio 
10#parse ( "$templatesPath/8808512" )	## 000_fl_LineaNueva_Pyme_Bbb-IMG_CSS.vm 
11## Plantillas flujo - fin 
12## ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
13 
14#* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> *# 
15## Do nothing, flujo destino realiza todo 
16#parse ( "$templatesPath/398559" )	## fl_LinNva_Hog-Aaa_Insert-OFERTA.vm 
17#* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> *# 
Se ha producido un error al procesar la plantilla.
Unable to find Velocity template with ID _TEMPLATE_CONTEXT_/109967/111471/20102/5000880
1#* 
2**************************************************** 
3chat-watson.vm 
45018340 
5**************************************************** 
6*# 
7 
8#set ( $paramName						= 	"cl" ) 
9#set ( $paramValue						= 	$httpUtil.getParameter( $request.attributes.CURRENT_URL, $paramName, false ) ) 
10 
11#set($adv = "0") 
12 
13#parse ( "$templatesPath/5000880" )	## css-chat.vm 
14 
15## Obtener datos checaIP 
16##parse ( "$templatesPath/626216" )	## chat-dtsprov.vm 
17 
18#set($dom = "https://chat.telmex.com/") 
19#if ( $request.server-name == "telmexstg.telmex.com" ) 
20	#set($adv = "1") 
21    ##set($dom = "https://10.105.124.3") 
22#end 
23 
24#set($tema_ay = $tema_ayuda_wt.getData()) 
25#set($perfil = $prf_wt.getData()) 
26 
27#set($notif_tit = $campos_notificacion.titulo.getData()) 
28#set($notif_msg = $campos_notificacion.mensaje.getData()) 
29#set($notif_btn_si = $campos_notificacion.btn_si.getData()) 
30#set($notif_btn_no = $campos_notificacion.btn_no.getData()) 
31 
32<script src="$dom/watson-user-interface/public/chat-telmex/js/functions-ui.min.js"></script> 
33<script>  
34function encok(nam,ac){var tmxUT={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",tmxUTE:function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=tmxUT._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2))enc3=enc4=64;else if(isNaN(chr3))enc4=64;output=output+this._keyStr.charAt(enc1)+ 
35	    this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4)}return output},tmxUTD:function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output= 
36	    output+String.fromCharCode(chr1);if(enc3!=64)output=output+String.fromCharCode(chr2);if(enc4!=64)output=output+String.fromCharCode(chr3)}output=tmxUT._utf8_decode(output);return output},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128)utftext+=String.fromCharCode(c);else if(c>127&&c<2048){utftext+=String.fromCharCode(c>>6|192);utftext+=String.fromCharCode(c&63|128)}else{utftext+=String.fromCharCode(c>> 
37	    12|224);utftext+=String.fromCharCode(c>>6&63|128);utftext+=String.fromCharCode(c&63|128)}}return utftext},_utf8_decode:function(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++}else if(c>191&&c<224){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode((c&31)<<6|c2&63);i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63);i+=3}}return string}}; 
38	    switch(ac){case "d":nam=tmxUT.tmxUTD(nam);break;case "e":nam=tmxUT.tmxUTE(nam);break}return nam}; 
39 
40function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end))}}return null}; 
41 
42function cookieValida(nomCookie){ 
43    var exist = getCookie(nomCookie); 
44 
45	if(exist == null || exist == "null") return false; 
46	else return true; 
47}; 
48 
49var paqs = []; 
50var path_ini            =   "/web/hogar/conexion-a-internet"; 
51var path_ubicacion      =   "/web/contrata/hogar-lineas-nuevas-domicilio"; 
52var path_oferta         =   "/web/contrata/hogar-lineas-nuevas-oferta"; 
53var path_datos          =   "/web/contrata/hogar-lineas-nuevas-datos"; 
54var path_confirma       =   "/web/contrata/hogar-lineas-nuevas-confirma"; 
55var path_comprobante    =   "/web/contrata/hogar-lineas-nuevas-comprobante"; 
56#* path para Upsell *# 
57var path_us_ini         =   "/web/hogar/aumenta-tu-velocidad"; 
58var path_us_valida      =   "/hogar-upsell-valida"; 
59var path_us_oferta      =   "/hogar-upsell-oferta"; 
60var path_us_confirma    =   "/hogar-upsell-comprobante"; 
61var path_us_comprobante =   "/hogar-upsell-confirma"; 
62 
63#* path para Portabilidad 04-06-19 *# 
64var path_pt_datos       =   "/web/contrata/hogar-lineas-portabilidad-datos"; 
65var path_pt_domicilio   =   "/web/contrata/hogar-lineas-portabilidad-domicilio"; 
66var path_pt_oferta      =   "/web/contrata/hogar-lineas-portabilidad-oferta"; 
67var path_pt_confirma    =   "/web/contrata/hogar-lineas-portabilidad-confirma"; 
68var path_pt_comp        =   "/web/contrata/hogar-lineas-portabilidad-comprobante"; 
69var path_pt_comp_error  =   "/web/contrata/hogar-lineas-portabilidad-comprobante-error"; 
70 
71#* path para Pyme 13-06-2019 *# 
72var path_py_domicilio = "/web/contrata/pyme-lineas-nuevas-domicilio"; 
73var path_py_oferta = "/web/contrata/pyme-lineas-nuevas-oferta"; 
74var path_py_datos = "/web/contrata/pyme-lineas-nuevas-datos"; 
75var path_py_confirma = "/web/contrata/pyme-lineas-nuevas-confirma"; 
76var path_py_comp_ok = "/web/contrata/pyme-lineas-nuevas-comprobante"; 
77var path_py_comp_error = "/web/contrata/pyme-lineas-nuevas-comprobante-error"; 
78 
79#* path para citas 18-06-2019 *# 
80var path_citas_val = "/web/contrata/hogar-citas-telmex-valida"; 
81 
82var tema_ayuda = "$tema_ay"; 
83var client_profile = "$perfil"; 
84var nom_form = "conexion-internet"; 
85var namD = ""; 
86(cookieValida('_nam'))?namD=encok(getCookie('_nam'), 'd'):namD = ""; 
87var telD = ""; 
88(cookieValida('_tel'))?telD=encok(getCookie('_tel'), 'd'):telD = ""; 
89 
90var config = {}; 
91var chat = new UiChat(config); 
92var ul = ""; 
93var st_cnv = "0"; 
94var ini_ntf, crr_ntf, armarJson; 
95 
96## ARREGLO CON POSIBLES CANALES 
97var chns = ["messenger", "panelcloud", "mitelmex", "apptelmex", "sms", "mail"]; 
98 
99## VALIDAR PARÁMETROS 
100var paramstr = window.location.search.substr(1); 
101var paramarr = paramstr.split ("&"); 
102var params = {}; 
103for ( var i = 0; i < paramarr.length; i++) { 
104    var tmparr = paramarr[i].split("="); 
105    params[tmparr[0]] = tmparr[1]; 
106
107var chn = params['channel']; 
108## FIN VALIDAR 
109 
110$(document).ready(function (idform) { 
111    var $teaserbox1 = $("#chat-teaser-box"); 
112	var answerTimeout; 
113	 
114	if($teaserbox1.size()) { 
115		#* utility functions 
116		*prod  http://tmkc115.tecmarketing.com/website/general/chatgeneral.jsp 
117		*http://chat.clientesweb.net/GeneralChat/chat.html? 
118		*PRE   http://fisheye.enlaweb.info/ChatTelmex/chat.html 
119		*local chat.html*# 
120		 
121		## init variables 
122		var $iframe = $('#chat-popup-box .popup-body iframe'); 
123		var $form = $teaserbox1.find('#chat_dis'); 
124		var url_chat_tecmarketing = (location.search === "?real") 
125			? $form.attr('action') 
126			: "http://tmkc115.tecmarketing.com/website/general/chatgeneral.jsp"; 
127		 
128		$form 
129			.html5Inputs() 
130			.attr('action', url_chat_tecmarketing); 
131		 
132		var validaChatActivo = function() { 
133    		if ($("#chat-container").length > 0) { 
134				$("#chat-container").show(); 
135    		    if($("#chat-container").is(":visible")) { 
136        		    $(".burb").removeClass("mostrar"); 
137            		$(".burb").addClass("ocultar"); 
138            		clearTimeout(ini_ntf); 
139        	    } else { 
140					if ($("#chat-popup-box").length > 0) { 
141						if($("#chat-popup-box").is(":visible")) { 
142							$(".burb").removeClass("mostrar"); 
143							$(".burb").addClass("ocultar"); 
144							clearTimeout(ini_ntf); 
145						} else { 
146							$(".burb").removeClass("ocultar"); 
147							$(".burb").addClass("mostrar"); 
148
149
150
151        	} else if ($("#chat-popup-box").length > 0) { 
152				if($("#chat-popup-box").is(":visible")) { 
153					$(".burb").removeClass("mostrar"); 
154					$(".burb").addClass("ocultar"); 
155					clearTimeout(ini_ntf); 
156				} else { 
157					$(".burb").removeClass("ocultar"); 
158					$(".burb").addClass("mostrar"); 
159
160
161
162		 
163		$('html').click(function(e) { 
164			e.stopPropagation(); 
165			if($teaserbox1.find('.disc').hasClass("abrir")) { 
166				cerrarDisc(400); 
167
168		}); 
169
170	 
171	var paquetesMostrados = function() { 
172        var pqts = []; 
173        var zona = obPF.fnIget('mapa_dir_localidad'); 
174    	var terminal = obPF.fnIget('obterm_terminal'); 
175    	var distritoEnd = obPF.fnIget('obterm_distritoEnd'); 
176    	## PAQUETES 
177    	pqts[0] = {"nombre_pqt":"pqt289", "item": "PQI40", "mostrado": "NO"}; 
178    	pqts[1] = {"nombre_pqt":"pqt389", "item": "INF19", "mostrado": "SI"}; 
179    	pqts[2] = {"nombre_pqt":"pqt499", "item": "IFVA4", "mostrado": "SI"}; 
180    	pqts[3] = {"nombre_pqt":"pqt599", "item": "PQI32", "mostrado": "SI"}; 
181    	pqts[4] = {"nombre_pqt":"pqt999", "item": "PQI25", "mostrado": "SI"}; 
182    	pqts[5] = {"nombre_pqt":"pqt1499", "item": "PQI39", "mostrado": "SI"}; 
183    	 
184    	#*var a1 =  [ 
185    		"Zamora Michoacán", 
186    		"Ciudad Obregon Sonora", 
187    		"Hermosillo Sonora", 
188    		"Los Mochis, Sinaloa", 
189    		"Nogales, Chihuahua", 
190
191    	*var zona =  ciudad + " " + region; 
192    	var a = a1.indexOf(zona); 
193    	*console.log('a: '+a); 
194    	if (a >= 0) { 
195    		* muestra 289 y 599 
196			* colocar 289, quitar 389 y 499 
197    		pqts[0].mostrado="SI"; 
198    		pqts[1].mostrado="NO"; 
199    		pqts[2].mostrado="NO"; 
200
201 
202    	var a2 =  [ 
203    		"Toluca", 
204    		"Torreón Coahuila", 
205    		"Leon Guanajuato", 
206    		"Guadalajara", 
207    		"Chihuahua Chihuahua", 
208    		"Puebla Puebla", 
209    		"Jalapa Veracruz", 
210    		"Veracruz Veracruz", 
211
212    	var b = a2.indexOf(zona); 
213    	*console.log('b:' + b); 
214    	if (b >= 0) { 
215    		* Solo muestra 599 
216			* quitar 389 y 499 
217    		pqts[1].mostrado="NO"; 
218    		pqts[2].mostrado="NO"; 
219
220    	 
221    	if (terminal == ""){ 
222    		pqts[4].mostrado="NO"; 
223    		pqts[5].mostrado="NO"; 
224    	}*# 
225    	 
226    	if (distritoEnd != "FO") { 
227    		pqts[3].mostrado="NO"; 
228    		pqts[4].mostrado="NO"; 
229    		pqts[5].mostrado="NO"; 
230
231    	#*console.log('pqts mostrados'); 
232    	*console.log(pqts);*# 
233    	return pqts; 
234    }; 
235     
236    switch(document.location.pathname) { 
237		case path_ini: 
238			tema_ayuda = "residencial_inicio"; 
239			nom_form = "conexion-internet"; 
240			break; 
241		case path_ubicacion: 
242			tema_ayuda = "residencial_ubicacion"; 
243			nom_form = "v3_Form_form"; 
244			break; 
245		case path_oferta: 
246			tema_ayuda = "residencial_oferta"; 
247			nom_form = "form_checks"; 
248			break; 
249		case path_datos: 
250			tema_ayuda = "residencial_datosContacto"; 
251			nom_form = "v3_Form_form"; 
252			break; 
253		case path_confirma: 
254			tema_ayuda = "residencial_confirmacion"; 
255			nom_form = "confirma"; 
256			break; 
257		case path_comprobante: 
258			tema_ayuda = "residencial_comprobante"; 
259			nom_form = "comprobante"; 
260			break; 
261		case path_us_ini: case path_us_valida: case path_us_oferta: case path_us_confirma: case path_us_comprobante: 
262			tema_ayuda = "residencial_upsell"; 
263			nom_form = "v3_Form_form"; 
264			break; 
265		 
266		case path_pt_datos: 
267		    tema_ayuda = "portabilidad_res_datos"; 
268			nom_form = "v3_Form_form"; 
269		    break; 
270		case path_pt_domicilio: 
271		    tema_ayuda = "portabilidad_res_domicilio"; 
272			nom_form = "v3_Form_form"; 
273		    break; 
274		case path_pt_oferta: 
275		    tema_ayuda = "portabilidad_res_oferta"; 
276			nom_form = "v3_Form_form"; 
277		    break; 
278		case path_pt_confirma: 
279		    tema_ayuda = "portabilidad_res_confirma"; 
280			nom_form = "v3_Form_form"; 
281		    break; 
282		case path_pt_comp: 
283		    tema_ayuda = "portabilidad_res_comprobante_ok"; 
284			nom_form = "v3_Form_form"; 
285		    break; 
286		case path_pt_comp_error: 
287		    tema_ayuda = "portabilidad_res_comprobante_error"; 
288			nom_form = "v3_Form_form"; 
289		    break; 
290		case path_py_domicilio: 
291		    tema_ayuda = "comercial_domicilio"; 
292			nom_form = "v3_Form_form"; 
293		    break; 
294		case path_py_oferta: 
295		    tema_ayuda = "comercial_oferta"; 
296			nom_form = "v3_Form_form"; 
297		    break; 
298		case path_py_datos: 
299		    tema_ayuda = "comercial_datos"; 
300			nom_form = "v3_Form_form"; 
301		    break; 
302		case path_py_confirma: 
303		    tema_ayuda = "comercial_confirma"; 
304			nom_form = "v3_Form_form"; 
305		    break; 
306		case path_py_comp_ok: 
307		    tema_ayuda = "comercial_comprobante"; 
308			nom_form = "v3_Form_form"; 
309		    break; 
310		case path_py_comp_error: 
311		    tema_ayuda = "comercial_comprobante_error"; 
312			nom_form = "v3_Form_form"; 
313		    break; 
314		case path_citas_val: 
315		    tema_ayuda = "seginstal_valida"; 
316			nom_form = "v3_Form_form"; 
317		    break; 
318
319 
320    ## Generar Json que se manda a Watson 
321	armarJson = function (idform) { 
322		var attrsArray=[]; 
323 
324	    var security_context={}; 
325	    security_context['telefono']=telD; 
326	    security_context['nombre']=namD; 
327        security_context['tema_ayuda']=tema_ayuda; 
328		security_context['tema_select']=""; 
329	    security_context['session_id_interact']='12D46D367B6B42898C94B37AA796DCEE'; 
330		security_context['start_conversation']=st_cnv; 
331		security_context['os_name']=OSName; 
332		security_context['browser']=browser; 
333		security_context['browser_version']=browVersion; 
334		 
335		if(cookieValida('_pvci')) security_context['prv']=encok(getCookie("_pvci"), "d"); 
336		if(cookieValida('prv_a')) security_context['prv_a']=encok(getCookie("_pvcia"), "d"); 
337 
338	    var channel={}; 
339	    channel['channel_type']='telmexcom'; 
340		channel['client_profile']=client_profile; 
341		if(chn!=undefined && chn!="" && jQuery.inArray(chn, chns)>=0) channel['channel_redirected']=chn; 
342	     
343		 
344	    var communication_context={}; 
345	    communication_context['channel']=channel; 
346	    communication_context['tema_url']=document.location.origin+document.location.pathname; 
347	    communication_context['nombre_form']=''; 
348	    communication_context['nombre_campo_form']=''; 
349	    $("#"+idform+" input").each(function(index) { 
350	        if (!$(this).is(':button')) 
351	            if($(this).is(':checkbox')) { 
352	                if ($('#'+$(this).attr("id")).is(':checked')) 
353	                    attrsArray.push(createAttCampo($(this).attr("name"), $(this).val())); 
354	           } else attrsArray.push(createAttCampo($(this).attr("name"), $(this).val())); 
355	 
356	    }); 
357	 
358	    if(idform=='form_checks') { 
359			var paqSlc = ""; 
360			$("#paquetes input:radio[name=precio_base]").each(function(index) { 
361		    	if($(this).is(':checked')) paqSlc = $(this).val(); 
362		    }); 
363			if($("#telefonia").is(':checked') && $("#internet").is(':checked'))  { 
364			    paqs = []; 
365				paqs = paquetesMostrados(); 
366			} else if ($("#telefonia").is(':checked')) { 
367			    paqs = []; 
368				paqs[0] = {"nombre_pqt":"LINEA", "item": "LINEA", "mostrado": "SI"}; 
369			} else if($("#internet").is(':checked')) { 
370			    paqs = []; 
371				paqs[0] = {"nombre_pqt":"pqt349", "item": "PFR39", "mostrado": "SI"}; 
372				paqs[1] = {"nombre_pqt":"pqt499", "item": "PFR34", "mostrado": "SI"}; 
373				paqs[2] = {"nombre_pqt":"pqt649", "item": "PFR18", "mostrado": "SI"}; 
374				paqs[3] = {"nombre_pqt":"pqt899", "item": "PFR56", "mostrado": "SI"}; 
375
376			$(paqs).each(function(_index){ 
377				if(paqs[_index].mostrado=="SI") { 
378					if(paqs[_index].item == paqSlc) attrsArray.push(createAttCampo("paquete_seleccionado", paqs[_index].item)); 
379					else attrsArray.push(createAttCampo("paquete_mostrado", paqs[_index].item)); 
380
381			}); 
382
383	     
384	    if(idform=='form_checks_neg') { 
385			var paqSlc = ""; 
386			$("#paquetes input:radio[name=precio_base]").each(function(index) { 
387		    	if($(this).is(':checked')) paqSlc = $(this).val(); 
388		    }); 
389            paqs[0] = {"nombre_pqt":"pqt399", "item": "PQI37", "mostrado": "SI"}; 
390			paqs[1] = {"nombre_pqt":"pqt549", "item": "PQI35", "mostrado": "SI"}; 
391			paqs[2] = {"nombre_pqt":"pqt799", "item": "PQI33", "mostrado": "SI"}; 
392			paqs[3] = {"nombre_pqt":"pqt1499", "item": "PQI26", "mostrado": "SI"}; 
393			paqs[4] = {"nombre_pqt":"pqt1789", "item": "PQI28", "mostrado": "SI"}; 
394			paqs[5] = {"nombre_pqt":"pqt2289", "item": "PQI29", "mostrado": "SI"}; 
395			$(paqs).each(function(_index){ 
396				if(paqs[_index].mostrado=="SI") { 
397					if(paqs[_index].item == paqSlc) attrsArray.push(createAttCampo("paquete_seleccionado", paqs[_index].item)); 
398					else attrsArray.push(createAttCampo("paquete_mostrado", paqs[_index].item)); 
399
400			}); 
401
402	     
403	    attrsArray.push(createAttCampo("ultimo_campo_visitado", ul)); 
404        communication_context['campos_form']=attrsArray; 
405	    var watsonPar ={'question_user':'','security_context':security_context,'communication_context':communication_context}; 
406		if ('${adv}' == "1") console.info(watsonPar);   
407	    return watsonPar; 
408	}; 
409 
410	$("#v3_Form_form").find(':input').focus(function() { 
411		ul=this.name; 
412	}); 
413	$("#v3_Form_form").find('select').focus(function() { 
414		ul=this.name; 
415	}); 
416	$("#v3_Form_form").find('textarea').focus(function() { 
417		ul=this.name; 
418	}); 
419	 
420    #set($tiempo-abrir = $tiempo-proact.getData()) 
421	var abre_notif = function() { 
422		$('#notif-proact').fadeIn(500); 
423		crr_ntf = setTimeout(function() {cierra_notif();}, 30000); 
424
425	var cierra_notif = function() { 
426		$('#notif-proact').fadeOut(1500); 
427		##$('.burb:nth-of-type(1)').addClass('ocultar-notif'); 
428		st_cnv = "3"; 
429
430 
431	$('#notif-proact') 
432	.mouseenter(function() { 
433		$("#notif-proact").finish().fadeOut(0).fadeIn(0); 
434		$('.burb:nth-of-type(1)').removeClass('ocultar-notif'); 
435		$('.burb:nth-of-type(1)').addClass('mostrar-notif'); 
436		clearTimeout(crr_ntf); 
437	}) 
438	.mouseleave(function() { 
439		crr_ntf = setTimeout(function() {cierra_notif();}, 30000); 
440	}); 
441 
442	$(".img-canc-notif, #btn-notif-no").click(function(e){ 
443		e.stopPropagation(); 
444		$("#notif-proact").finish().fadeOut(500); 
445		##$('.burb:nth-of-type(1)').removeClass('mostrar-notif'); 
446		##$('.burb:nth-of-type(1)').addClass('ocultar-notif'); 
447		st_cnv = "2"; 
448	}); 
449	 
450	$('a').on('click', function(e){ 
451	     if($(this).attr('href') == "#chat"){ 
452	        e.preventDefault(); 
453	        e.stopPropagation(); 
454	        $('.burb').trigger('click'); 
455	     }  
456	}); 
457	 
458	$("#btn-notif-si").click(function(){ 
459		st_cnv = "1"; 
460	}); 
461	 
462	$(".burb, #btn-notif-si").click(function(e){ 
463		e.stopPropagation(); 
464		$("#notif-proact").finish().fadeOut(0); 
465		clearTimeout(ini_ntf); 
466		chat.startChat(armarJson(nom_form)); 
467		$('.burb:nth-of-type(1)').removeClass('mostrar-notif'); 
468		$('.burb:nth-of-type(1)').addClass('ocultar-notif'); 
469		validaChatActivo(); 
470	}); 
471 
472	$(".img-canc-disc").click(function(e){ 
473		e.stopPropagation(); 
474		cerrarDisc(400); 
475	}); 
476 
477	$("#contenido").click(function(e){ 
478		e.stopPropagation(); 
479	}); 
480	ini_ntf = setTimeout(function() {abre_notif();$('.burb:nth-of-type(1)').addClass('mostrar-notif');}, $tiempo-abrir*1000); 
481	validaChatActivo(); 
482}); 
483 
484#* Validar SO, navegador y versión *# 
485	window.OSName="Unknown OS"; 
486	if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows"; 
487	else if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS"; 
488	else if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX"; 
489	else if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux"; 
490 
491    var userAgent = navigator.userAgent || navigator.vendor || window.opera; 
492    if (/windows phone/i.test(userAgent)) OSName = "WindowsPhone"; 
493    if (/android/i.test(userAgent)) OSName = "Android"; 
494 
495	var IS_IPAD = navigator.userAgent.match(/iPad/i) != null; 
496	var IS_IPHONE = (navigator.userAgent.match(/iPhone/i) != null) || (navigator.userAgent.match(/iPod/i) != null); 
497	if (IS_IPAD) { 
498	  IS_IPHONE = false; 
499	  OSName = "iOSTablet"; 
500
501	if (IS_IPHONE) OSName = "iOSPhone"; 
502 
503##	console.info(OSName); 
504 
505##	console.info(navigator.userAgent); 
506	window.browser = "Unknown browser"; 
507	window.browVersion = "None"; 
508##	Validar IE 
509	if (navigator.userAgent.search("MSIE") >= 0) { 
510		browser = 'IE'; 
511		browVersion = navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")).split(';')[0].split(' ')[1];; 
512
513##	Validar Opera 
514	else if (navigator.userAgent.search("OPR") >= 0) { 
515		browser = 'Opera'; 
516		browVersion = navigator.userAgent.substring(navigator.userAgent.indexOf("OPR")).split('\/')[1]; 
517
518##	Validar Chrome 
519	else if (navigator.userAgent.search("Chrome") >= 0)  { 
520		browser = 'Chrome'; 
521		browVersion = navigator.userAgent.substring(navigator.userAgent.indexOf("Chrome")).split(' ')[0].split('\/')[1]; 
522
523##	Validar Safari 
524	else if (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) { 
525		browser = 'Safari'; 
526		browVersion = navigator.userAgent.substring(navigator.userAgent.indexOf("Version")).split(' ')[0].split('\/')[1]; 
527
528##	Validar Firefox  
529	else if (navigator.userAgent.search("Firefox") >= 0) { 
530		browser = 'Firefox'; 
531		browVersion = navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split('\/')[1]; 
532
533#*	 
534	Validar IE Edge 
535	else if (navigator.userAgent.search("rv:11.0") >= 0) browser = 'IE edge'; 
536*# 
537 
538##	console.info(browser); 
539##	console.info(browVersion); 
540 
541#* FUNCIÓN PARA MANDAR CONTEXT A WATSON *# 
542function fnCtxWtsR() { 
543##    console.info('enviarContext'); 
544##    chat.loadContext(armarJson('v3_Form_form')); 
545
546 
547##ARRAY GENERICO PARA TODOS LOS ATRIBUTOS DE LOS JSON 
548function createAttCampo(name, stringValue){ 
549	var attribute = {}; 
550	attribute['nombre_campo']=name; 
551	attribute['valor_campo']=stringValue; 
552	return attribute; 
553
554##more functions 
555function startChat(context) { 
556  if(!document.getElementById("frame")){ 
557    if(!document.getElementById("chat-container")){ 
558      var container = document.createElement("div"); 
559       container.id="chat-container"; 
560      document.getElementsByTagName('body')[0].appendChild(container); 
561
562 
563    createStyle(); 
564    var ifrm = document.createElement("iframe"); 
565    ifrm.setAttribute("src","$dom/watson-user-interface/public/chat-telmex/ui-chat.html"); 
566    ifrm.setAttribute("allowfullscreen","true"); 
567    ifrm.setAttribute("webkitallowfullscreen","true"); 
568    ifrm.setAttribute("mozallowfullscreen","true"); 
569    if(context){ 
570        ifrm.setAttribute("datacontext",context); 
571
572    ifrm.id="frame"; 
573    ifrm.className ="frame"; 
574    document.getElementById("chat-container").appendChild(ifrm); 
575 
576    createFrameMin(); 
577
578
579 
580function createStyle(){ 
581     var element = document.createElement('link'); 
582     element.type = 'text/css'; 
583     element.rel = 'stylesheet'; 
584     element.href = '$dom/watson-user-interface/public/chat-telmex/css/estilos-telmex-ui.css'; 
585     document.getElementsByTagName('head')[0].appendChild(element); 
586
587function createFrameMin(){ 
588    var ifrnMin = document.createElement("iframe"); 
589    ifrnMin.setAttribute("src", "$dom/watson-user-interface/public/chat-telmex/ui-chat-min.html"); 
590    ifrnMin.scrolling="no"; 
591    ifrnMin.id="frame-min"; 
592    ifrnMin.className  = "frame-min"; 
593    ifrnMin.style.display = 'none'; 
594    document.getElementById("chat-container").appendChild(ifrnMin); 
595    var someIframe = window.parent.document.getElementById("frame-min"); 
596
597</script> 
598 
599#if ($paramValue == "tlnr") 
600	<style> 
601		#chat-teaser-box{display: none;} 
602	</style> 
603#end 
604 
605<div id="chat-teaser-box" data-timein="10" data-pages=" Chat "> 
606	<div class="burb" data-notificacion="1" onclick="dataLayer.push({'event':'addevent','macro-page':'/chat/watson','event-value':'inicia_chat_watson_burbuja'})"></div> 
607	<div class="notif" id="notif-proact"> 
608		<img src="/documents/111471/127152/icon-cancel-notif.png/22b7fa0c-188e-7414-893f-de0e73692674?t=1537839386000" class="img-canc-notif" /> 
609		<div class="tit-notif">$notif_tit&nbsp;&nbsp;<img src="/documents/111471/127152/emj_hola.png/37e7620f-b3ea-1d6a-ebf8-fc016739cf9a?t=1537839442000" width="19" /></div> 
610		<div class="txt-notif">$notif_msg</div> 
611		<div class="btns-notif"><input type="button" value="$notif_btn_si" class="btn-notif btn-azul" id="btn-notif-si" onclick="dataLayer.push({'event':'addevent','macro-page':'/chat/discriminador','event-value':'boton_si'})"></div> 
612		<div class="btns-notif"><input type="button" value="$notif_btn_no" class="btn-notif" id="btn-notif-no" onclick="dataLayer.push({'event':'addevent','macro-page':'/chat/discriminador','event-value':'boton_no'})"></div> 
613	</div> 
614</div>