<!--
	/*
		Pagina				: c_calugayuda_index.js
		Propósito		    : Se agrego pagina para los cliente registrados en la home.
		Fecha Creación      : 15/09/2008
		Autor			    : Nataly Muñoz
		Empresa			    : Anticipa S.A
	
	    M002
		Pagina				: c_calugayuda_index.js
		Propósito		    : Se Modifica para que muestre los juegos online al escribir la url index_usuario_registrado.htm&JUEGOS-ONLINE-SERVIPAG
		Fecha Creación      : 03/03/2009
		Autor			    : Pablo Leyton
		Empresa			    : Anticipa S.A
		
	    M003
		Pagina				: c_calugayuda_index.js
		Propósito		    : Se deja Banner con la misma funcionalidad (LINK) que realizaba antes de modificacion M002  
		Fecha Creación      : 02/12/2009
		Autor			    : Miguel Becerra
		Empresa			    : Anticipa S.A		
	
		Modificación				: M004
		Fecha Modificación	: 18/12/2009
		Autor								: Amed Carvajal A.
		Empresa							: Anticipa S.A
		Objetivo						: Se agrega funcion "vali_mouse(), trim_buscador(variable), Buscar()" y se valida que cuando 
													el JS es llamado desde la	pagina index.htm, muestre la Opcion de Buscador y cuando es 
													llamado desde el index_usuario_registrado, muestre la Imagen y funcionalidad de 
													"Consulte el resultado de sus operaciones".
													
	    Modificación				: M005
		Fecha Modificación	: 14/05/2010
		Autor							: David Morales R.
		Empresa							: Anticipa S.A
		Objetivo						: Se cambió imagen de banner y link 
		
		Modificación				: M006
		Fecha Modificación	: 25/11/2010
		Autor								: Claudio Correa
		Empresa							: Anticipa S.A
		Objetivo						: Se cambia banner por aplicación SWF.

	
	 Modificación				: M007
		Fecha Modificación	: 03/12/2010
		Autor								: Ricardo Hidalgo
		Empresa							: Anticipa S.A
		Objetivo						: Se agrega pagina segura en codebase y pluginspage de flash

	Modificación  			        : M008
		Fecha Modificación 		        : 11/03/2011
		Autor   						: Frncisco Aceituno F
		Empresa   						: Anticipa S.A.
		Objetivo  						: Se agrega imagen logo ISO y tb se desaparece la imagen del logo de la parte inferior de la pagina

	*/
	/*Inicio M004*/
	function vali_mouse()	{
		var SCambio = / /gi;
		var sURLBusqueda = '';
		if (Buscar())	{
			sURLBusqueda = '/browse.asp?pagina=web/resultado_busquedasi.htm&Busqueda=' + document.form2_buscador.Busqueda.value;
			sURLBusqueda = sURLBusqueda.replace(SCambio,'+');
			location.replace(sURLBusqueda);
		}
	}
	function trim_buscador(variable){
		largo=variable.length;
		m=0;
		while (m<largo)	{
			caracter=variable.substring(m,m+1);
			if (caracter != " "){
				break;
			}
			m++;
		}
		if (m==largo)	{
			return "";
		}
		n=0;
		while (n<largo){
			caracter=variable.substring(largo-n-1,largo-n);
			if (caracter != " "){
				break;
			}
			n++;
		}
		variable=variable.substring(m,largo-n);
		return variable;
}
	function Buscar(){
		if (trim_buscador(document.form2_buscador.Busqueda.value)=="")	{
			document.form2_buscador.Busqueda.value="";
			alert('Debe ingresar información a buscar');
			document.form2_buscador.Busqueda.focus();
			return false;
		}
		if (document.form2_buscador.Busqueda.value.length < 3)	{
			document.form2_buscador.Busqueda.value="";
			alert('La Busqueda debe tener por lo menos 3 caracteres');
			document.form2_buscador.Busqueda.focus();
			return false;
		}
		return true;
}
	/*Fin M004*/
	function URLJuegosOnLine()
	{
		URL = '/browse.asp?pagina=Juegos_Online/juego_online_entrada.htm';
		location.replace(URL);
	}
	

	var arrayMsgContext	= new Array();
	var sCaluga		= '';
	arrayMsgContext[1]	= 'NP/flash/caluga_registrese.swf';	/*Beneficios*/
	arrayMsgContext[2]	= 'NP/flash/que_pagar.swf'; /*Buscador*/
	arrayMsgContext[3]	= 'NP/flash/caluga_servicios.swf'; /*Calandario Pagos*/
	arrayMsgContext[4]	= 'NP/flash/caluga_ayuda.swf'; /*Desinscripción Informativo*/
	arrayMsgContext[5]	= 'NP/flash/caluga_ayuda.swf'; /*Desinscripción Informativo Respuesta*/
	arrayMsgContext[6]	= 'NP/flash/caluga_ayuda.swf'; /*Desinscripción Informativo Respuesta*/
	arrayMsgContext[7]	= 'NP/flash/como_pagar.swf'; /*Desinscripción Sitio*/
	arrayMsgContext[8]	= 'NP/flash/como_pagar.swf'; /*Desinscripción Sitio Respuesta*/
	arrayMsgContext[9]	= 'NP/flash/como_pagar.swf'; /*Desinscripción Sitio Respuesta*/
	arrayMsgContext[10]	= 'NP/flash/conque_pagar.swf'; /*Empresas Convenio*/
	arrayMsgContext[11]	= 'NP/flash/caluga_beneficios.swf'; /*Identidad Corporativa*/
	arrayMsgContext[12]	= 'NP/flash/mapa2.swf'; /*Home No Logueado */

	//Inicio M002
	var ValidaAccesoJuegos = 'https://' + document.domain + '/browse.asp?pagina=web/index_usuario_registrado.htm&JUEGOS-ONLINE-SERVIPAG';
	if (ValidaAccesoJuegos == location.href)
	{
		//M002
		arrayMsgContext[13]	= 'NP/flash/dominala_125x125.swf'; /*Home Logueado*/      
	}
	else
	{
		//M002
		arrayMsgContext[13]	= 'NP/images/im_prom.jpg'; /*Home Logueado */
	}
	//Fin M002
	arrayMsgContext[14]	= 'NP/flash/que_pagar.swf'; /*Inscripción Informativo*/
	arrayMsgContext[15]	= 'NP/flash/caluga_ayuda.swf'; /*Login*/
	arrayMsgContext[16]	= 'NP/flash/caluga_registrese.swf'; /*Oportunidad de Trabajo*/
	arrayMsgContext[17]	= 'NP/flash/caluga_registrese.swf'; /*Quienes Somos*/
	arrayMsgContext[18]	= 'NP/flash/que_pagar.swf'; /*Recuperación Clave*/
	arrayMsgContext[19]	= 'NP/flash/caluga_beneficios.swf'; /*Seguimos Creciendo*/
	arrayMsgContext[20]	= 'NP/flash/caluga_beneficios.swf';	/*Servicios*/
	arrayMsgContext[21]	= 'NP/flash/caluga_registrese.swf'; /*Servipag.Com*/
	arrayMsgContext[22]	= 'NP/flash/conque_pagar.swf'; /*Resultado Buscador Empresas*/
	arrayMsgContext[23]	= 'NP/flash/caluga_ayuda.swf'; /*Resultado Buscador Empresas Respuesta*/
	arrayMsgContext[24]	= 'NP/flash/caluga_ayuda.swf'; /*Resultado Búsqueda*/
	arrayMsgContext[25]	= 'NP/flash/conque_pagar.swf'; /*Resultado Búsqueda*/
	arrayMsgContext[26]	= 'NP/flash/caluga_ayuda.swf'; /*Advertencia*/
	arrayMsgContext[27]	= 'NP/flash/caluga_registrese.swf'; /*Cliente Total*/
	
	if ((typeof MsgContext != 'undefined') && (typeof logeado_dll != 'undefined'))
	{
  		if ((MsgContext == 1)  && (logeado_dll == 1))	arrayMsgContext[1]	= 'NP/flash/mapa2.swf';
  		if ((MsgContext == 16) && (logeado_dll == 1))	arrayMsgContext[16]	= 'NP/flash/caluga_beneficios.swf';
  		if ((MsgContext == 17) && (logeado_dll == 1))	arrayMsgContext[17]	= 'NP/flash/que_pagar.swf';
  		if ((MsgContext == 21) && (logeado_dll == 1))	arrayMsgContext[21]	= 'NP/flash/mapa2.swf';
  		sCaluga = arrayMsgContext[MsgContext]
	}
	else if (typeof logeado_dll == 'undefined')
	{
  		sCaluga = arrayMsgContext[MsgContext]
	}

	if (sLogin)
	{
		document.write('<table width="140" height="135" border="0" cellpadding="0" cellspacing="0" id="lateral">');
		document.write('	<tr>');
		document.write('		<td><img src="NP/images/spacer.gif" width="1" height="5"></td>');
		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td>');
		document.write('			<table width="140" border="0" align="center" cellpadding="0" cellspacing="0">');
		document.write('				<tr>');
		document.write('					<td background="NP/images/leng_izq.jpg">');
		document.write('						<table width="95%" height="20" border="0" align="center" cellpadding="0" cellspacing="0">');
		document.write('							<tr>');
		document.write('								<td><p><strong>Promociones</strong></p></td>');
		document.write('							</tr>');		
		document.write('						</table>');
		document.write('					</td>');
		document.write('				</tr>');
		document.write('				<tr>');
		document.write('					<td height="27" align="center">');
		document.write('						<table width="136" border="0" cellpadding="0" cellspacing="0" bordercolor="#C0C0C0" bgcolor="#DFE1E3">');
		document.write('							<tr>');
		document.write('								<td>');
		document.write('									<table width="136" height="25" border="0" cellpadding="0" cellspacing="0">');
		document.write('										<tr>');
		document.write('											<td align="center">');
//  		document.write('												<object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="125" height="125">');
		//M002
		var ValidaAccesoJuegos = 'https://' + document.domain + '/browse.asp?pagina=web/index_usuario_registrado.htm&JUEGOS-ONLINE-SERVIPAG';
		if (ValidaAccesoJuegos == location.href)
		{
	  		document.write('												<object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="125" height="125">');
			document.write('												<param name="movie" value="NP/flash/dominala_125x125.swf">');
  			document.write('												<param name="quality" value="high">');
  			document.write('												<embed src="NP/flash/dominala_125x125.swf" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="125" height="125"></embed>');
			document.write('												</object>');
		}
		else
		{
			//M003
			//document.write('												<param name="movie" value="NP/images/im_prom.jpg">');
  			//document.write('												<param name="quality" value="high">');
  			//document.write('												<embed src="NP/images/im_prom.jpg" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="125" height="125"></embed>');
			//M003
			
			/* Inicio M006*/
			//document.write('												<a href="http://empresas.travelclub.cl/sitios/tiendatotal"><img src="NP/images/boton_fijo_125x125.jpg" width="125" height="125" border="0"></a>');
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="125" height="125" id="NP/flash/banner_home_cr" align="middle">');/*M007*/
			document.write('<param name="allowScriptAccess" value="sameDomain" />');
			document.write('<param name="movie" value="NP/flash/banner_home_cr.swf" />');
			document.write('<param name="quality" value="high" />');
			document.write('<param name="bgcolor" value="#ffffff" />');
			document.write('<embed src="NP/flash/banner_home_cr.swf" quality="high" bgcolor="#ffffff" width="125" height="125" name="NP/flash/banner_home_cr" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />');/*M007*/
			document.write('</object>')
			/* Fin M006 */
		}
		//M002
  		//document.write('												</object>');
		document.write('											</td>');
		document.write('										</tr>');
    	document.write('									</table>');
    	document.write('								</td>');
    	document.write('							</tr>');
    	document.write('						</table>');
    	document.write('					</td>');
    	document.write('				</tr>');
    	document.write('			</table>');
    	document.write('		</td>');
		document.write('	</tr>');
  		document.write('	<tr>');
    	document.write('		<td><img src="NP/images/spacer.gif" width="1" height="5"></td>');
  		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td>');
		document.write('			<table width="140" border="0" align="center" cellpadding="0" cellspacing="0">');
		document.write('				<tr>');
		document.write('					<td background="NP/images/leng_izq.jpg">');
		document.write('						<table width="95%" height="20" border="0" align="center" cellpadding="0" cellspacing="0">');
		document.write('							<tr>');
		document.write('								<td><p><strong>Formas de Pago</strong></p></td>');
		document.write('							</tr>');		
		document.write('						</table>');
		document.write('					</td>');
		document.write('				</tr>');
		document.write('				<tr>');
		document.write('					<td height="27" align="center">');
		document.write('						<table width="136" border="0" cellpadding="0" cellspacing="0" bordercolor="#C0C0C0" bgcolor="#DFE1E3">');
		document.write('							<tr>');
		document.write('								<td>');
		document.write('									<table width="136" height="25" border="0" cellpadding="0" cellspacing="0">');
		document.write('										<tr>');
		document.write('											<td align="center">');
  		document.write('												<object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="125" height="125">');
  		document.write('												<param name="movie" value="NP/flash/conque_pagar.swf">');
  		document.write('												<param name="quality" value="high">');
  		document.write('												<embed src="NP/flash/conque_pagar.swf" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="125" height="125"></embed>');
  		document.write('												</object>');
		document.write('											</td>');
		document.write('										</tr>');
    	document.write('									</table>');
    	document.write('								</td>');
    	document.write('							</tr>');
    	document.write('						</table>');
    	document.write('					</td>');
    	document.write('				</tr>');
    	document.write('			</table>');
    	document.write('		</td>');
		document.write('	</tr>');  
  		document.write('	<tr>');
    	document.write('		<td><img src="NP/images/spacer.gif" width="1" height="5"></td>');
  		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td>');  			
		document.write('			<table width="140" border="0" cellpadding="0" cellspacing="0" id="lateral">');
		document.write('				<tr>');
		document.write('					<td align="center" valign="middle"><a href="/browse.asp?pagina=web/consulta_transaccionlog.htm"><img src="NP/images/consulte_transacciones.jpg" width="135" height="44"  border="0"  ></a></td>');
		document.write('				</r>');
		document.write('				<tr>');
		document.write('					<td align="center" valign="middle"><img src="NP/images/logoISO.jpg" width="150" height="85"  border="0" ></td>'); /*M008*/
		document.write('				</tr>');
		document.write('			</table>');		
		document.write('		</td>');
		document.write('	<tr>');			
  		document.write('</table>');
		document.getElementById("imgfondo").style.visibility='hidden';/*M008*/
		
	}
	else
	{
	
		
		document.write('<table width="140" height="135" border="0" cellpadding="0" cellspacing="0" id="lateral">');
		if (sCaluga != '')
		{
		  	document.write('<tr>');
			document.write('	<td><img src="NP/images/spacer.gif" width="1" height="5"></td>');
			document.write('</tr>');
			document.write('<tr>');
			document.write('	<td>');
			document.write('		<table width="140" border="0" align="center" cellpadding="0" cellspacing="0">');
			document.write('			<tr>');
			document.write('				<td background="NP/images/leng_izq.jpg">');
			document.write('					<table width="95%" height="20" border="0" align="center" cellpadding="0" cellspacing="0">');
			document.write('						<tr>');
			document.write('							<td><p><strong>Sucursales</strong></p></td>');
			document.write('						</tr>');		
			document.write('					</table>');
			document.write('				</td>');
			document.write('			</tr>');
			document.write('			<tr>');
			document.write('				<td height="27" align="center">');
			document.write('					<table width="136" border="0" cellpadding="0" cellspacing="0" bordercolor="#C0C0C0" bgcolor="#DFE1E3">');
			document.write('						<tr>');
			document.write('							<td>');
			document.write('								<table width="136" height="25" border="0" cellpadding="0" cellspacing="0">');
			document.write('									<tr>');
			//M005
			// document.write('									<td><a href="/browse.asp?pagina=web/localizador_sucursal.htm"><img src="NP/images/busca_suc.jpg" width="135" height="77" border="0"></a></td>'); <==== ASÍ ESTABA ANTES DEL CAMBIO M005
			document.write('									<td><a href="/browse.asp?pagina=web/centros_atencion.htm"><img src="NP/images/busca_suc.jpg" width="135" height="77" border="0"></a></td>');
            //FIN M005
			document.write('									</tr>');
    	    document.write('								</table>');
    	    document.write('							</td>');
    	    document.write('						</tr>');
    	    document.write('					</table>');
    	    document.write('				</td>');
    	  	document.write('			</tr>');
    		document.write('		</table>');
    		document.write('	</td>');
			document.write('</tr>');
  			document.write('<tr>');
    		document.write('	<td><img src="NP/images/spacer.gif" width="1" height="5"></td>');
  			document.write('</tr>');
  			document.write('<tr>');
    		document.write('	<td>');

    		document.write('		<table width="140" border="0" align="center" cellpadding="0" cellspacing="0">');
    	  	document.write('			<tr>');
    	    document.write('				<td background="NP/images/leng_izq.jpg">');
    	    document.write('					<table width="95%" height="20" border="0" align="center" cellpadding="0" cellspacing="0">');
    	    document.write('						<tr>');
    	    document.write('							<td><p><strong>Servipag Express</strong></p></td>');
    	    document.write('						</tr>');
			document.write('					</table>');
			document.write('				</td>');
			document.write('			</tr>');
			document.write('		</table>');	
			
			
			
			



			
			
			if (sCaluga != "NP/flash/mapa2.swf")
			{
				document.write('	<table width="140" height="136" border="0" cellpadding="0" cellspacing="0" id="lateral">');
  				document.write('		<tr>');
  				document.write('			<td height="135" background="images/fondo_caluga.gif" align="center">');
  				document.write('				<object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="125" height="125">');
  				document.write('				<param name="movie" value="NP/flash/mapa2.swf">');
  				document.write('				<param name="quality" value="high">');
  				document.write('				<embed src="NP/flash/mapa2.swf" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="125" height="125"></embed>');
  				document.write('				</object>');
  				document.write('			</td>');
  				document.write('		</tr>');
  				document.write('		<tr>');
  				document.write('			<td background="images/fondo_caluga.gif">&nbsp;</td>');
  				document.write('		</tr>');
  				document.write('	</table');	
				
				
			}
			
			document.write('		<table width="140" height="136" border="0" cellpadding="0" cellspacing="0" id="lateral">');
  			document.write('			<tr>');
  			document.write('				<td height="135" background="images/fondo_caluga.gif" align="center">');
  			document.write('					<object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="125" height="125">');
  			document.write('					<param name="movie" value="'+ sCaluga +'">');
  			document.write('					<param name="quality" value="high">');
  			document.write('					<embed src="'+ sCaluga + '" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="125" height="125"></embed>');
  			document.write('					</object>');
  			document.write('				</td>');
  			document.write('			</tr>');
  			document.write('			<tr>');
  			document.write('				<td background="images/fondo_caluga.gif">&nbsp;</td>');
  			document.write('			</tr>');
  			document.write('		</table'); 
  			document.write('	</td'); 
  			document.write('</tr>'); 
  			document.write('</table>');
  			/*Inicio M004*/
  		
				/*document.write('			<table width="140" border="0" cellpadding="0" cellspacing="0" id="lateral">');
			document.write('				<tr>');
			document.write('					<td align="center" valign="middle"><a href="/browse.asp?pagina=web/consulta_transaccionnolog.htm"><img src="NP/images/consulte_transacciones.jpg" width="135" height="44"  border="0" ></a></td>');
			document.write('				</tr>');
			ument.write('				<tr>');
			document.write('					<td align="center" valign="middle"><a href=""><img src="NP/images/pruebaISO.jpg" width="135" height="44"  border="0" ></a></td>');
			document.write('				</tr>');

			document.write('			</table>');	Se comenta el Table completo, porque es reemplazado por lo TR siguientes*/

	  		document.write('<tr>');
				document.write('	<td><img src="NP/images/spacer.gif" width="1" height="5"></td>');
				document.write('</tr>');
				document.write('<tr>');
				document.write('	<td>');
				document.write('		<form name="form2_buscador" action="/browse.asp" method="post">');
				document.write('			<table width="140" border="0" align="center" cellpadding="0" cellspacing="0">');
				document.write('				<tr>');
				document.write('					<td background="NP/images/leng_izq.jpg">');
				document.write('						<table width="95%" height="20" border="0" align="center" cellpadding="0" cellspacing="0">');
				document.write('							<tr>');
				document.write('								<td><p><strong>Buscador</strong></p></td>');
				document.write('							</tr>');		
				document.write('						</table>');
				document.write('					</td>');
				document.write('				</tr>');
				document.write('				<tr>');
				document.write('					<td height="27" align="center">');
				document.write('						<table width="136" border="0" cellpadding="0" cellspacing="0" bordercolor="#C0C0C0" bgcolor="#DFE1E3">');
				document.write('							<tr>');
				document.write('								<td>');
				document.write('									<table width="136" height="25" border="0" cellpadding="0" cellspacing="0">');
				document.write('										<tr>');
				document.write('											<td width="110"><input type="text" size="10" name="Busqueda" Onkeypress="Javascript:if (event.keyCode==13) return vali_enter();"></td>');
				document.write('											<td width="17" align="right"><a href="javascript: vali_mouse()"><img src="NP/images/btn_ir.gif" width="17" height="18" border="0"></a></td>');
				document.write('										</tr>');
    	  document.write('									</table>');
    	  document.write('								</td>');
    	  document.write('							</tr>');
    	  document.write('						</table>');
    	  document.write('					</td>');
    	  document.write('				</tr>');
			document.write('			</table>');		
    		document.write('		</form>');
    		document.write('	</td>');
				document.write('</tr>');
  			document.write('<tr>');
    		document.write('	<td><img src="NP/images/spacer.gif" width="1" height="5"></td>');
  			document.write('</tr>');
  			document.write('<tr>');
    		document.write('	<td>');
				/*Fin M004*/
		
		}
		else
		{
  			document.write('<tr>');
  			document.write('	<td>&nbsp;</td>');
  			document.write('<tr>');
  			document.write('</table>');
		}
	}
//-->
