function solicitelo(origen)
{
//alert(origen)

if ( (origen =="ContactoMLF")|| (origen =="Contacto")||(origen =="SolicitoEspecialista") )
{
	alto = 40
	txt_colspan = "colspan='2'"
	txt_clase = "class='input_gris_oculto'"
}
else
{
	alto = 25
	txt_colspan = ""
	txt_clase = "class='input_home'"
}

if (origen =="SolicitoEspecialista")
{
var texto = "<form name='form_solicitud' method='post' action='"+ RUTA_PAG + "Aplicaciones/contacto/procesa_solicitud.asp?txt_origen="+origen+"'\'>"; 
txt_form = "form_solicitud"
}
else
{
var texto = "<form name='form_contacto' method='post' action='"+ RUTA_PAG + "Aplicaciones/contacto/procesa_solicitud.asp?txt_origen="+origen+"'\'>"; 
txt_form = "form_contacto"

}


if (origen=="SolicitoEspecialista")
	origen ="Contacto";
	
texto = texto + "<table id='Tb_Formulario' border='0' cellspacing='0' cellpadding='0' width='98%' align=center>";
texto = texto + "<tr height='5'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "</tr>"

texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'>";

if (origen =="ImpresionBrokers")
texto = texto + " Nombre Solicitante: (*)";
else
texto = texto + " Nombre: (*)";

if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";

texto = texto + "<input id='Txt_Nombre' name='Txt_Nombre' type='text' class='input_home' size='30' onkeypress='return onlyLetras(event)' tabindex='10' >";
texto = texto + "</td>";
texto = texto + "</tr>";


if (origen =="ImpresionBrokers")
{
texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Corredora: (*)";
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
texto = texto + "<input id='Txt_Corredora' name='Txt_Corredora' type='text' class='input_home' size='30' onkeypress='return onlyLetras(event)' tabindex='10' >";
texto = texto + "</td>";
texto = texto + "</tr>";
}
else
{
texto = texto + "<input id='Txt_Corredora' name='Txt_Corredora' type='hidden' value='X'>";

}

if (origen =="ImpresionBrokers")
{
texto = texto + "<input id='Txt_ApPaterno' name='Txt_ApPaterno' type='hidden' value='X'>";
texto = texto + "<input id='Txt_ApMaterno' name='Txt_ApMaterno' type='hidden' value='X'>";
}
else
{
	texto = texto + "<tr height='"+ alto + "'>";
	texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Apellido Paterno: (*)";
	if (origen !="Contacto")
	{
		texto = texto + "</td>";
		texto = texto + "<td align='left'>";
	}
	else
		texto = texto + "<br>";

	texto = texto + "<input id='Txt_ApPaterno' name='Txt_ApPaterno' type='text' class='input_home'  size='30'  onkeypress='return onlyLetras(event)' tabindex='11' >";
	texto = texto + "</td>";
	texto = texto + "</tr>";
	texto = texto + "<tr  height='"+ alto + "'>";
	texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Apellido Materno: (*)";
	if (origen !="Contacto")
	{
		texto = texto + "</td>";
		texto = texto + "<td align='left'>";
	}
	else
		texto = texto + "<br>";

	texto = texto + "<input id='Txt_ApMaterno' name='Txt_ApMaterno' type='text' class='input_home' size='30'  onkeypress='return onlyLetras(event)' tabindex='12' >";
	texto = texto + "</td>";
	texto = texto + "</tr>";
}

if (origen =="ImpresionBrokers")
{
	texto = texto + "<tr height='"+ alto + "'>";
	texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Empresa: (*)";
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
	texto = texto + "<input id='Txt_Empresa' name='Txt_Empresa' type='text' class='input_home' size='30' onkeypress='return onlyLetras(event)' tabindex='10' >";
	texto = texto + "</td>";
	texto = texto + "</tr>";
}


// Inicio Rut 
if (origen !="ImpresionBrokers")
{
/*
	if ( (origen =="Contacto") && (txt_form == "form_contacto") )
	{
	texto = texto + "<input id='Txt_Rut' name='Txt_Rut' type='hidden' value='19'>";
	}
	else
	{	
*/
		texto = texto + "<tr height='"+ alto + "'>";
	
		texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
		texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Rut: (*)";
	
		if (origen !="Contacto")
		{
			texto = texto + "</td>";
			texto = texto + "<td align='left'>";
		}
		else
			texto = texto + "<br>";

		texto = texto + "<input id='Txt_Rut' name='Txt_Rut' type='text' class='input_home' size='10' onchange='return verifica_rut(this)' onblur='verifica_rut(this)' tabindex='13' >";
		texto = texto + "</td>";
		texto = texto + "</tr>";
	//}
}	
else
{
texto = texto + "<input id='Txt_Rut' name='Txt_Rut' type='hidden' value='19'>";
}

// Fin Rut

// Inicio  Fono Fijo - Fono Móvil
texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left'>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Fono Fijo: (*)";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";
texto = texto + "<input id='Txt_CodArea' name='Txt_CodArea' type='text' class='input_home' style='width:20px;' maxlength='3' onkeypress='return KeyIsCharacter(event)'  tabindex='14' >";
texto = texto + "&nbsp;<input id='Txt_Fono' name='Txt_Fono' type='text' class='input_home' style='width:55px;' onkeypress='return KeyIsCharacter(event)'  tabindex='14' >";
texto = texto + "&nbsp;&nbsp;&nbsp;</td>";


if (origen !="Contacto")
{
texto = texto + "</tr>";
texto = texto + "<tr height='"+ alto + "'>";
}
texto = texto + "<td class='text_detalle'  align='left'>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Fono M&oacute;vil: ";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";
	
	texto = texto + "<select id='cmb_CodCelula' name='cmb_CodCelula' class='input_home' tabindex='16' style='width:34px;'>";
	texto = texto + "<option value='6'>6</option>";
	texto = texto + "<option value='7'>7</option>";
	texto = texto + "<option value='8'>8</option>";
	texto = texto + "<option value='9' selected>9</option>";
	texto = texto + "</select>";
	
	
texto = texto + "&nbsp;<input id='Txt_FonoMovil' name='Txt_FonoMovil' type='text' class='input_home' style='width:55px;' onkeypress='return KeyIsCharacter(event)'  tabindex='14' >";
texto = texto + "</td>";


texto = texto + "</tr>";
// Fin  Fono Fijo - Fono Móvil


// Solo Contacto
// Inicio Direccion Comuna Ciudad Region
if ( (origen =="Contacto")&& (txt_form == "form_contacto") )
{
texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' colspan=2>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Direcci&oacute;n:";
texto = texto + "<br>";
texto = texto + "&nbsp;<input id='Txt_Direccion' name='Txt_Direccion' type='text' class='input_home' style='width:180px;'   tabindex='14' >";
texto = texto + "</td>";
texto = texto + "</tr>";

texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left'>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Comuna:";
texto = texto + "<br>";
texto = texto + "<input id='Txt_Comuna' name='Txt_Comuna' type='text' class='input_home' style='width:85px;'  tabindex='14' >";
texto = texto + "&nbsp;&nbsp;&nbsp;</td>";
texto = texto + "<td class='text_detalle'  align='left'>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Ciudad:";
texto = texto + "<br>";
texto = texto + "&nbsp;<input id='Txt_Ciudad' name='Txt_Ciudad' type='text' class='input_home' style='width:85px;'   tabindex='14' >";
texto = texto + "</td>";
texto = texto + "</tr>";

texto = texto + "<tr height='"+ alto + "' >";
texto = texto + "<td class='text_detalle'  align='left' colspan=2>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Region:";
texto = texto + "<br>";
texto += "&nbsp;<select id=Txt_Region name=Txt_Region class='input_home' style='width:180px;'>";
texto += "<option value='' selected>Seleccione</option>";
texto += "<option value='XV'>XV Región de Arica y Parinacota</option>";
texto += "<option value='I'>I Región de Tarapacá</option>";
texto += "<option value='II'>II Región de Antofagasta</option>";
texto += "<option value='III'>III Región de Atacama</option>";
texto += "<option value='IV'>IV Región de Coquimbo</option>";
texto += "<option value='V'>V Región de Valparaíso</option>";
texto += "<option value='VI'>VI Región del Libertador Bernardo O'Higgin</option>";
texto += "<option value='VII'>VII Región del Maule</option>";
texto += "<option value='VIII'>VIII Región del Bío Bío</option>";
texto += "<option value='IX'>IX Región de la Araucanía</option>";
texto += "<option value='XIV'>XIV Región de Los Ríos</option>";
texto += "<option value='X'>X Región de los Lagos</option>";
texto += "<option value='XI'>XI Región de Aysén del General Carlos Ibáñez del Campo</option>";
texto += "<option value='XII'>XII Región de Magallanes y la Antártica Chilena</option>";
texto += "<option value='XIII'>XIII Región Metropolitana de Santiago</option>";
texto += "</select>";
texto = texto + "</td>";
texto = texto + "</tr>";
}
else
{
texto = texto + "<input type='hidden' name='Txt_Direccion' id='Txt_Direccion'  value='-' >";
texto = texto + "<input type='hidden' name='Txt_Comuna' id='Txt_Comuna' value='-' >";
texto = texto + "<input type='hidden' name='Txt_Ciudad' id='Txt_Ciudad' value='-' >";
texto = texto + "<input type='hidden' name='Txt_Region' id='Txt_Region' value='-' >";
}
// Fin Direccion Comuna Ciudad Region


texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Email: (*)";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";
texto = texto + "<input id='Txt_Email' name='Txt_Email' type='text' class='input_home' size='30' onchange='return mail(this.value)' tabindex='15' >";
texto = texto + "</td>";
texto = texto + "</tr>";

// Mail 2
texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Email Verificación: (*)";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";
texto = texto + "<input id='Txt_Email_Valida' name='Txt_Email_Valida' type='text' class='input_home' size='30' onchange='return mail(this.value)' tabindex='15' >";
texto = texto + "</td>";
texto = texto + "</tr>";

/*
if ( (origen =="Contacto")&& (txt_form == "form_contacto") )
{
	texto = texto + " <tr height='"+ alto + "'>";
	texto = texto + "<td align='left' class='text_detalle'  align='left' colspan='2'>";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Asunto: (*)";
	texto = texto + "<br>";
	texto = texto + "<select id='cmb_asunto' name='cmb_asunto' class='input_home' tabindex='16' >";
	texto = texto + "<option value='Informacion'>Información</option>";
	texto = texto + "<option value='Siniestros'>Siniestros</option>";
	texto = texto + "<option value='Reclamos'>Reclamos</option>";
	texto = texto + "<option value='Felicitaciones'>Felicitaciones</option>";
	texto = texto + "<option value='Otros'>Otros</option>";
	texto = texto + "</select>";
	texto = texto + "</td>";
	texto = texto + "</tr>";
}
else
{
*/
	texto = texto + "<input type='hidden' name='cmb_asunto'  value='Informacion' >";
//}

/* información de motivo contacto  y  linea de negocio */


if ( (origen =="Contacto")&& (txt_form == "form_contacto") )
{
// Comentado para resolver problema js + grabación
//if ( ((origen =="Contacto") || (origen =="ServicioPersonas")) && (txt_form == "form_contacto") )
//{


    //Motivo
    if (origen =="ServicioPersonas") {
        vl_colspan=1;
        vl_br="</td><td>";
    }
    else {
        vl_colspan=2;
        vl_br="<br>";
    }
    
    
    
    texto = texto + " <tr height='"+ alto + "'>";
	texto = texto + "<td align='left' class='text_detalle'  align='left' colspan='" + vl_colspan + "' nowrap>";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Motivo Contacto: (*) ";
	texto = texto + vl_br;
	texto = texto + "<select id='cmb_motivo' name='cmb_motivo' class='input_home' tabindex='16' onchange='CambioMotivo();'>";
	texto = texto + "<option value='1' Selected >Servicio Clientes</option>";
	texto = texto + "<option value='2'          >Cotización</option>";
	texto = texto + "</select>";
	texto = texto + "</td>";
	texto = texto + "</tr>";
	
	texto = texto + "<script> function CambioMotivo () {";
   	texto = texto + "        if (document.getElementById('cmb_motivo').value == '2') {  ";
	texto = texto + "            document.getElementById('trln').style.display='';";
	texto = texto + "           }";
	texto = texto + "        else {";
	texto = texto + "            document.getElementById('trln').style.display='none';";
	texto = texto + "            document.getElementById('cmb_linea').selectedIndex=0;";
	texto = texto + "           }";
	texto = texto + "        }";
    texto = texto + "</script>";
	
	//linea Negocio
	
	texto = texto + "<tr id='trln' height='"+ alto + "' style='display:none;'>";
	texto = texto + "<td align='left' class='text_detalle'  align='left' colspan='" + vl_colspan + "' nowrap>";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Línea Negocio: (*)";
	texto = texto + vl_br;
	texto = texto + "<select id='cmb_linea' name='cmb_linea' class='input_home' tabindex='16' >";
	texto = texto + "<option value='0' selected>.: Seleccione :.</option>";
	texto = texto + "<option value='25'        >Comercial Seguros Personas</option>";
	texto = texto + "<option value='24'        >Comercial Seguros Colectivos</option>";
	texto = texto + "<option value='27'        >Comercial Mutuos Hipotecarios</option>";
	texto = texto + "<option value='26'        >Comercial Rentas Vitalicias</option>";
	texto = texto + "</select>";
	texto = texto + "</td>";
	texto = texto + "</tr>";

}
else
{
texto = texto + "<input name='cmb_linea' id='cmb_linea' type='hidden' value='0' />";

}
/* fin linea de negocio*/


texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td valign='top' class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Comentarios: (*)";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";

texto = texto + "<textarea name ='Txt_Comentarios' rows='4' cols='32' id='Txt_Comentarios'  class='input_home'  tabindex='17'  ></textarea>";
texto = texto + "&nbsp;<input name='txt_len' type='hidden' value='( 2720 )' readonly='readonly' id='txt_len' "+txt_clase+" size='5' />";
texto = texto + "</td>";
texto = texto + "</tr>";


texto = texto + "<tr>";
texto = texto + " <td colspan='2' align='center' valign='center' height='10px'>";
texto = texto + "</td>";
texto = texto + "</tr>";

texto = texto + "<tr>";
texto = texto + " <td colspan='2' align='center' valign='center' >";
texto = texto + "<img onclick=ValidaForm('"+txt_form+"') tabindex='18' src='"+ RUTA_PAG + "imagenes/botones/btn_enviar.gif \'   border='0' style='cursor:hand'>&nbsp;&nbsp;";
texto = texto + "<img  onclick=borrar('"+txt_form+"'); tabindex='19' src='"+ RUTA_PAG + "imagenes/botones/btn_borrar.gif \'  border='0' style='cursor:hand'>";
texto = texto + "</td>";
texto = texto + "</tr>";
texto = texto + "</table>";
texto = texto + "</form>";
/*
texto = texto + "<script language='javascript' event='onkeyup' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onkeydown' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onblur' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onmouseup' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onmousedown' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onmousemove' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onmouseout' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
*/

//alert (texto)
return texto;
}


//////////////////////////////////////////////////////////////////////////////////////////////////
function solicitelo_con_linea(origen,val_btn)
{


if ( (origen =="ContactoMLF")|| (origen =="Contacto")||(origen =="SolicitoEspecialista") )
{
	alto = 40
	txt_colspan = "colspan='2'"
	txt_clase = "class='input_gris_oculto'"
}
else
{
	alto = 25
	txt_colspan = ""
	txt_clase = "class='input_home'"
}

if (origen =="SolicitoEspecialista")
{
var texto = "<form name='form_solicitud' method='post'  action='"+ RUTA_PAG + "Aplicaciones/contacto/procesa_solicitud.asp?txt_origen="+origen+"&val_btn="+val_btn+"'\'>"; 
txt_form = "form_solicitud"
}
else
{
var texto = "<form name='form_contacto' method='post' action='"+ RUTA_PAG + "Aplicaciones/contacto/procesa_solicitud.asp?txt_origen="+origen+"&val_btn="+val_btn+"'\'>"; 
txt_form = "form_contacto"

}

texto = texto + "<input id='Txt_valor_linea' name='Txt_valor_linea' type='hidden' >";


if (origen=="SolicitoEspecialista")
	origen ="Contacto";
	
texto = texto + "<table id='Tb_Formulario' border='0' cellspacing='0' cellpadding='0' width='98%' align=center>";
texto = texto + "<tr height='5'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "</tr>"

texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'>";

if (origen =="ImpresionBrokers")
texto = texto + " Nombre Solicitante: (*)";
else
texto = texto + " Nombre: (*)";

if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";

texto = texto + "<input id='Txt_Nombre' name='Txt_Nombre' type='text' class='input_home' size='30' onkeypress='return onlyLetras(event)' tabindex='10' >";
texto = texto + "</td>";
texto = texto + "</tr>";


if (origen =="ImpresionBrokers")
{
texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Corredora: (*)";
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
texto = texto + "<input id='Txt_Corredora' name='Txt_Corredora' type='text' class='input_home' size='30' onkeypress='return onlyLetras(event)' tabindex='10' >";
texto = texto + "</td>";
texto = texto + "</tr>";
}
else
{
texto = texto + "<input id='Txt_Corredora' name='Txt_Corredora' type='hidden' value='X'>";

}

if (origen =="ImpresionBrokers")
{
texto = texto + "<input id='Txt_ApPaterno' name='Txt_ApPaterno' type='hidden' value='X'>";
texto = texto + "<input id='Txt_ApMaterno' name='Txt_ApMaterno' type='hidden' value='X'>";
}
else
{
	texto = texto + "<tr height='"+ alto + "'>";
	texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Apellido Paterno: (*)";
	if (origen !="Contacto")
	{
		texto = texto + "</td>";
		texto = texto + "<td align='left'>";
	}
	else
		texto = texto + "<br>";

	texto = texto + "<input id='Txt_ApPaterno' name='Txt_ApPaterno' type='text' class='input_home'  size='30'  onkeypress='return onlyLetras(event)' tabindex='11' >";
	texto = texto + "</td>";
	texto = texto + "</tr>";
	texto = texto + "<tr  height='"+ alto + "'>";
	texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Apellido Materno: (*)";
	if (origen !="Contacto")
	{
		texto = texto + "</td>";
		texto = texto + "<td align='left'>";
	}
	else
		texto = texto + "<br>";

	texto = texto + "<input id='Txt_ApMaterno' name='Txt_ApMaterno' type='text' class='input_home' size='30'  onkeypress='return onlyLetras(event)' tabindex='12' >";
	texto = texto + "</td>";
	texto = texto + "</tr>";
}

if (origen =="ImpresionBrokers")
{
	texto = texto + "<tr height='"+ alto + "'>";
	texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Empresa: (*)";
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
	texto = texto + "<input id='Txt_Empresa' name='Txt_Empresa' type='text' class='input_home' size='30' onkeypress='return onlyLetras(event)' tabindex='10' >";
	texto = texto + "</td>";
	texto = texto + "</tr>";
}


// Inicio Rut 
if (origen !="ImpresionBrokers")
{
/*
	if ( (origen =="Contacto") && (txt_form == "form_contacto") )
	{
	texto = texto + "<input id='Txt_Rut' name='Txt_Rut' type='hidden' value='19'>";
	}
	else
	{	
*/
		texto = texto + "<tr height='"+ alto + "'>";
	
		texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
		texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Rut: (*)";
	
		if (origen !="Contacto")
		{
			texto = texto + "</td>";
			texto = texto + "<td align='left'>";
		}
		else
			texto = texto + "<br>";

		texto = texto + "<input id='Txt_Rut' name='Txt_Rut' type='text' class='input_home' size='10' onchange='return verifica_rut(this)' onblur='verifica_rut(this)' tabindex='13' >";
		texto = texto + "</td>";
		texto = texto + "</tr>";
	//}
}	
else
{
texto = texto + "<input id='Txt_Rut' name='Txt_Rut' type='hidden' value='19'>";
}

// Fin Rut

// Inicio  Fono Fijo - Fono Móvil
texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left'>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Fono Fijo: (*)";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";
texto = texto + "<input id='Txt_CodArea' name='Txt_CodArea' type='text' class='input_home' style='width:20px;' maxlength='3' onkeypress='return KeyIsCharacter(event)'  tabindex='14' >";
texto = texto + "&nbsp;<input id='Txt_Fono' name='Txt_Fono' type='text' class='input_home' style='width:55px;' onkeypress='return KeyIsCharacter(event)'  tabindex='14' >";
texto = texto + "&nbsp;&nbsp;&nbsp;</td>";


if (origen !="Contacto")
{
texto = texto + "</tr>";
texto = texto + "<tr height='"+ alto + "'>";
}
texto = texto + "<td class='text_detalle'  align='left'>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Fono M&oacute;vil: ";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";
	
	texto = texto + "<select id='cmb_CodCelula' name='cmb_CodCelula' class='input_home' tabindex='16' style='width:34px;'>";
	texto = texto + "<option value='6'>6</option>";
	texto = texto + "<option value='7'>7</option>";
	texto = texto + "<option value='8'>8</option>";
	texto = texto + "<option value='9' selected>9</option>";
	texto = texto + "</select>";
	
	
texto = texto + "&nbsp;<input id='Txt_FonoMovil' name='Txt_FonoMovil' type='text' class='input_home' style='width:55px;' onkeypress='return KeyIsCharacter(event)'  tabindex='14' >";
texto = texto + "</td>";


texto = texto + "</tr>";
// Fin  Fono Fijo - Fono Móvil


// Solo Contacto
// Inicio Direccion Comuna Ciudad Region
//if ( (origen =="Contacto")&& (txt_form == "form_contacto")  )

if ( (origen =="Contacto")||(origen=="SolicitoEspecialista") )
{
texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' colspan=2>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Direcci&oacute;n:";
texto = texto + "<br>";
texto = texto + "&nbsp;<input id='Txt_Direccion' name='Txt_Direccion' type='text' class='input_home' style='width:180px;'   tabindex='14' >";
texto = texto + "</td>";
texto = texto + "</tr>";

texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left'>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Comuna:";
texto = texto + "<br>";
texto = texto + "<input id='Txt_Comuna' name='Txt_Comuna' type='text' class='input_home' style='width:85px;'  tabindex='14' >";
texto = texto + "&nbsp;&nbsp;&nbsp;</td>";
texto = texto + "<td class='text_detalle'  align='left'>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Ciudad:";
texto = texto + "<br>";
texto = texto + "&nbsp;<input id='Txt_Ciudad' name='Txt_Ciudad' type='text' class='input_home' style='width:85px;'   tabindex='14' >";
texto = texto + "</td>";
texto = texto + "</tr>";

texto = texto + "<tr height='"+ alto + "' >";
texto = texto + "<td class='text_detalle'  align='left' colspan=2>";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Region:";
texto = texto + "<br>";
texto += "&nbsp;<select id=Txt_Region name=Txt_Region class='input_home' style='width:180px;'>";
texto += "<option value='' selected>Seleccione</option>";
texto += "<option value='XV'>XV Región de Arica y Parinacota</option>";
texto += "<option value='I'>I Región de Tarapacá</option>";
texto += "<option value='II'>II Región de Antofagasta</option>";
texto += "<option value='III'>III Región de Atacama</option>";
texto += "<option value='IV'>IV Región de Coquimbo</option>";
texto += "<option value='V'>V Región de Valparaíso</option>";
texto += "<option value='VI'>VI Región del Libertador Bernardo O'Higgin</option>";
texto += "<option value='VII'>VII Región del Maule</option>";
texto += "<option value='VIII'>VIII Región del Bío Bío</option>";
texto += "<option value='IX'>IX Región de la Araucanía</option>";
texto += "<option value='XIV'>XIV Región de Los Ríos</option>";
texto += "<option value='X'>X Región de los Lagos</option>";
texto += "<option value='XI'>XI Región de Aysén del General Carlos Ibáñez del Campo</option>";
texto += "<option value='XII'>XII Región de Magallanes y la Antártica Chilena</option>";
texto += "<option value='XIII'>XIII Región Metropolitana de Santiago</option>";
texto += "</select>";
texto = texto + "</td>";
texto = texto + "</tr>";
}
else
{
texto = texto + "<input type='hidden' name='Txt_Direccion' id='Txt_Direccion'  value='-' >";
texto = texto + "<input type='hidden' name='Txt_Comuna' id='Txt_Comuna' value='-' >";
texto = texto + "<input type='hidden' name='Txt_Ciudad' id='Txt_Ciudad' value='-' >";
texto = texto + "<input type='hidden' name='Txt_Region' id='Txt_Region' value='-' >";
}
// Fin Direccion Comuna Ciudad Region


texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Email: (*)";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";
texto = texto + "<input id='Txt_Email' name='Txt_Email' type='text' class='input_home' size='30' onchange='return mail(this.value)' tabindex='15' >";
texto = texto + "</td>";
texto = texto + "</tr>";

// Mail 2
texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Email Verificación: (*)";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";
texto = texto + "<input id='Txt_Email_Valida' name='Txt_Email_Valida' type='text' class='input_home' size='30' onchange='return mail(this.value)' tabindex='15' >";
texto = texto + "</td>";
texto = texto + "</tr>";

/*
if ( (origen =="Contacto")&& (txt_form == "form_contacto") )
{
	texto = texto + " <tr height='"+ alto + "'>";
	texto = texto + "<td align='left' class='text_detalle'  align='left' colspan='2'>";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Asunto: (*)";
	texto = texto + "<br>";
	texto = texto + "<select id='cmb_asunto' name='cmb_asunto' class='input_home' tabindex='16' >";
	texto = texto + "<option value='Informacion'>Información</option>";
	texto = texto + "<option value='Siniestros'>Siniestros</option>";
	texto = texto + "<option value='Reclamos'>Reclamos</option>";
	texto = texto + "<option value='Felicitaciones'>Felicitaciones</option>";
	texto = texto + "<option value='Otros'>Otros</option>";
	texto = texto + "</select>";
	texto = texto + "</td>";
	texto = texto + "</tr>";
}
else
{
*/
	texto = texto + "<input type='hidden' name='cmb_asunto'  value='Informacion' >";
//}

/* información de motivo contacto  y  linea de negocio */


//if ( (origen =="Contacto")&& (txt_form == "form_contacto") )

if ( (origen =="Contacto") || (origen =="SolicitoEspecialista") )
{
// Comentado para resolver problema js + grabación
//if ( ((origen =="Contacto") || (origen =="ServicioPersonas")) && (txt_form == "form_contacto") )
//{


    //Motivo
    if (origen =="ServicioPersonas") {
        vl_colspan=1;
        vl_br="</td><td>";
    }
    else {
        vl_colspan=2;
        vl_br="<br>";
    }
    
    if (txt_form == "form_solicitud")
    {
    	txt_selected_1 =  ""
    	txt_selected_2 =  "Selected"
    }
    else
    {
    	txt_selected_1 =  "Selected"
    	txt_selected_2 =  ""
    }
    
    
    texto = texto + " <tr height='"+ alto + "'>";
	texto = texto + "<td align='left' class='text_detalle'  align='left' colspan='" + vl_colspan + "' nowrap>";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Motivo Contacto: (*) ";
	texto = texto + vl_br;
	texto = texto + "<select id='cmb_motivo' name='cmb_motivo' class='input_home' tabindex='16' onchange='CambioMotivo();'>";
	texto = texto + "<option value='1' "+txt_selected_1+" >Servicio Clientes</option>";
	texto = texto + "<option value='2'  "+txt_selected_2+" >Cotización</option>";
	texto = texto + "</select>";
	texto = texto + "</td>";
	texto = texto + "</tr>";
	
	texto = texto + "<script> function CambioMotivo () {";
   	texto = texto + "        if (document.getElementById('cmb_motivo').value == '2') {  ";
	texto = texto + "            document.getElementById('trln').style.display='';";
	texto = texto + "           }";
	texto = texto + "        else {";
	texto = texto + "            document.getElementById('trln').style.display='none';";
	texto = texto + "            document.getElementById('cmb_linea').selectedIndex=0;";
	texto = texto + "           }";
	texto = texto + "        }";
    texto = texto + "</script>";
	
	//linea Negocio
			txt_lin_25 = ""
			txt_lin_24 = ""
			txt_lin_27 = ""
			txt_lin_26 = ""
	/*		
var elemento = document.getElementsByName("val_linea")	
	if (document.getElementsByName("val_linea").length != undefined )
	{
		if (Document.getElementsByName("val_linea").value == "25")
		{
			txt_lin_25 = "selected"
			txt_lin_24 = ""
			txt_lin_27 = ""
			txt_lin_26 = ""
		}
		if (document.getElementsByName("val_linea").value =="24")
		{
			txt_lin_25 = ""
			txt_lin_24 = "selected"
			txt_lin_27 = ""
			txt_lin_26 = ""
		}
		if (document.getElementsByName("val_linea").value =="27")
		{
			txt_lin_25 = ""
			txt_lin_24 = ""
			txt_lin_27 = "selected"
			txt_lin_26 = ""
		}
		if (document.getElementsByName("val_linea").value =="26")
		{
			txt_lin_25 = ""
			txt_lin_24 = ""
			txt_lin_27 = ""
			txt_lin_26 = "selected"
		}
	}
	*/
		if (val_btn == "PERSONAS")
		{
			txt_lin_25 = "selected"
			txt_lin_24 = ""
			txt_lin_27 = ""
			txt_lin_26 = ""
		}
		if ((val_btn == "BROKERS")||(val_btn == "EMPRESAS"))
		{
			txt_lin_25 = ""
			txt_lin_24 = "selected"
			txt_lin_27 = ""
			txt_lin_26 = ""
		}
		if (val_btn == "INTERMEDIARIOS")
		{
			txt_lin_25 = ""
			txt_lin_24 = ""
			txt_lin_27 = ""
			txt_lin_26 = "selected"
		}	
	
	
	texto = texto + "<tr id='trln' height='"+ alto + "' >"; // style='display:none;'
	texto = texto + "<td align='left' class='text_detalle'  align='left' colspan='" + vl_colspan + "' nowrap>";
	texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Línea Negocio: (*)";
	texto = texto + vl_br;
	
	texto = texto + "<select id='cmb_linea' name='cmb_linea' class='input_home' tabindex='16' >";
	texto = texto + "<option value='0' >.: Seleccione :.</option>";
	texto = texto + "<option value='25' "+txt_lin_25+" >Comercial Seguros Personas</option>";
	texto = texto + "<option value='24' "+txt_lin_24+">Comercial Seguros Colectivos</option>";
	texto = texto + "<option value='27' "+txt_lin_27+">Comercial Mutuos Hipotecarios</option>";
	texto = texto + "<option value='26' "+txt_lin_26+">Comercial Rentas Vitalicias</option>";
	texto = texto + "</select>";
	texto = texto + "</td>";
	texto = texto + "</tr>";
	

}
else
{
texto = texto + "<input name='cmb_linea' id='cmb_linea' type='hidden' value='0' />";

}
/* fin linea de negocio*/


texto = texto + "<tr height='"+ alto + "'>";
texto = texto + "<td valign='top' class='text_detalle'  align='left' "+txt_colspan+">";
texto = texto + "<img src='"+ RUTA_PAG + "imagenes/vineta.gif\' width='4' height='6'> Comentarios: (*)";
if (origen !="Contacto")
{
	texto = texto + "</td>";
	texto = texto + "<td align='left'>";
}
else
	texto = texto + "<br>";

texto = texto + "<textarea name ='Txt_Comentarios' rows='4' cols='32' id='Txt_Comentarios'  class='input_home'  tabindex='17'  ></textarea>";
texto = texto + "&nbsp;<input name='txt_len' type='hidden' value='( 2720 )' readonly='readonly' id='txt_len' "+txt_clase+" size='5' />";
texto = texto + "</td>";
texto = texto + "</tr>";


texto = texto + "<tr>";
texto = texto + " <td colspan='2' align='center' valign='center' height='10px'>";
texto = texto + "</td>";
texto = texto + "</tr>";

texto = texto + "<tr>";
texto = texto + " <td colspan='2' align='center' valign='center' >";
texto = texto + "<img onclick=ValidaForm('"+txt_form+"') tabindex='18' src='"+ RUTA_PAG + "imagenes/botones/btn_enviar.gif \'   border='0' style='cursor:hand'>&nbsp;&nbsp;";
texto = texto + "<img  onclick=borrar('"+txt_form+"'); tabindex='19' src='"+ RUTA_PAG + "imagenes/botones/btn_borrar.gif \'  border='0' style='cursor:hand'>";
texto = texto + "</td>";
texto = texto + "</tr>";
texto = texto + "</table>";
texto = texto + "</form>";
/*
texto = texto + "<script language='javascript' event='onkeyup' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onkeydown' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onblur' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onmouseup' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onmousedown' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onmousemove' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
texto = texto + "<script language='javascript' event='onmouseout' for='Txt_Comentarios'>return fnEstimateRemLen(txt_form)</script>";
*/

//alert (texto)
return texto;
}


