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 <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>
Se ha producido un error al procesar la plantilla.
Unable to find Velocity template with ID _TEMPLATE_CONTEXT_/109967/111471/20102/8765843
1#*
2fl_LineaPorta_Hogar_Aaa_Insert_DATOS.vm
3
4456950
5<Texto dummy para cambiar si publicación falla>
6*#
7
8#set ( $fl_PagEnFlujoDestino = "_FALSE" )
9
10## '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
11## Plantillas flujo - inicio
12#parse ( "$templatesPath/8765843" ) ## 000_fl_LineaPorta_Hogar_Bbb-IMG_CSS.vm
13## Plantillas flujo - fin
14## '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
15
16## Style - inicio
17## -------------------------------------------------------------------------------
18<style>
19 .v3_Flujo_Form_form_submit_result {
20 text-align: center;
21 }
22
23 #v3_Form_paso_s_01 {
24 display: block;
25 width: 450px;
26 margin: 0 auto;
27 }
28 .v3_Form_form_elem {
29 text-align: left;
30 border: 1px solid #e6e6e6 !important;
31 padding-top: 20px !important;
32 color: #55667A !important;
33 }
34
35 .v3_Form_titulo_gral {
36 font-family: 'Roboto Condensed',arial;
37 font-weight: lighter;
38 font-size: 2.5em;
39 line-height: 1.2em;
40
41 color: rgb(2, 118, 186);
42 }
43
44 .v3_Form_instruccion {
45 color: rgb(56, 68, 82);
46 line-height: 1em;
47 }
48
49 .v3_Form_form_elem_con_tip {
50 width: 100% !important;
51 }
52
53 .v3_Form_form_elem_tip {
54 position: absolute;
55 right: 32px;
56 top: 32px;
57 }
58
59 .v3_Form_form_elem_tip_content {
60 width: 300px;
61 }
62
63## tablet
64@media only screen and (min-width: 761px) and (max-width: 1090px) {
65
66}
67
68## movil
69@media only screen and (max-width: 760px) {
70
71 #v3_Form_paso_s_01 {
72 width: 100%;
73 }
74 .v3_Form {
75 margin-top: 40px;
76 }
77
78}
79
80</style>
81## Style - fin
82## -------------------------------------------------------------------------------
83
84<div class="v3_Form">
85<div class="v3_Form_content fullBox">
86<form name="v3_Form_form"
87 id="v3_Form_form"
88 method="POST" action=""
89>
90
91## resultado - inicio
92## -------------------------------------------------------------------------------
93
94<div class="v3_Flujo_Form_form_submit_result
95 v3_Form_hidden"
96 id="v3_Flujo_Form_form_submit_result"
97 >
98
99 <div class="v3_Flujo_Form_form_submit_result_content"
100 id="v3_Flujo_Form_form_submit_result_content"
101 >
102 </div> ## <div class="v3_Flujo_Form_form_submit_result_content"
103
104 <div class="v3_Form_section_spacer">
105
106 </div>
107
108</div> ## <div class="v3_Flujo_Form_form_submit_result v3_Form_hidden"
109
110## resultado - fin
111## -------------------------------------------------------------------------------
112
113## paso - inicio
114## ===============================================================================
115<div class="v3_Form_paso"
116 id="v3_Form_paso">
117<div class="v3_Form_paso_contenido">
118
119## paso - section - inicio
120## -------------------------------------------------------------------------------
121<div class="v3_Form_paso_s
122 v3_Form_paso_s_01"
123 id="v3_Form_paso_s_01">
124<div class="v3_Form_paso_s_contenido">
125
126 <div class="v3_Form_titulo_gral_s">
127 <div class="v3_Form_titulo_gral">
128 Realiza tu cambio a Telmex
129 </div>
130 </div>
131
132<br>
133
134<div class="v3_Form_instruccion_s">
135 <div class="v3_Form_instruccion">
136 Valida tu datos
137 </div>
138</div>
139
140
141
142#set ( $form_elem_label = "Teléfono a portar" )
143#set ( $form_elem_name = "porta_tel" )
144#set ( $form_elem_msg_error = "" )
145<div class="v3_Form_form_elem_s">
146 <div class="v3_Form_form_elem_s_cont">
147 <div class="v3_Form_form_elem_label"
148 id="v3_Form_form_elem_label_$form_elem_name">
149 $form_elem_label
150 </div>
151 <div class="v3_Form_form_elem_control">
152 <input type="text"
153 name="$form_elem_name" id="$form_elem_name"
154 title="$form_elem_label"
155 placeholder="Ej. 5566778899"
156 class="v3_Form_form_elem"
157 maxlength="10"
158 >
159 </div>
160 <div class="v3_Form_form_elem_msg_error"
161 id="v3_Form_form_elem_msg_error_$form_elem_name">
162 El teléfono debe ser de 10 dígitos
163 </div>
164 </div>
165</div>
166
167#set ( $porta_cia_list = [
168 [ "Axtel" ]
169 , [ "Cablemás" ]
170 , [ "Megacable" ]
171 , [ "Cablevisión" ]
172 , [ "Izzi" ]
173 , [ "Maxcom" ]
174 , [ "Cablevision Red" ]
175 , [ "Metrored" ]
176 , [ "Totalplay" ]
177 , [ "Alestra" ]
178 , [ "Cablecom" ]
179 , [ "Avantel" ]
180 , [ "GTM" ]
181 , [ "IP MATRIX" ]
182 , [ "PROTEL I-NEXT" ]
183 , [ "TV REY" ]
184 , [ "SERVNET" ]
185 , [ "MCM" ]
186 , [ "UC TELECOMUNICACIONES" ]
187 , [ "Otra" ]
188 ]
189)
190
191#set ( $form_elem_label = "Compañía actual" )
192#set ( $form_elem_name = "porta_cia" )
193#set ( $form_elem_msg_error = "" )
194<div class="v3_Form_form_elem_s">
195 <div class="v3_Form_form_elem_s_cont">
196 <div class="v3_Form_form_elem_label"
197 id="v3_Form_form_elem_label_$form_elem_name">
198 $form_elem_label
199 </div>
200 <div class="v3_Form_form_elem_control v3_Form_form_elem_control_select">
201 <select
202 name="$form_elem_name" id="$form_elem_name"
203 title="$form_elem_label"
204 placeholder="$form_elem_label"
205 class="v3_Form_form_elem"
206 >
207 <option value=""></option>
208 #set ( $contSubItemList = "" )
209 #set ( $contSubItemList = $porta_cia_list )
210
211 #foreach ( $contSubItem in $contSubItemList )
212
213 <option value="$contSubItem.get( 0 )">$contSubItem.get( 0 )</option>
214
215 #end ## end foreach
216 </select>
217
218 ##Aca colocamos el nuevo text area al seleccionar otra
219 <div id="otra_cia_ext"
220 class="v3_Form_hidden"
221 >
222 Otra compañia
223 <input type="text"
224 name="porta_cia_otra" id="otra"
225 title="porta_cia_otra"
226 class="v3_Form_form_elem"
227 maxlength="30"
228 >
229 </div>
230 ##Termina el nuevo text area otra
231
232 </div>
233 <div class="v3_Form_form_elem_msg_error"
234 id="v3_Form_form_elem_msg_error_$form_elem_name">
235 </div>
236 </div>
237</div>
238
239<div class="v3_Form_instruccion_s">
240 <div class="v3_Form_instruccion">
241 Ingresa tus datos de contacto
242 </div>
243</div>
244
245#set ( $form_elem_label = "Nombre(s)" )
246#set ( $form_elem_name = "nombre" )
247#set ( $form_elem_msg_error = "" )
248<div class="v3_Form_form_elem_s v3_Form_form_elem_s_full">
249 <div class="v3_Form_form_elem_s_cont">
250 <div class="v3_Form_form_elem_label"
251 id="v3_Form_form_elem_label_$form_elem_name">
252 $form_elem_label
253 </div>
254 <div class="v3_Form_form_elem_control">
255 <input type="text"
256 name="$form_elem_name" id="$form_elem_name"
257 title="$form_elem_label"
258 class="v3_Form_form_elem"
259 maxlength="30"
260 >
261 </div>
262 <div class="v3_Form_form_elem_msg_error"
263 id="v3_Form_form_elem_msg_error_$form_elem_name">
264 </div>
265 </div>
266</div>
267
268#set ( $form_elem_label = "Apellido paterno" )
269#set ( $form_elem_name = "nombre_paterno" )
270#set ( $form_elem_msg_error = "" )
271<div class="v3_Form_form_elem_s v3_Form_form_elem_s_full">
272 <div class="v3_Form_form_elem_s_cont">
273 <div class="v3_Form_form_elem_label"
274 id="v3_Form_form_elem_label_$form_elem_name">
275 $form_elem_label
276 </div>
277 <div class="v3_Form_form_elem_control">
278 <input type="text"
279 name="$form_elem_name" id="$form_elem_name"
280 title="$form_elem_label"
281 placeholder=""
282 class="v3_Form_form_elem"
283 maxlength="30"
284 >
285 </div>
286 <div class="v3_Form_form_elem_msg_error"
287 id="v3_Form_form_elem_msg_error_$form_elem_name">
288 </div>
289 </div>
290</div>
291
292#*
293#set ( $form_elem_label = "Apellido materno" )
294#set ( $form_elem_name = "nombre_materno" )
295#set ( $form_elem_msg_error = "" )
296<div class="v3_Form_form_elem_s ">
297 <div class="v3_Form_form_elem_s_cont">
298 <div class="v3_Form_form_elem_label"
299 id="v3_Form_form_elem_label_$form_elem_name">
300 $form_elem_label
301 </div>
302 <div class="v3_Form_form_elem_control">
303 <input type="text"
304 name="$form_elem_name" id="$form_elem_name"
305 title="$form_elem_label"
306 placeholder=""
307 class="v3_Form_form_elem"
308 maxlength="30"
309 >
310 </div>
311 <div class="v3_Form_form_elem_msg_error"
312 id="v3_Form_form_elem_msg_error_$form_elem_name">
313 </div>
314 </div>
315</div>
316*#
317
318#set ( $form_elem_label = "Celular de contacto (10 digitos)" )
319#set ( $form_elem_name = "tel_movil" )
320#set ( $form_elem_msg_error = "" )
321<div class="v3_Form_form_elem_s v3_Form_form_elem_s_full">
322 <div class="v3_Form_form_elem_s_cont">
323 <div class="v3_Form_form_elem_label"
324 id="v3_Form_form_elem_label_$form_elem_name">
325 $form_elem_label
326 </div>
327 <div class="v3_Form_form_elem_control">
328 <input type="text"
329 name="$form_elem_name" id="$form_elem_name"
330 title="Teléfono de contacto"
331 placeholder="Ej. 5566778899"
332 class="v3_Form_form_elem"
333 maxlength="10"
334 >
335 </div>
336 <div class="v3_Form_form_elem_msg_error"
337 id="v3_Form_form_elem_msg_error_$form_elem_name">
338 El teléfono debe ser de 10 dígitos
339 </div>
340 </div>
341</div>
342
343#set ( $form_elem_label = "Correo electrónico" )
344#set ( $form_elem_name = "email" )
345#set ( $form_elem_msg_error = "" )
346<div class="v3_Form_form_elem_s v3_Form_form_elem_s_full">
347 <div class="v3_Form_form_elem_s_cont">
348 <div class="v3_Form_form_elem_label"
349 id="v3_Form_form_elem_label_$form_elem_name">
350 $form_elem_label
351 </div>
352 <div class="v3_Form_form_elem_control">
353 <input type="text"
354 name="$form_elem_name" id="$form_elem_name"
355 title="$form_elem_label"
356 placeholder=""
357 class="v3_Form_form_elem
358 v3_Form_form_elem_con_tip"
359 maxlength="40"
360 >
361
362<div class="v3_Form_form_elem_tip_content"
363 id="v3_Form_form_elem_tip_content_$form_elem_name">
364 A este correo electrónico enviaremos mensajes para dar seguimiento a tu contratación. *Puedes elegir este correo para recibir información sobre la activación de Claro video.
365</div>
366<div class="v3_Form_form_elem_tip"
367 id="v3_Form_form_elem_tip_$form_elem_name">
368 <img src="$IMG_ico_tooltip" alt="" class="">
369</div>
370
371 </div>
372 <div class="v3_Form_form_elem_msg_error"
373 id="v3_Form_form_elem_msg_error_$form_elem_name">
374 Ingrese un correo electrónico válido
375 </div>
376 </div>
377</div>
378
379
380#set ( $form_elem_label = "NIP de portabilidad" )
381#set ( $form_elem_name = "porta_nip" )
382#set ( $form_elem_msg_error = "" )
383<div class="v3_Form_form_elem_s v3_Form_form_elem_s_full">
384 <div class="v3_Form_form_elem_s_cont">
385 <div class="v3_Form_form_elem_label"
386 id="v3_Form_form_elem_label_$form_elem_name">
387 $form_elem_label
388 </div>
389 <div class="v3_Form_form_elem_control">
390 <input type="text"
391 name="$form_elem_name" id="$form_elem_name"
392 title="$form_elem_label"
393 placeholder=""
394 class="v3_Form_form_elem
395 v3_Form_form_elem_con_tip"
396 maxlength="4"
397 >
398
399<div class="v3_Form_form_elem_tip_content"
400 id="v3_Form_form_elem_tip_content_$form_elem_name">
401 Llama al 051 desde tu línea que quieres portar a TELMEX y recibirás una llamada con tu NIP, el cual tiene vigencia de 5 días naturales.
402</div>
403<div class="v3_Form_form_elem_tip"
404 id="v3_Form_form_elem_tip_$form_elem_name">
405 <img src="$IMG_ico_tooltip" alt="" class="">
406</div>
407
408 </div>
409 <div class="v3_Form_form_elem_msg_error"
410 id="v3_Form_form_elem_msg_error_$form_elem_name">
411 </div>
412 </div>
413</div>
414
415
416
417#set ( $form_elem_label = "CURP" )
418#set ( $form_elem_name = "identificacion_id" )
419#set ( $form_elem_msg_error = "" )
420<div class="v3_Form_form_elem_s v3_Form_form_elem_s_full">
421 <div class="v3_Form_form_elem_s_cont">
422 <div class="v3_Form_form_elem_label"
423 id="v3_Form_form_elem_label_$form_elem_name">
424 $form_elem_label
425 </div>
426 <div class="v3_Form_form_elem_control">
427 <input type="text"
428 name="$form_elem_name" id="$form_elem_name"
429 title="$form_elem_label"
430 placeholder=""
431 class="v3_Form_form_elem
432 v3_Form_form_elem_con_tip"
433 maxlength="18"
434 >
435
436 #set ( $html_libre = "" )
437 #set ( $html_libre = "${html_libre}Si no cuentas con tu CURP presiona esta liga:" )
438 #set ( $html_libre = "${html_libre}<br>" )
439 #set ( $html_libre = "${html_libre}<strong>" )
440 #set ( $html_libre = "${html_libre}<a href='http://consultas.curp.gob.mx/CurpSP/' target='_blank'>" )
441 #set ( $html_libre = "${html_libre}http://consultas.curp.gob.mx/CurpSP/" )
442 #set ( $html_libre = "${html_libre}</a>" )
443 #set ( $html_libre = "${html_libre}</strong>" )
444
445<div class="v3_Form_form_elem_tip_content"
446 id="v3_Form_form_elem_tip_content_$form_elem_name">
447 $html_libre
448</div>
449<div class="v3_Form_form_elem_tip"
450 id="v3_Form_form_elem_tip_$form_elem_name">
451 <img src="$IMG_ico_tooltip" alt="" class="">
452</div>
453
454 </div>
455 <div class="v3_Form_form_elem_msg_error"
456 id="v3_Form_form_elem_msg_error_$form_elem_name">
457 </div>
458 </div>
459</div>
460
461#*
462<div class="v3_Form_instruccion_s">
463 <div class="v3_Form_instruccion">
464 ¡Envíanos tu identificación!
465 </div>
466</div>
467
468<div id=""
469 class=""
470 style="margin-bottom: 25px;"
471>
472 Para continuar con el proceso de portabilidad envía a
473 <a href="mailto:portate@telmex.com"
474 style="color:#0067ee; text-decoration:underline;">
475 portate@telmex.com
476 </a>
477 una copia de la identificación oficial vigente del titular de la línea
478 (INE, pasaporte, licencia o CURP).
479</div>
480*#
481
482<div class="v3_Form_form_boton_list">
483
484#set ( $form_elem_label = "Continuar" )
485#set ( $form_elem_name = "boton_paso_" )
486#set ( $form_elem_msg_error = "" )
487 <input type="button"
488 name="$form_elem_name" id="$form_elem_name"
489 value="$form_elem_label" title="$form_elem_label"
490 class="v3_Form_form_boton"
491 onclick="obPF.fnDo( 'Continuar', this );"
492 >
493
494</div> ## <div class="v3_Form_form_boton_list">
495
496</div> ## <div class="v3_Form_paso_s_contenido">
497</div> ## <div class="v3_Form_paso_s
498## paso - section - fin
499## -------------------------------------------------------------------------------
500
501</div> ## <div class="v3_Form_paso_contenido">
502</div> ## <div class="v3_Form_paso
503## paso - fin
504## ===============================================================================
505
506</form>
507
508</div> ## <div class="v3_Form">
509</div> ## <div class="v3_Form_content fullBox">
510
511#parse ( "$templatesPath/456953" ) ## fl_LineaPorta_Hogar_Aaa_Insert_DATOS-script.vm