var lobXMLReq = fobXMLReq(); // Variable general que se usa cuando se tiene codigo ajax
function trim(sInString) {
sInString = sInString.replace( /^\s+/g, "" );// strip leading
sInString = sInString.replace(/\r|\n|\r\n|\t/g, ""); //retorno de carro, nueva línea, tabulador
return sInString.replace( /\s+$/g, "" );// strip trailing
}
/*Funciones Dreamweaver*/
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);}
/*Fin Funciones Dreamweaver*/
/*Funcion para action de forma login correo*/
function fLoginAction(pobForma){
if (pobForma.data3.value != ''){
pobForma.LOGIN.value = pobForma.data1.value+'@'+pobForma.data3.value;
pobForma.PASSWD.value = pobForma.data2.value;		
}else{
pobForma.LOGIN.value = pobForma.data1.value;
pobForma.PASSWD.value = pobForma.data2.value;}}
function fLoginActionSubdominio(pobForma){
if (pobForma.data3.value != ''){
pobForma.LOGIN.value = trim(pobForma.data1.value)+'@'+trim(pobForma.subdominio.value)+pobForma.data3.value;
pobForma.PASSWD.value = trim(pobForma.data2.value);		
}else{
pobForma.LOGIN.value = trim(pobForma.data1.value);
pobForma.PASSWD.value = trim(pobForma.data2.value);}}
/* Funcion que valida usuario y password para abrir el correo Prodigy */
function fprodigyLogin(form) {
fLoginAction(form);
var lstMensaje = "";
var lstUsuario = trim(form.data1.value);
var lstPwd = form.data2.value;
if (lstUsuario == '' || lstPwd == ''){
if (lstUsuario == '') {
lstMensaje = "<br>Ingresa tu usuario.";}
if (lstPwd == '') {
lstMensaje = "<br>Ingresa tu contraseña.";}
if (lstUsuario == '' && lstPwd == ''){
lstMensaje = "<br>Ingresa tu usuario y contraseña.";}
if (lstUsuario.indexOf("\t")!= -1 || lstUsuario.indexOf(" ")!= -1){
lstMensaje = "<br>Ingresa tu usuario correctamente.";}
fMuestraError(lstMensaje,"msgCorreo");
form.btnEnvia.disabled=false;
return false;
}else {
form.user.value = lstUsuario + form.data3.value;
form.password.value = lstPwd;
form.data1.value = '';
form.data2.value = '';
fMuestraError("","msgCorreo");
return true;
return false;
}}// end function fprodigyLogin(form)
// Prototipo para nuevos index quitar el br
function fprodigyLogin2(form) {
//form.btnEnvia.disabled=true;
fLoginAction(form);
var lstMensaje = "";
var lstUsuario = trim(form.data1.value);
var lstPwd = form.data2.value;
if (lstUsuario == '' || lstPwd == ''){
if (lstUsuario == '') {
lstMensaje = "Ingresa tu usuario.";}
if (lstPwd == '') {
lstMensaje = "Ingresa tu contraseña.";}
if (lstUsuario == '' && lstPwd == ''){
lstMensaje = "Ingresa tu usuario y contraseña.";}
if (lstUsuario.indexOf("\t")!= -1 || lstUsuario.indexOf(" ")!= -1){
lstMensaje = "Ingresa tu usuario correctamente.";}
fMuestraError(lstMensaje,"msgCorreo");
form.btnEnvia.disabled=false;
return false;
}else {
form.user.value = lstUsuario + form.data3.value;
form.password.value = lstPwd;
form.data1.value = '';
form.data2.value = '';
fMuestraError("","msgCorreo");
return true;
return false;}}// end function fprodigyLogin(form)
/*conteo de accesos a correo*/
function fprodigyLoginWT(form) {
//form.btnEnvia.disabled=true;
fLoginAction(form);
var lstMensaje = "";
var lstUsuario = trim(form.data1.value);
var lstPwd = form.data2.value;
var lstUrl = "/wt/correo/acceso.html?r="+Math.floor(Math.random()*1000);
if (lstUsuario == '' || lstPwd == ''){
if (lstUsuario == '') {
lstMensaje = "Ingresa tu usuario.";}
if (lstPwd == '') {
lstMensaje = "Ingresa tu contraseña.";}
if (lstUsuario == '' && lstPwd == ''){
lstMensaje = "Ingresa tu usuario y contraseña.";}
if (lstUsuario.indexOf("\t")!= -1 || lstUsuario.indexOf(" ")!= -1){
lstMensaje = "Ingresa tu usuario correctamente.";}
fMuestraError(lstMensaje,"msgCorreo");	
return false;
}else {
form.user.value = lstUsuario + form.data3.value;
form.password.value = lstPwd;
form.data1.value = '';
form.data2.value = '';
fMuestraError("","msgCorreo");
try{
fMuestraError("<span style='color:#999999;'>Cargando, espera por favor...</span>","msgCorreo");
lobXMLReq.open('GET',lstUrl,true);
lobXMLReq.send(null);
lobXMLReq.onreadystatechange = function (){
if (lobXMLReq.readyState == 4 && lobXMLReq.status == 200 ){	
form.submit();}			}//fin function()
}catch(exception){
return true; }}}// end function fprodigyLoginWT(form)
//Funcion que se llama cuando el usuario agrega un dominio personalizado
function fprodigyLoginWT1(form) {
var lstMensaje = "";
var lstUsuario = trim(form.data1.value);
var lstSubdominio = trim(form.subdominio.value);
var lstPwd = form.data2.value;
var lstUrl = "/wt/correo/acceso.html?r="+Math.floor(Math.random()*1000);
fLoginActionSubdominio(form);
if (lstUsuario == '' || lstPwd == '' || lstSubdominio == '') {
if (lstSubdominio == '' ){
lstMensaje = "Ingresa tu dominio.";}		
if (lstPwd == '') {
lstMensaje = "Ingresa tu contraseña.";}	
if (lstUsuario == '') {
lstMensaje = "Ingresa tu usuario.";}	
if (lstUsuario == '' && lstPwd == ''){
lstMensaje = "Ingresa tu usuario y contraseña.";}
if (lstUsuario.indexOf("\t")!= -1 || lstUsuario.indexOf(" ")!= -1){
lstMensaje = "Ingresa tu usuario correctamente.";}	
fMuestraError(lstMensaje,"msgCorreo");
return false;
}else {
form.user.value = lstUsuario + form.data3.value;
form.password.value = lstPwd;
form.data1.value = '';
form.data2.value = '';
fMuestraError("","msgCorreo");
try{
fMuestraError("<span style='color:#999999;'>Cargando, espera por favor...</span>","msgCorreo");
lobXMLReq.open('GET',lstUrl,true);
lobXMLReq.send(null);
lobXMLReq.onreadystatechange = function (){
if (lobXMLReq.readyState == 4 && lobXMLReq.status == 200 ){	
form.submit();}			}//fin function()
}catch(exception){
return true; }}}// end function fprodigyLoginWT1(form)
/* Funcion que abre sitios de Latinoamerica del combo */
function fAbreLatam(pnuPag){
pnuPag = Number(pnuPag);
var lstPag = "";
switch (pnuPag){
case 1://Global home
lstPag = "http://www.telmex.com/";
window.open (lstPag);
break;
case 2://Argentina
lstPag = "http://www.telmex.com/ar";
window.open (lstPag);
break;
case 3://Brasil 
lstPag = "http://www.telmex.com/br";
window.open (lstPag);
break;
case 4://Colombia
lstPag = "http://www.telmex.com/co";
window.open (lstPag);
break;
case 5://Chile
lstPag = "http://www.telmex.com/cl";
window.open (lstPag);
break;
case 6://USA
lstPag = "http://www.telmexusa.com";
window.open (lstPag);
break;
case 7://Perú
lstPag = "http://www.telmex.com/pe";
window.open (lstPag);
break;
case 8://Urugay
lstPag = "http://www.telmex.com/uy";
window.open (lstPag);
break;
case 9://Mexico
lstPag ="http://www.telmex.com";
window.open (lstPag);
break;} }// end function fAbreLatam(pnuPag)
/*Funcion que verifica el telefono de verifica disponibilidad de Infinitum*/
function fboRevisaCampoVerifInfinitum(cadena) {
if((cadena==null) || (cadena=="")  || (cadena.length!=10) || cadena.search(/[^0-9]/) != -1){
msg = 'El número de teléfono consta de 10 dígitos y debe incluir: '; 
msg += 'clave Lada + teléfono. Sin espacios, guiones, coma, etc.';
fMuestraError(msg,"errVerifDisp");
return false;}else{
lada = cadena.substring(0,3);
if( (lada == "664") || (lada == "661") || (lada == "665") || (lada == "646") || (lada == "616") ||
(lada == "653") || (lada == "686") || (lada == "658") || (lada == "651") ){
msg = '<p class="txt_general">Debes confirmar la disponibilidad del servicio Prodigy Infinitum en este sitio: <a href="http://www.telnor.com" style="text-decoration:underline;" target="_blank">www.telnor.com</a></p>'
msg += '<br>';
fMuestraError(msg,"errVerifDisp");
return false;
}else{
return true;}}
return true;} //fin de funcion RevisaCampo()
function fboValidaFormaVerifInfinitum(forma,pstEtiqError) {
var lstTel = forma.Tel.value;
var lboVerificacion = fboRevisaCampoVerifInfinitum(forma.Tel.value);
var lstUrl = "/mx/pt_verifDispInfinitum.jsp";
if (lboVerificacion){
try{
fMuestraError("",pstEtiqError);
lobXMLReq.open('POST',lstUrl,true);
lobXMLReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
lobXMLReq.send('Tel=' + lstTel +'&RND=' + (Math.round(Math.random()*1000)) );
fMuestraError("<span style='padding-top:4px;padding-bottom:4px;color:black'>Cargando, espera por favor...</span>",pstEtiqError);
lobXMLReq.onreadystatechange = function (){
if (lobXMLReq.readyState == 4 && lobXMLReq.status == 200 ){
var lstRespuesta = lobXMLReq.responseText
var lobArregloResp = lstRespuesta.split("|");
var mnuCodigoResp = Number(lobArregloResp[0]);
lstMensajeResp = lobArregloResp[1];
if (mnuCodigoResp  == 1){
lstMensajeResp = "<p class=txt_general>"+lstMensajeResp+"</p><br><a href=\"http://www.online.telmex.com/mitelmex/inicio.jsp?p=/servlet/acceso_contra_mt%3fT%3d47\" class=\"lnk_contrata\">Contratar</a>";}
fMuestraError(lstMensajeResp,pstEtiqError);}}
}catch(exception){
alert("error : "+exception.message)}}
return false;
}//fin de funcion valida(forma)
function fMuestraError(pstMsg,pstElementoId){
if (document.getElementById){
document.getElementById(pstElementoId).innerHTML = "";
document.getElementById(pstElementoId).innerHTML = pstMsg;
}else{
alert(pstMsg);}}
//Funcion para abrir ventana de tienda
function fCargarTienda(){location.href = "http://www.tienda.telmex.com/";}
var mnuCodigoRespMiTmx = 0;
function fLoginMiTmx(pobForma,pstEtiqError) {
//pobForma.btnEnvia.disabled=true;
mnuCodigoRespMiTmx=0;
var lstRespuesta = "";
var lstMensajeResp = "";
var lobArregloResp = null;
var lstTel = pobForma.USR.value;
var lstPwd = pobForma.CVEACC.value;
var lstUrl = "/mx/pt_loginMiTmx.jsp";
var lstEnPwd = encodeURIComponent(lstPwd);
fMuestraError(lstMensajeResp,pstEtiqError);
try{
lobXMLReq.open('POST',lstUrl,true);
lobXMLReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
lobXMLReq.send('USR=' + lstTel + '&CVEACC=' + lstEnPwd +'&RND=' + (Math.round(Math.random()*1000)) );
fMuestraError("<span style='color:black'>Cargando, espera por favor...<br><br></span>",pstEtiqError);
lobXMLReq.onreadystatechange = function (){
if (lobXMLReq.readyState == 4 && lobXMLReq.status == 200 ){
lstRespuesta = lobXMLReq.responseText;
lobArregloResp = lstRespuesta.split("|");
mnuCodigoRespMiTmx = lobArregloResp[0];
lstMensajeResp = lobArregloResp[1];
if (mnuCodigoRespMiTmx == 1){
document.frmMiTmx.submit();
}else {
//pobForma.btnEnvia.disabled=false;
fMuestraError(lstMensajeResp+"  ",pstEtiqError);}}}
}catch(exception){
return true;}
return false;}
function fLoginMiTmxNegocio(pobForma,pstEtiqError) {
//pobForma.btnEnvia.disabled=true;
mnuCodigoRespMiTmx=0;
var lstRespuesta = "";
var lstMensajeResp = "";
var lobArregloResp = null;
var lstUsuario = pobForma.usuario.value;
var lstPwd = pobForma.password.value;
var lstUrl = "/mx/pt_loginMiTmxNegocio.jsp";
var lstEnPwd = encodeURIComponent(lstPwd);
var lstEnUsuario = encodeURIComponent(lstUsuario);
fMuestraError(lstMensajeResp,pstEtiqError);
try{
lobXMLReq.open('POST',lstUrl,true);
lobXMLReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
lobXMLReq.send('usuario=' + lstEnUsuario + '&password=' + lstEnPwd +'&RND=' + (Math.round(Math.random()*1000)) );
fMuestraError("<span style='color:black'>Cargando, espera por favor...<br></span>",pstEtiqError);
lobXMLReq.onreadystatechange = function (){
if (lobXMLReq.readyState == 4 && lobXMLReq.status == 200 ){
lstRespuesta = lobXMLReq.responseText;
lobArregloResp = lstRespuesta.split("|");
mnuCodigoRespMiTmx = lobArregloResp[0];
lstMensajeResp = lobArregloResp[1];
if (mnuCodigoRespMiTmx == 1){
pobForma.submit();
}else {
fMuestraError(lstMensajeResp+"  ",pstEtiqError);
}}}
}catch(exception){
alert("error : "+exception.message)
return true;}
return false;}	
/****************************************************************
**	Para prototipos de index
*****************************************************************/
function fLoginMiTmx2(pobForma,pstEtiqError) {
pobForma.btnEnvia.disabled=true;
mnuCodigoRespMiTmx=0;
var lstRespuesta = "";
var lstMensajeResp = "";
var lobArregloResp = null;
var lstTel = pobForma.USR.value;
var lstPwd = pobForma.CVEACC.value;
var lstUrl = "/mx/pt_loginMiTmx2.jsp";
var lstEnPwd = encodeURIComponent(lstPwd);
fMuestraError(lstMensajeResp,pstEtiqError);
try{
lobXMLReq.open('POST',lstUrl,true);
lobXMLReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
lobXMLReq.send('USR=' + lstTel + '&CVEACC=' + lstEnPwd +'&RND=' + (Math.round(Math.random()*1000)) );
fMuestraError("<span style='color:black'>Cargando, espera por favor...<br><br></span>",pstEtiqError);
lobXMLReq.onreadystatechange = function (){
if (lobXMLReq.readyState == 4 && lobXMLReq.status == 200 ){
lstRespuesta = lobXMLReq.responseText
lobArregloResp = lstRespuesta.split("|");
mnuCodigoRespMiTmx = lobArregloResp[0];
lstMensajeResp = lobArregloResp[1];
if (mnuCodigoRespMiTmx == 1){
document.frmMiTmx.submit();
}else {
pobForma.btnEnvia.disabled=false;
fMuestraError(lstMensajeResp+"  ",pstEtiqError);}}}
}catch(exception){
pobForma.btnEnvia.disabled=false;
return true;}
return false;}
function fLoginMiTmxNegocio2(pobForma,pstEtiqError) {
pobForma.btnEnvia.disabled=true;
mnuCodigoRespMiTmx=0;
var lstRespuesta = "";
var lstMensajeResp = "";
var lobArregloResp = null;
var lstUsuario = pobForma.usuario.value;
var lstPwd = pobForma.password.value;
var lstUrl = "/mx/pt_loginMiTmxNegocio2.jsp";
var lstEnPwd = encodeURIComponent(lstPwd);
var lstEnUsuario = encodeURIComponent(lstUsuario);
fMuestraError(lstMensajeResp,pstEtiqError);
try{
lobXMLReq.open('POST',lstUrl,true);
lobXMLReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
lobXMLReq.send('usuario=' + lstEnUsuario + '&password=' + lstEnPwd +'&RND=' + (Math.round(Math.random()*1000)) );
fMuestraError("<span style='color:black'>Cargando, espera por favor...<br><br></span>",pstEtiqError);
lobXMLReq.onreadystatechange = function (){
if (lobXMLReq.readyState == 4 && lobXMLReq.status == 200 ){
lstRespuesta = lobXMLReq.responseText
lobArregloResp = lstRespuesta.split("|");
mnuCodigoRespMiTmx = lobArregloResp[0];
lstMensajeResp = lobArregloResp[1];
if (mnuCodigoRespMiTmx == 1){
pobForma.submit();
}else {
pobForma.btnEnvia.disabled=false;
fMuestraError(lstMensajeResp+"  ",pstEtiqError);}}}
}catch(exception){
alert("error : "+exception.message)
pobForma.btnEnvia.disabled=false;
return true;}
return false;}
function fobXMLReq() {
var xmlhttp;
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;}}
return xmlhttp;}
function fboEsNumerico(pobEvt)
{var lstCharCode = (pobEvt.which) ? pobEvt.which : event.keyCode;
var lboRegreso = (lstCharCode > 31 && (lstCharCode < 48 || lstCharCode > 57))? false : true;
return lboRegreso;}
function fboEsNumerico(pobEvt){
var lstCharCode = (pobEvt.which) ? pobEvt.which : event.keyCode;
var lboRegreso = (lstCharCode > 31 && (lstCharCode < 48 || lstCharCode > 57))? false : true;
return lboRegreso;}
function fstTrimCampo(pobEvt){
var lstCharCode = (pobEvt.which) ? pobEvt.which : event.keyCode;
var lboRegreso = (lstCharCode == 9 || lstCharCode == 32)? false : true;
return lboRegreso;}
function fboValidaTelContrata(pobForma,pstEtiqError,origen){
var msg ="";
var valido = true;
var msgTelH1 = 'Ingresa tu número de teléfono '; 
var msgTelH2 = 'El número de Teléfono es incorrecto ';
var msgTelN1 = 'Ingrese su número de teléfono '; 
var msgTelN2 = 'El número de Teléfono es incorrecto ';
try{pobForma.telefono.value=trim(pobForma.telefono.value);
cadena=pobForma.telefono.value;
if((cadena==null) || (cadena=="") ){
msg = (origen == 'H')? msgTelH1 : msgTelN1; 
valido = false;} 
else if ( (cadena.length!=10) || cadena.search(/[^0-9]/) != -1) {
msg = (origen == 'H')? msgTelH2 : msgTelN2; 
valido = false;}
if (!valido){
fMuestraError(msg,pstEtiqError);
pobForma.contrata.disabled = false;
}else{
pobForma.contrata.disabled = true;
fMuestraError("<span class='txt_general_naranja'>Cargando, espera por favor...<br><br></span>",pstEtiqError);}		
}catch (e){}
return valido;}
function fboValidaTelContrataMT(pobForma,pstEtiqError,origen,pnuServ){
var msg ="";
var valido = true;
var msgTelH1 = 'Ingresa tu número de teléfono '; 
var msgTelH2 = 'El número de Teléfono es incorrecto ';
var msgTelN1 = 'Ingrese su número de teléfono '; 
var msgTelN2 = 'El número de Teléfono es incorrecto ';
var action = "https://www.online.telmex.com/mitelmex/inicio.jsp?p=..%2Fservlet%2Facceso_contra_mt%3FT%3D"+pnuServ+"%26CE%3D8%26USR%3D"
try{
pobForma.telefono.value=trim(pobForma.telefono.value);
cadena=pobForma.telefono.value;
if((cadena==null) || (cadena=="") )
{msg = (origen == 'H')? msgTelH1 : msgTelN1; 
valido = false;} 
else if ( (cadena.length!=10) || cadena.search(/[^0-9]/) != -1) {
msg = (origen == 'H')? msgTelH2 : msgTelN2; 
valido = false;}
if (!valido){
fMuestraError(msg,pstEtiqError);
pobForma.contrata.disabled = false;
}else{
pobForma.action = action+cadena;
pobForma.contrata.disabled = true;
fMuestraError("<span class='txt_general_naranja'>Cargando, espera por favor...<br><br></span>",pstEtiqError);}		
}catch (e){		
}return valido;}
function fboValidaTelContrataMTPUC(pobForma,pstEtiqError,origen,pnuServ){
var msg ="";
var valido = true;
var msgTelH1 = 'Ingresa tu número de teléfono '; 
var msgTelH2 = 'El número de Teléfono es incorrecto ';
var msgTelN1 = 'Ingrese su número de teléfono '; 
var msgTelN2 = 'El número de Teléfono es incorrecto ';
var action = "https://www.online.telmex.com/mitelmex/inicio.jsp?p=..%2Fservlet%2Facceso_contra_mt%3FT%3D"+pnuServ+"%26PUCT%3D"
try{pobForma.telefono.value=trim(pobForma.telefono.value);
cadena=pobForma.telefono.value;
if((cadena==null) || (cadena=="") ){
msg = (origen == 'H')? msgTelH1 : msgTelN1; 
valido = false;} else if ( (cadena.length!=10) || cadena.search(/[^0-9]/) != -1) {
msg = (origen == 'H')? msgTelH2 : msgTelN2; 
valido = false;}		
if (!valido){fMuestraError(msg,pstEtiqError);
pobForma.contrata.disabled = false;
}else{pobForma.action = action+cadena;
pobForma.contrata.disabled = true;
fMuestraError("<span class='txt_general_naranja'>Cargando, espera por favor...<br><br></span>",pstEtiqError);
}		}catch (e){		}
return valido;}
/**funciones de home's*/
function cambiaSelectedDominios(){if(document.getElementById("dominios").value == 9)
ingresaTuDominio();			}
function ingresaTuDominio(){		
document.getElementById("secciondominios").removeChild(document.getElementById("dominios"));
var tuDominio='<input name="subdominio" type="text" class="frm_input_cuadrado" id="subdominio" size="20" style="width:80px" onkeypress="return(fstTrimCampo(event))"  /><span>.mitmx.net<\/span>'+
'<input name="data3" type="hidden" value=".mitmx.net"/>';
document.getElementById("secciondominios").innerHTML=tuDominio;}	
function cambiaAcorreo(){	document.getElementById("imgcorreo").src="images/pes-correo01correo.gif";
document.getElementById("imgmitmx").src="images/pes-correo02mitmx.gif";	
cambiaAcorreoContenido();	}
function cambiaAmitmx(){document.getElementById("imgcorreo").src="images/pes-mitmx01correo.gif";
document.getElementById("imgmitmx").src="images/pes-mitmx02mitmx.gif";	
cambiaAmitmxContenido();	}			
function cambiaAmitmxContenido(){
document.getElementById("contenidoTabla").removeChild(document.getElementById("contenidoPestanias"));
var divMitmx = '<div id="contenidoPestanias">'+
'<form action="https://www.online.telmex.com/servlet/acceso_online" method="post" name="frmMiTmx" id="frmMiTmx"  onKeyPress="fboEnviaEnter(event,1)" >'+
'<input type="hidden" name="p" value="../servlet/acceso_contra_mt?T=2" />'+
'<label class="txt_general_formas" for="USR">Teléfono 10 dígitos:<br />'+
'<input name="USR" id="USR" type="text" class="frm_input"  size="20" style="width:150px;color: #CCCCCC;background-color:#F2F2F2" '+
'maxlength="10" onfocus="textInputInicialBorra(this)" onblur="textInputInicialAgrega(this,\'Captura clave Lada + N&uacute;mero\')"'+ 
'onKeyPress="return(fboEsNumerico(event))" tabindex="2" value="Captura clave Lada + N&uacute;mero"/><\/label><br />'+
'<label class="txt_general_formas" for="CVEACC">Contraseña:<br />'+
'<input class="frm_input" size="20" style="width:100px" tabindex="3" name="CVEACC" id="CVEACC" type="password" maxlength="8"/><\/label>'+
'<a href="#" class="txt_general_naranja" tabindex="4" style="text-decoration:underline; margin-left:15px" '+
'onclick="return(fLoginMiTmx(document.getElementById(\'frmMiTmx\'),\'msgMiTelmex\'));"><strong>Entrar<\/strong><\/a><br />'+
'<div id="msgMiTelmex" class="txt_error" style="padding:3px;height:20px">&nbsp;<\/div>'+
'<a href="https://www.online.telmex.com/mitelmex/inicio.jsp?p=registro_mitelmex.jsp" class="lnk_naranja">Reg&iacute;strate<\/a><br />'+
'<a href="https://www.online.telmex.com/mitelmex/inicio.jsp?p=recupera/mt_RecuperaContrasenia.jsp" class="lnk_azul">Recuperar contraseña<\/a>	<br />'+
'<a href="hogar/mitelmex/index.html" class="lnk_naranja">Lo Nuevo en Mi Telmex<\/a>	'+					
'<\/form>'
'<\/div>';
document.getElementById("contenidoTabla").innerHTML=divMitmx;}
//Funcion que crea el div del correo prodigy
function cambiaAcorreoContenido(){
document.getElementById("contenidoTabla").removeChild(document.getElementById("contenidoPestanias"));
var divCorreo ='<div id="contenidoPestanias" >'+ 
'<form action="http://webmail2.prodigy.net.mx/cgi-bin/ajaxmail" method="post" name="prodigyform" id="prodigyform" onKeyPress="fboEnviaEnter(event,3)">'+
<!-- form XandM -->
'<input type="hidden" name="Act_Login" value="1" />'+
'<input type="hidden" name="Cos" value="1" />'+
'<input type="hidden" name="Tpl" value="cnx" />'+
'<input type="hidden" name="LOGIN" />'+
'<input type="hidden" name="PASSWD" />'+
'<input type="hidden" name="FromExt" value="1" />'+
<!-- fin form XandM -->
'<input type="hidden" name="user" value="" />'+
'<input type="hidden" name="password" value="" />'+
'<input type="hidden" name="js_autodetect_results" value="SMPREF_JS_OFF" />'+
'<input type="hidden" name="just_logged_in" value="1" />'+
'<input name="hidden" type="hidden" value="MSN Search" />'+
'<label for="usuario_mail" class="txt_general_formas">Usuario:<br />'+
'<input name="data1" id="usuario_mail" type="text" class="frm_input" tabindex="1" size="20" style="width:95px;margin-bottom:5px"'+ 
'onKeyPress="return(fstTrimCampo(event))" tabindex="1"/><\/label>'+
'<br />'+
'<label for="dominios">Dominio<\/label>'+
'<br />'+
'<div id="secciondominios"><SPAN style="vertical-align:top">@</SPAN>'+
'<select name="data3" id="dominios" tabindex="2" onchange="cambiaSelectedDominios();"'+
'class="frm_input" style="width:97px;margin-bottom:5px">'+
'<option selected="selected" value="">prodigy.net.mx<\/option>'+
'<option value="infinitum.com.mx">infinitum.com.mx<\/option>'+
'<option value="prodigymovil.com">prodigymovil.com<\/option>'+
'<option value="prodigymedia.com">prodigymedia.com<\/option>'+
'<option value="infinitummail.com">infinitummail.com<\/option>'+
'<option value="correoinfinitum.com">correoinfinitum.com<\/option>'+
'<option value="infinitumzone.net">infinitumzone.net <\/option>'+
'<option value="prodigywifi.com.mx">prodigywifi.com.mx<\/option>'+
'<option value="correoprodigy.com">correoprodigy.com<\/option>'+
'<option value="9">nombre.mitmx.net<\/option>'+										
'<\/select>'+
'<\/div>'+						
'<label class="txt_general_formas">Contraseña:<br />'+
'<input name="data2" type="password" tabindex="3" class="frm_input" id="pass_mail" size="20" style="width:95px"/><\/label>	'+					
'<a href="#" class="txt_general_naranja" tabindex="4" style="text-decoration:underline; margin-left:10px" onclick="enviaCorreo(document.getElementById(\'prodigyform\'))"><strong>Entrar<\/strong><\/a>'+			
'<div id="msgCorreo" class="txt_error" style="height:15px;">&nbsp;<\/div>'+													
'<a href="https://www.online.telmex.com/mitelmex/inicio.jsp?p=cambio_contrasena_ex.jsp" class="lnk_azul">Cambiar contraseña<\/a>	'+ 
'<\/form>'+
'<\/div>';
document.getElementById("contenidoTabla").innerHTML=divCorreo;}
function enviaCorreo(lobForm){
if(document.getElementById("subdominio")){
fprodigyLoginWT1(lobForm);
}else{
fprodigyLoginWT(lobForm);}}
function fboEnviaEnter(pobEvt,formulario)
{var lstCharCode = (pobEvt.which) ? pobEvt.which : event.keyCode;
if(lstCharCode == 13) {
switch(formulario){
case 1: //mi telmex hogar
fLoginMiTmx(document.getElementById('frmMiTmx'),'msgMiTelmex');
break;
case 2: //mi telmex negocio
fLoginMiTmxNegocio(document.getElementById('frmMiTmxNegocio'),'msgMiTelmexNegocio');
break;
case 3: //correo prodigy
enviaCorreo(document.getElementById('prodigyform'));
break;
case 4: //acceso a siana
envia_siana(document.getElementById('formSiana'));
break;}}	}
//Funcion que trae los ultimos 2 boletines de sala de prensa de un archivo txt para mostrarlos en el home de hogar
function traerXMLPrensa(){            
var obj_ajax = fobXMLReq();
var url ="/servlet/HomeTelmexSalaPrensa";
obj_ajax.open ('GET', url, true); // asignamos los metodos open y send
obj_ajax.onreadystatechange = function (){
if (obj_ajax.readyState == 4 && obj_ajax.status == 200) {
var x = obj_ajax.responseText;
var boletines=x.split("$");
var boletin1=boletines[0].split("|");
var boletin2=boletines[1].split("|");
var contenidoDiv='<span class="txt_general_naranja">'+boletin1[3]+'</span><br />'+
'<a href="'+boletin1[2]+'" class="lnk_azul">'+cortaCadena(boletin1[1],64)+'</a><br />'+
'<span class="txt_general_naranja">'+boletin2[3]+'</span><br />'+
'<a href="'+boletin2[2]+'" class="lnk_azul">'+cortaCadena(boletin2[1],75)+'</a><br />';
document.getElementById("divComunicados").innerHTML=contenidoDiv;}}
obj_ajax.send (null); } //Fin funcion	traerXMLPrensa()
//Funcion que corta la cadena en el n caracter y agrega puntos suspensivos
function cortaCadena(cad, n){
if(cad.length >= n )
cad=cad.substring(0, n)+"...";
return cad;} 	 
function cambiaAcorreoNegocioContenido(){
document.getElementById("contenidoTabla").removeChild(document.getElementById("contenidoPestanias"));
var divCorreoNegocio = '<div id="contenidoPestanias">'+
'<h2 class="tit_azul_obs">Correo Negocio<\/h2>'+
'<label class="txt_general_formas">Correo Electr&oacute;nico:<br />'+
'<input name="Telefono" type="text" class="frm_input" id="correo" size="20" style="width:100px" /><\/label><br />'+
'<br  />'+
'<label class="txt_general_formas">Contraseña:<br />'+
'<input name="contrasenia" type="text" class="frm_input" id="contrasenia" size="20" style="width:100px"/><\/label>'+
'<a href="#" class="txt_general_naranja" style="text-decoration:underline; margin-left:15px "'+
'onclick="MM_goToURL(\'parent\',\'../mitelmex/index.html\');return document.MM_returnValue"><strong>Entrar<\/strong><\/a><br /><br />'+						
'<a href="#" class="lnk_formas">Acceso a consola de administraci&oacute;n<\/a>	'+
'<\/div>';
document.getElementById("contenidoTabla").innerHTML=divCorreoNegocio;}	
function cambiaAinicioContenido(){
document.getElementById("contenidoTabla").removeChild(document.getElementById("contenidoPestanias"));
var divCorreoNegocio = '<div id="contenidoPestanias">'+
'<img src="../images/ic_correo_neg.gif" width="39" height="33" style="float:left; margin-top:-5px;margin-right:10px"/>'+
'<a class="tit_preciosmall" onclick="cambiaAcorreoNegocioContenido()" href="#" style="text-decoration:none">Correo Negocio<\/a><br /><br /><br />'+
'<img src="../images/ic_correo_prod.gif" width="37" height="26" style="float:left;margin-top:-5px;margin-right:10px"/>'+
'<a class="tit_preciosmall" onclick="cambiaAcorreoContenido()" href="#" style="text-decoration:none">Correo Prodigy<\/a>'+						
'<\/div>';
document.getElementById("contenidoTabla").innerHTML=divCorreoNegocio;}	
//Borra el texto inicial que aparece en algun elemento html
function textInputInicialBorra(elemento){
elemento.style.backgroundColor="transparent";
elemento.style.color="#000000";
elemento.value="";}	
//Agrega texto a un elemento html en caso de que este vacio su value
function textInputInicialAgrega(elemento,mensaje){
if(elemento.value == ""){
elemento.style.backgroundColor="transparent";
elemento.style.color="#CCCCCC";
elemento.value=mensaje;}}	
//Funcion para el cambio de imagenes de las pestañas de negocio
function cambiaAmitmxNeg(){document.getElementById("imgcorreo").src="../images/pes-mitmx01correo.gif";
document.getElementById("imgmitmx").src="../images/pes-mitmx02mitmx.gif";	
cambiaAmitmxNegContenido();	}	
//Funcion que crea el contenido de la pestaña de mitelemex negocio
function cambiaAmitmxNegContenido(){
document.getElementById("contenidoTabla").removeChild(document.getElementById("contenidoPestanias"));
var divMitmx = '<div id="contenidoPestanias">'+
'<form action="https://www.onlinenegocio.telmex.com/miTelmexNegocio/acceso/login.do" method="post" name="frmMiTmxNegocio" id="frmMiTmxNegocio" onKeyPress="fboEnviaEnter(event,2)">'+
'<label class="txt_general_formas">Correo electr&oacute;nico:<br />'+
'<input name="usuario" type="text" class="frm_input" id="usuario" size="20" style="width:150px;" onkeypress="return(fstTrimCampo(event))" tabindex="1" /><\/label><br />'+
'<label class="txt_general_formas">Contraseña:<br />'+
'<input name="password" type="password" class="frm_input" id="password" size="20" style="width:100px" tabindex="2" maxlength="8"/><\/label>'+
'<a href="#" class="txt_general_naranja"tabindex="3" style="text-decoration:underline; margin-left:15px" '+
'onclick="return(fLoginMiTmxNegocio(document.getElementById(\'frmMiTmxNegocio\'),\'msgMiTelmexNegocio\'));"><strong>Entrar<\/strong><\/a>'+
'<div id="msgMiTelmexNegocio" class="txt_error" style="padding:3px;height:20px">&nbsp;<\/div>'+
'<a href="https://www.onlinenegocio.telmex.com/miTelmexNegocio/registro/mostrarRegistro.do" class="lnk_naranja">Reg&iacute;strese<\/a><br />'+
'<a href="https://www.onlinenegocio.telmex.com/miTelmexNegocio/acceso/enviaContrasena.do" class="lnk_azul">Recuperar contraseña<\/a><br />'+
'<a href="mitelmex/index.html" class="lnk_naranja">Lo Nuevo en Mi Telmex<\/a>	'+
'<\/form>'+
'<\/div>';
document.getElementById("contenidoTabla").innerHTML=divMitmx;}	
//Funcion para la lectura de los tickers de la seccion de relaciones con inversionistas pag: info_bursatil
function get_tickers(){
var obj_ajax = fobXMLReq();            
obj_ajax.open ('POST', '"/servlet/TickersServlet', true); // asignamos los métodos open y send
obj_ajax.onreadystatechange = function ()
{if (obj_ajax.readyState == 4 && obj_ajax.status == 200) {
var tickers=obj_ajax.responseText;   
var arrRespuesta = tickers.split("&");
var nyse = arrRespuesta[2].split("=");
var latibex = arrRespuesta[4].split("=");
var nasdaq = arrRespuesta[3].split("=");
document.getElementById("nyse").innerHTML="<span style='padding-left:80px;'>"+nyse[0]+"</span><br /><span style='padding-left:79px;'>"+nyse[1]+"</span>";
document.getElementById("latibex").innerHTML="<span style='padding-left:79px;'>"+latibex[0]+"</span><br /><span style='padding-left:83px;'>"+latibex[1]+"</span>";
document.getElementById("nasdaq").innerHTML="<span style='padding-left:70px;'>"+nasdaq[0]+"</span><br /><span style='padding-left:74px;'>"+nasdaq[1]+"</span>";}}
obj_ajax.send (null);}		
/////////////////////////////////////////////////
// Funciones para el menu Beneficios infinitum //
/////////////////////////////////////////////////
function menPrinBlanco(param) {		
document.getElementById(param).style.backgroundColor='#fff';	}
function menPrinGris(param) {
document.getElementById(param).style.backgroundColor='#eee';	}
function mueveUltimo(){
var navegador = navigator.appName;
switch (navegador){
case "Microsoft Internet Explorer":
document.getElementById("ultimo").style.right='182px';
break;
case "Netscape":
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if (is_chrome)
document.getElementById("ultimo").style.right='190px';		
else
document.getElementById("ultimo").style.right='189px';
break;}}
function mueveIE (identificador) {
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
if (ieversion<8) {  
document.getElementById(identificador).style.left='0px';  }}}
//asistencia_JS.js
function MM_preloadImages() { //v3.0
var d=document; 
if(d.images){ 
if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
for(i=0; i<a.length; i++) {
alert (a[i]);}}}
function cambiaImagen (nameImg, imgChange) {if (document.images[nameImg]!=null)document.images[nameImg].src = imgChange; }
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; 
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){
document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}
function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;}
function quitaBlanco () {var gris = document.getElementById('finAcordGris').style.display;
var bco = document.getElementById('finAcordBco').style.display;	
if (gris=="block") {document.getElementById('finAcordGris').style.display = "none";
document.getElementById('finAcordBco').style.display = "block";} else {
document.getElementById('finAcordGris').style.display = "block";
document.getElementById('finAcordBco').style.display = "none";}}
function quitaBlanco2 () {
var gris = document.getElementById('finAcordGris').style.display;
var bco = document.getElementById('finAcordBco').style.display;		
if (gris=="none") {document.getElementById('finAcordGris').style.display = "block";
document.getElementById('finAcordBco').style.display = "none";} }
function quitaBlancoN1 () {var gris = document.getElementById('finAcordGris2').style.display;
var bco = document.getElementById('finAcordBco2').style.display;	
if (gris=="block") {document.getElementById('finAcordGris2').style.display = "none";
document.getElementById('finAcordBco2').style.display = "block";} else {
document.getElementById('finAcordGris2').style.display = "block";
document.getElementById('finAcordBco2').style.display = "none";}}
function quitaBlanco2N1 () {var gris = document.getElementById('finAcordGris2').style.display;
var bco = document.getElementById('finAcordBco2').style.display;		
if (gris=="none") {document.getElementById('finAcordGris2').style.display = "block";
document.getElementById('finAcordBco2').style.display = "none";} }
function quitaBlancoN2 () {
var gris = document.getElementById('finAcordGris3').style.display;
var bco = document.getElementById('finAcordBco3').style.display;	
if (gris=="block") {document.getElementById('finAcordGris3').style.display = "none";
document.getElementById('finAcordBco3').style.display = "block";} else {
document.getElementById('finAcordGris3').style.display = "block";
document.getElementById('finAcordBco3').style.display = "none";}}
function quitaBlanco2N2 () {
var gris = document.getElementById('finAcordGris3').style.display;
var bco = document.getElementById('finAcordBco3').style.display;		
if (gris=="none") {
document.getElementById('finAcordGris3').style.display = "block";
document.getElementById('finAcordBco3').style.display = "none";} }
function openchatpage(){		     
window.open('http://tmkc115.tecmarketing.com/website/public/chatsoporte1.html','wnd','toolbar=no,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=410,height=530,top=50,left=50');}
// Script que abre una pregunta (muestra respuesta) por parametro según id de la pregunta.
function abrePregunta() {
var lstParametros	= location.search;
var index = lstParametros.indexOf("=");											
if (index > 0) {
var parametro		= lstParametros.substring(index+1,lstParametros.length);  
document.getElementById(parametro).click();}}
