Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
41 kB
2
Indexable
Never
var i = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Alto Hospicio", value: "I - Region de Tarapaca-Alto Hospicio", tipo: "3" },
    { display: "Camina", value: "I - Region de Tarapaca-Camina", tipo: "1" },
    { display: "Colchane", value: "I - Region de Tarapaca-Colchane", tipo: "1" },
    { display: "General Lagos", value: "I - Region de Tarapaca-General Lagos", tipo: "1" },
    { display: "Huara", value: "I - Region de Tarapaca-Huara", tipo: "1" },
    { display: "Iquique", value: "I - Region de Tarapaca-Iquique", tipo: "3" },
    { display: "Pica", value: "I - Region de Tarapaca-Pica", tipo: "1" },
    { display: "Pozo Almonte", value: "I - Region de Tarapaca-Pozo Almonte", tipo: "1" }];

var ii = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Antofagasta", value: "II - Region de Antofagasta-Antofagasta", tipo: "3" },
    { display: "Calama", value: "II - Region de Antofagasta-Calama", tipo: "3" },
    { display: "Maria Elena", value: "II - Region de Antofagasta-Maria Elena", tipo: "1" },
    { display: "Mejillones", value: "II - Region de Antofagasta-Mejillones", tipo: "1" },
    { display: "Ollague", value: "II - Region de Antofagasta-Ollague", tipo: "1" },
    { display: "San Pedro de Atacama", value: "II - Region de Antofagasta-San Pedro de Atacama", tipo: "1" },
    { display: "Sierra Gorda", value: "II - Region de Antofagasta-Sierra Gorda", tipo: "1" },
    { display: "Taltal", value: "II - Region de Antofagasta-Taltal", tipo: "1" },
    { display: "Tocopilla", value: "II - Region de Antofagasta-Tocopilla", tipo: "2" }];

var iii = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Alto del Carmen", value: "III - Region de Atacama-Alto del Carmen", tipo: "1" },
    { display: "Caldera", value: "III - Region de Atacama-Caldera", tipo: "1" },
    { display: "Chanaral", value: "III - Region de Atacama-Chanaral", tipo: "1" },
    { display: "Copiapo", value: "III - Region de Atacama-Copiapo", tipo: "3" },
    { display: "Diego de Almagro", value: "III - Region de Atacama-Diego de Almagro", tipo: "1" },
    { display: "El Salvador", value: "III - Region de Atacama-El Salvador", tipo: "2" },
    { display: "Freirina", value: "III - Region de Atacama-Freirina", tipo: "1" },
    { display: "Huasco", value: "III - Region de Atacama-Huasco", tipo: "1" },
    { display: "Tierra Amarilla", value: "III - Region de Atacama-Tierra Amarilla", tipo: "1" },
    { display: "Vallenar", value: "III - Region de Atacama-Vallenar", tipo: "2" }];

var iv = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Andacollo", value: "IV - Region de Coquimbo-Andacollo", tipo: "1" },
    { display: "Canela", value: "IV - Region de Coquimbo-Canela", tipo: "1" },
    { display: "Combarbala", value: "IV - Region de Coquimbo-Combarbala", tipo: "1" },
    { display: "Coquimbo", value: "IV - Region de Coquimbo-Coquimbo", tipo: "3" },
    { display: "Illapel", value: "IV - Region de Coquimbo-Illapel", tipo: "2" },
    { display: "La Higuera", value: "IV - Region de Coquimbo-La Higuera", tipo: "1" },
    { display: "La Serena", value: "IV - Region de Coquimbo-La Serena", tipo: "3" },
    { display: "Los Vilos", value: "IV - Region de Coquimbo-Los Vilos", tipo: "1" },
    { display: "Monte Patria", value: "IV - Region de Coquimbo-Monte Patria", tipo: "1" },
    { display: "Ovalle", value: "IV - Region de Coquimbo-Ovalle", tipo: "3" },
    { display: "Paiguano", value: "IV - Region de Coquimbo-Paiguano", tipo: "1" },
    { display: "Punitaqui", value: "IV - Region de Coquimbo-Punitaqui", tipo: "1" },
    { display: "Rio Hurtado", value: "IV - Region de Coquimbo-Rio Hurtado", tipo: "1" },
    { display: "Salamanca", value: "IV - Region de Coquimbo-Salamanca", tipo: "1" },
    { display: "Vicuna", value: "IV - Region de Coquimbo-Vicuna", tipo: "1" }];

var v = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Algarrobo", value: "V - Region de Valparaiso-Algarrobo", tipo: "1" },
    { display: "Cabildo", value: "V - Region de Valparaiso-Cabildo", tipo: "1" },
    { display: "Cartagena", value: "V - Region de Valparaiso-Cartagena", tipo: "2" },
    { display: "Casablanca", value: "V - Region de Valparaiso-Casablanca", tipo: "3" },
    { display: "Catemu", value: "V - Region de Valparaiso-Catemu", tipo: "1" },
    { display: "ConCon", value: "V - Region de Valparaiso-ConCon", tipo: "3" },
    { display: "El Quisco", value: "V - Region de Valparaiso-El Quisco", tipo: "1" },
    { display: "El Tabo", value: "V - Region de Valparaiso-El Tabo", tipo: "1" },
    { display: "Hijuelas", value: "V - Region de Valparaiso-Hijuelas", tipo: "1" },
    { display: "Isla de Pascua", value: "V - Region de Valparaiso-Isla de Pascua", tipo: "1" },
    { display: "Juan Fernandez", value: "V - Region de Valparaiso-Juan Fernandez", tipo: "1" },
    { display: "La Calera", value: "V - Region de Valparaiso-La Calera", tipo: "3" },
    { display: "La Cruz", value: "V - Region de Valparaiso-La Cruz", tipo: "3" },
    { display: "La Ligua", value: "V - Region de Valparaiso-La Ligua", tipo: "2" },
    { display: "Limache", value: "V - Region de Valparaiso-Limache", tipo: "3" },
    { display: "Llay Llay", value: "V - Region de Valparaiso-Llayllay", tipo: "3" },
    { display: "Los Andes", value: "V - Region de Valparaiso-Los Andes", tipo: "3" },
    { display: "Nogales", value: "V - Region de Valparaiso-Nogales", tipo: "3" },
    { display: "Olmue", value: "V - Region de Valparaiso-Olmue", tipo: "1" },
    { display: "Putaendo", value: "V - Region de Valparaiso-Putaendo", tipo: "2" },
    { display: "Quillota", value: "V - Region de Valparaiso-Quillota", tipo: "3" },
    { display: "Quilpue", value: "V - Region de Valparaiso-Quilpue", tipo: "3" },
    { display: "Quintero", value: "V - Region de Valparaiso-Quilpue", tipo: "3" },
    { display: "Rinconada", value: "V - Region de Valparaiso-Quilpue", tipo: "3" },
    { display: "San Antonio", value: "V - Region de Valparaiso-San Antonio", tipo: "5" },
    { display: "San Esteban", value: "V - Region de Valparaiso-San Esteban", tipo: "3" },
    { display: "San Felipe", value: "V - Region de Valparaiso-San Felipe", tipo: "3" },
    { display: "Santa Maria", value: "V - Region de Valparaiso-Santa Maria", tipo: "2" },
    { display: "Santo Domingo", value: "V - Region de Valparaiso-Santo Domingo", tipo: "5" },
    { display: "Valparaiso", value: "V - Region de Valparaiso-Valparaiso", tipo: "3" },
    { display: "Villa Alemana", value: "V - Region de Valparaiso-Villa Alemana", tipo: "3" },
    { display: "Vina Del Mar", value: "V - Region de Valparaiso-Vina Del Mar", tipo: "3" }];

var vi = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Chepica", value: "VI - Region de O'Higgins-Chepica", tipo: "1" },
    { display: "Chimbarongo", value: "VI - Region de O'Higgins-Chimbarongo", tipo: "1" },
    { display: "Codegua", value: "VI - Region de O'Higgins-Codegua", tipo: "1" },
    { display: "Coltauco", value: "VI - Region de O'Higgins-Coltauco", tipo: "1" },
    { display: "Donihue", value: "VI - Region de O'Higgins-Donihue", tipo: "1" },
    { display: "Graneros", value: "VI - Region de O'Higgins-Graneros", tipo: "1" },
    { display: "La Estrella", value: "VI - Region de O'Higgins-La Estrella", tipo: "1" },
    { display: "Las Cabras", value: "VI - Region de O'Higgins-Las Cabras", tipo: "1" },
    { display: "Litueche", value: "VI - Region de O'Higgins-Litueche", tipo: "1" },
    { display: "Lolol", value: "VI - Region de O'Higgins-Lolol", tipo: "1" },
    { display: "Machali", value: "VI - Region de O'Higgins-Machali", tipo: "3" },
    { display: "Malloa", value: "VI - Region de O'Higgins-Malloa", tipo: "1" },
    { display: "Marchihue", value: "VI - Region de O'Higgins-Marchihue", tipo: "1" },
    { display: "Mostazal", value: "VI - Region de O'Higgins-Mostazal", tipo: "1" },
    { display: "Nancagua", value: "VI - Region de O'Higgins-Nancagua", tipo: "1" },
    { display: "Navidad", value: "VI - Region de O'Higgins-Navidad", tipo: "1" },
    { display: "Olivar", value: "VI - Region de O'Higgins-Olivar", tipo: "1" },
    { display: "Palmilla", value: "VI - Region de O'Higgins-Palmilla", tipo: "1" },
    { display: "Paredones", value: "VI - Region de O'Higgins-Paredones", tipo: "1" },
    { display: "Peralillo", value: "VI - Region de O'Higgins-Peralillo", tipo: "1" },
    { display: "Peumo", value: "VI - Region de O'Higgins-Peumo", tipo: "1" },
    { display: "Pichidegua", value: "VI - Region de O'Higgins-Pichidegua", tipo: "1" },
    { display: "Pichilemu", value: "VI - Region de O'Higgins-Pichilemu", tipo: "1" },
    { display: "Placilla", value: "VI - Region de O'Higgins-Placilla", tipo: "1" },
    { display: "Pumanque", value: "VI - Region de O'Higgins-Pumanque", tipo: "1" },
    { display: "Quinta de Tilcoco", value: "VI - Region de O'Higgins-Quinta de Tilcoco", tipo: "1" },
    { display: "Rancagua", value: "VI - Region de O'Higgins-Rancagua", tipo: "1" },
    { display: "Rengo", value: "VI - Region de O'Higgins-Rengo", tipo: "3" },
    { display: "Requinoa", value: "VI - Region de O'Higgins-Requinoa", tipo: "3" },
    { display: "San Fernando", value: "VI - Region de O'Higgins-San Fernando", tipo: "1" },
    { display: "San Vicente", value: "VI - Region de O'Higgins-San Vicente", tipo: "3" },
    { display: "Santa Cruz", value: "VI - Region de O'Higgins-Santa Cruz", tipo: "1" }];


var vii = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Cauquenes   ", value: "VII - Region del Maule-Cauquenes   ", tipo: "2" },
    { display: "Chanco      ", value: "VII - Region del Maule-Chanco      ", tipo: "1" },
    { display: "Colbun      ", value: "VII - Region del Maule-Colbun      ", tipo: "1" },
    { display: "Constitucion", value: "VII - Region del Maule-Constitucion", tipo: "2" },
    { display: "Curepto     ", value: "VII - Region del Maule-Curepto     ", tipo: "1" },
    { display: "Curico      ", value: "VII - Region del Maule-Curico      ", tipo: "3" },
    { display: "Empedrado", value: "VII - Region del Maule-Empedrado", tipo: "1" },
    { display: "Hualane  ", value: "VII - Region del Maule-Hualane", tipo: "1" },
    { display: "Licanten ", value: "VII - Region del Maule-Licanten", tipo: "1" },
    { display: "Linares  ", value: "VII - Region del Maule-Linares", tipo: "3" },
    { display: "Longavi  ", value: "VII - Region del Maule-Longavi", tipo: "1" },
    { display: "Maule    ", value: "VII - Region del Maule-Maule", tipo: "3" },
    { display: "Parral   ", value: "VII - Region del Maule-Parral", tipo: "2" },
    { display: "Pelarco  ", value: "VII - Region del Maule-Pelarco", tipo: "1" },
    { display: "Pelluhue ", value: "VII - Region del Maule-Pelluhue", tipo: "1" },
    { display: "Pencahue       ", value: "VII - Region del Maule-Pencahue", tipo: "1" },
    { display: "Rauco          ", value: "VII - Region del Maule-Rauco", tipo: "1" },
    { display: "Retiro         ", value: "VII - Region del Maule-Retiro ", tipo: "1" },
    { display: "Rio Claro      ", value: "VII - Region del Maule-Rio Claro", tipo: "1" },
    { display: "Romeral        ", value: "VII - Region del Maule-Romeral        ", tipo: "1" },
    { display: "Sagrada Familia", value: "VII - Region del Maule-Sagrada Familia", tipo: "1" },
    { display: "San Clemente   ", value: "VII - Region del Maule-San Clemente   ", tipo: "1" },
    { display: "San Javier     ", value: "VII - Region del Maule-San Javier     ", tipo: "1" },
    { display: "San Rafael     ", value: "VII - Region del Maule-San Rafael     ", tipo: "1" },
    { display: "Talca          ", value: "VII - Region del Maule-Talca          ", tipo: "3" },
    { display: "Teno           ", value: "VII - Region del Maule-Teno           ", tipo: "1" },
    { display: "Vichuquen      ", value: "VII - Region del Maule-Vichuquen      ", tipo: "1" },
    { display: "Villa Alegre   ", value: "VII - Region del Maule-Villa Alegre   ", tipo: "1" },
    { display: "Yerbas Buenas  ", value: "VII - Region del Maule-Yerbas Buenas  ", tipo: "1" }];


var viii = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Antuco             ", value: "VIII - Region de Bio Bio-Antuco ", tipo: "1" },
    { display: "Arauco             ", value: "VIII - Region de Bio Bio-Arauco ", tipo: "1" },
    { display: "Bulnes             ", value: "VIII - Region de Bio Bio-Bulnes ", tipo: "1" },
    { display: "Cabrero            ", value: "VIII - Region de Bio Bio-Cabrero", tipo: "1" },
    { display: "Canete             ", value: "VIII - Region de Bio Bio-Canete ", tipo: "1" },
    { display: "Chiguayante        ", value: "VIII - Region de Bio Bio-Chiguayante  ", tipo: "3" },
    { display: "Chillan            ", value: "VIII - Region de Bio Bio-Chillan      ", tipo: "3" },
    { display: "Chillan Viejo      ", value: "VIII - Region de Bio Bio-Chillan Viejo", tipo: "1" },
    { display: "Cobquecura         ", value: "VIII - Region de Bio Bio-Cobquecura   ", tipo: "1" },
    { display: "Coelemu            ", value: "VIII - Region de Bio Bio-Coelemu      ", tipo: "1" },
    { display: "Concepcion         ", value: "VIII - Region de Bio Bio-Concepcion ", tipo: "3" },
    { display: "Coronel            ", value: "VIII - Region de Bio Bio-Coronel    ", tipo: "3" },
    { display: "Curanilahue        ", value: "VIII - Region de Bio Bio-Curanilahue", tipo: "1" },
    { display: "El Carmen          ", value: "VIII - Region de Bio Bio-El Carmen  ", tipo: "1" },
    { display: "Florida            ", value: "VIII - Region de Bio Bio-Florida    ", tipo: "1" },
    { display: "Hualqui            ", value: "VIII - Region de Bio Bio-Hualqui     ", tipo: "1" },
    { display: "Laja               ", value: "VIII - Region de Bio Bio-Laja        ", tipo: "1" },
    { display: "Lebu               ", value: "VIII - Region de Bio Bio-Lebu        ", tipo: "1" },
    { display: "Lota               ", value: "VIII - Region de Bio Bio-Lota        ", tipo: "3" },
    { display: "Los Alamos         ", value: "VIII - Region de Bio Bio-Los Alamos  ", tipo: "1" },
    { display: "Los Angeles        ", value: "VIII - Region de Bio Bio-Los Angeles ", tipo: "4" },
    { display: "Mulchen            ", value: "VIII - Region de Bio Bio-Mulchen     ", tipo: "1" },
    { display: "Nacimiento         ", value: "VIII - Region de Bio Bio-Nacimiento  ", tipo: "1" },
    { display: "Negrete            ", value: "VIII - Region de Bio Bio-Negrete    ", tipo: "1" },
    { display: "Niquen             ", value: "VIII - Region de Bio Bio-niquen     ", tipo: "1" },
    { display: "Pemuco             ", value: "VIII - Region de Bio Bio-Pemuco     ", tipo: "1" },
    { display: "Penco              ", value: "VIII - Region de Bio Bio-Penco      ", tipo: "3" },
    { display: "Pinto              ", value: "VIII - Region de Bio Bio-Pinto      ", tipo: "1" },
    { display: "Portezuelo         ", value: "VIII - Region de Bio Bio-Portezuelo ", tipo: "1" },
    { display: "Quilaco            ", value: "VIII - Region de Bio Bio-Quilaco    ", tipo: "1" },
    { display: "Quilleco           ", value: "VIII - Region de Bio Bio-Quilleco   ", tipo: "1" },
    { display: "Quillon            ", value: "VIII - Region de Bio Bio-Quillon          ", tipo: "1" },
    { display: "Quirihue           ", value: "VIII - Region de Bio Bio-Quirihue          ", tipo: "1" },
    { display: "Ranquil            ", value: "VIII - Region de Bio Bio-Ranquil          ", tipo: "1" },
    { display: "San Carlos         ", value: "VIII - Region de Bio Bio-San Carlos       ", tipo: "3" },
    { display: "San Fabian         ", value: "VIII - Region de Bio Bio-San Fabian       ", tipo: "1" },
    { display: "San Ignacio        ", value: "VIII - Region de Bio Bio-San Ignacio      ", tipo: "1" },
    { display: "San Nicolas        ", value: "VIII - Region de Bio Bio-San Nicola       ", tipo: "1" },
    { display: "San Pedro de la Paz", value: "VIII - Region de Bio Bio-San Pedro de la Paz", tipo: "3" },
    { display: "San Rosendo        ", value: "VIII - Region de Bio Bio-San Rosendo  ", tipo: "1" },
    { display: "Santa Barbara      ", value: "VIII - Region de Bio Bio-Santa Barbara", tipo: "1" },
    { display: "Santa Juana        ", value: "VIII - Region de Bio Bio-Santa Juana  ", tipo: "1" },
    { display: "Talcahuano         ", value: "VIII - Region de Bio Bio-Talcahuano   ", tipo: "3" },
    { display: "Tirua              ", value: "VIII - Region de Bio Bio-Tirua        ", tipo: "1" },
    { display: "Tome               ", value: "VIII - Region de Bio Bio-Tome         ", tipo: "1" },
    { display: "Treguaco           ", value: "VIII - Region de Bio Bio-Treguaco     ", tipo: "1" },
    { display: "Tucapel            ", value: "VIII - Region de Bio Bio-Tucapel      ", tipo: "1" },
    { display: "Yumbel             ", value: "VIII - Region de Bio Bio-Yumbel ", tipo: "1" },
    { display: "Yungay             ", value: "VIII - Region de Bio Bio-Yungay ", tipo: "1" }];

var ix = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Angol           ", value: "IX - Region de La Araucania-Angol          ", tipo: "2" },
    { display: "Carahue         ", value: "IX - Region de La Araucania-Carahue        ", tipo: "1" },
    { display: "Collipulli      ", value: "IX - Region de La Araucania-Collipulli     ", tipo: "1" },
    { display: "Cunco           ", value: "IX - Region de La Araucania-Cunco          ", tipo: "1" },
    { display: "Curacautin      ", value: "IX - Region de La Araucania-Curacautin     ", tipo: "1" },
    { display: "Curarrehue      ", value: "IX - Region de La Araucania-Curarrehue     ", tipo: "1" },
    { display: "Ercilla         ", value: "IX - Region de La Araucania-Ercilla        ", tipo: "1" },
    { display: "Freire          ", value: "IX - Region de La Araucania-Freire         ", tipo: "1" },
    { display: "Galvarino       ", value: "IX - Region de La Araucania-Galvarino      ", tipo: "1" },
    { display: "Gorbea          ", value: "IX - Region de La Araucania-Gorbea         ", tipo: "1" },
    { display: "Labranza        ", value: "IX - Region de La Araucania-Labranza       ", tipo: "3" },
    { display: "Lautaro         ", value: "IX - Region de La Araucania-Lautaro        ", tipo: "1" },
    { display: "Loncoche        ", value: "IX - Region de La Araucania-Loncoche       ", tipo: "1" },
    { display: "Lonquimay       ", value: "IX - Region de La Araucania-Lonquimay      ", tipo: "1" },
    { display: "Los Sauces      ", value: "IX - Region de La Araucania-Los Sauces     ", tipo: "1" },
    { display: "Lumaco          ", value: "IX - Region de La Araucania-Lumaco         ", tipo: "1" },
    { display: "Melipeuco       ", value: "IX - Region de La Araucania-Melipeuco      ", tipo: "1" },
    { display: "Nueva Imperial  ", value: "IX - Region de La Araucania-Nueva Imperial ", tipo: "1" },
    { display: "Padre las Casas ", value: "IX - Region de La Araucania-Padre las Casas", tipo: "3" },
    { display: "Perquenco       ", value: "IX - Region de La Araucania-Perquenco      ", tipo: "1" },
    { display: "Pitruftquen     ", value: "IX - Region de La Araucania-Pitruftquen    ", tipo: "1" },
    { display: "Pucon           ", value: "IX - Region de La Araucania-Pucon          ", tipo: "1" },
    { display: "Puren           ", value: "IX - Region de La Araucania-Puren          ", tipo: "1" },
    { display: "Renaico         ", value: "IX - Region de La Araucania-Renaico        ", tipo: "1" },
    { display: "Saavedra        ", value: "IX - Region de La Araucania-Saavedra       ", tipo: "1" },
    { display: "Temuco          ", value: "IX - Region de La Araucania-Temuco         ", tipo: "3" },
    { display: "Teodoro Schmidt ", value: "IX - Region de La Araucania-Teodoro Schmidt", tipo: "1" },
    { display: "Tolten          ", value: "IX - Region de La Araucania-Tolten         ", tipo: "1" },
    { display: "Traiguen        ", value: "IX - Region de La Araucania-Traiguen       ", tipo: "1" },
    { display: "Victoria        ", value: "IX - Region de La Araucania-Victoria       ", tipo: "2" },
    { display: "Vilcun          ", value: "IX - Region de La Araucania-Vilcun         ", tipo: "3" },
    { display: "Villarrica      ", value: "IX - Region de La Araucania-Villarrica     ", tipo: "1" }];

var x = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Ancud               ", value: "X - Region de Los Lagos-Ancud                ", tipo: "2" },
    { display: "Calbuco             ", value: "X - Region de Los Lagos-Calbuco              ", tipo: "1" },
    { display: "Castro              ", value: "X - Region de Los Lagos-Castro               ", tipo: "2" },
    { display: "Chaiten             ", value: "X - Region de Los Lagos-Chaiten              ", tipo: "1" },
    { display: "Chonchi             ", value: "X - Region de Los Lagos-Chonchi              ", tipo: "1" },
    { display: "Cochamo             ", value: "X - Region de Los Lagos-Cochamo              ", tipo: "1" },
    { display: "Curaco de Velez     ", value: "X - Region de Los Lagos-Curaco de Velez      ", tipo: "1" },
    { display: "Dalcahue            ", value: "X - Region de Los Lagos-Dalcahue             ", tipo: "1" },
    { display: "Fresia              ", value: "X - Region de Los Lagos-Fresia               ", tipo: "1" },
    { display: "Frutillar           ", value: "X - Region de Los Lagos-Frutillar            ", tipo: "1" },
    { display: "Futaleufu           ", value: "X - Region de Los Lagos-Futaleufu            ", tipo: "1" },
    { display: "Hualaihue           ", value: "X - Region de Los Lagos-Hualaihue            ", tipo: "1" },
    { display: "Llanquihue          ", value: "X - Region de Los Lagos-Llanquihue           ", tipo: "2" },
    { display: "Los Muermos         ", value: "X - Region de Los Lagos-Los Muermos          ", tipo: "1" },
    { display: "Mariquina           ", value: "X - Region de Los Lagos-Mariquina            ", tipo: "1" },
    { display: "Maullin             ", value: "X - Region de Los Lagos-Maullin              ", tipo: "1" },
    { display: "Osorno              ", value: "X - Region de Los Lagos-Osorno               ", tipo: "3" },
    { display: "Palena              ", value: "X - Region de Los Lagos-Palena               ", tipo: "1" },
    { display: "Puerto Montt        ", value: "X - Region de Los Lagos-Puerto Montt         ", tipo: "3" },
    { display: "Puerto Octay        ", value: "X - Region de Los Lagos-Puerto Octay         ", tipo: "1" },
    { display: "Puerto Varas        ", value: "X - Region de Los Lagos-Puerto Varas         ", tipo: "3" },
    { display: "Puqueledon          ", value: "X - Region de Los Lagos-Puqueledon           ", tipo: "1" },
    { display: "Purranque           ", value: "X - Region de Los Lagos-Purranque            ", tipo: "1" },
    { display: "Puyehue             ", value: "X - Region de Los Lagos-Puyehue              ", tipo: "1" },
    { display: "Queilen             ", value: "X - Region de Los Lagos-Queilen              ", tipo: "1" },
    { display: "Quemchi             ", value: "X - Region de Los Lagos-Quemchi              ", tipo: "1" },
    { display: "Quinchao            ", value: "X - Region de Los Lagos-Quinchao             ", tipo: "1" },
    { display: "Rio Negro           ", value: "X - Region de Los Lagos-Rio Negro            ", tipo: "1" },
    { display: "San Juan de la Costa", value: "X - Region de Los Lagos-San Juan de la Costa ", tipo: "1" },
    { display: "San Pablo           ", value: "X - Region de Los Lagos-San Pablo            ", tipo: "1" }];

var xi = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Aisen      ", value: "XI - Region de Aysen-Aisen       ", tipo: "1" },
    { display: "Chile Chico", value: "XI - Region de Aysen-Chile Chico ", tipo: "1" },
    { display: "Cochrane   ", value: "XI - Region de Aysen-Cochrane    ", tipo: "1" },
    { display: "Coyhaique  ", value: "XI - Region de Aysen-Coyhaique   ", tipo: "2" },
    { display: "Guaitecas  ", value: "XI - Region de Aysen-Guaitecas   ", tipo: "1" },
    { display: "Lago Verde ", value: "XI - Region de Aysen-Lago Verde  ", tipo: "1" },
    { display: "O´Higgins  ", value: "XI - Region de Aysen-O´Higgins   ", tipo: "1" },
    { display: "Rio Ibanez ", value: "XI - Region de Aysen-Rio Ibanez  ", tipo: "1" },
    { display: "Tortel     ", value: "XI - Region de Aysen-Tortel      ", tipo: "1" }];

var xii = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Antartica        ", value: "XII - Region de Magallanes y de la Antartica-Antartica          ", tipo: "1" },
    { display: "Laguna Blanca    ", value: "XII - Region de Magallanes y de la Antartica-Laguna Blanca      ", tipo: "1" },
    { display: "Natales          ", value: "XII - Region de Magallanes y de la Antartica-Natales            ", tipo: "1" },
    { display: "Porvenir         ", value: "XII - Region de Magallanes y de la Antartica-Porvenir           ", tipo: "1" },
    { display: "Primavera        ", value: "XII - Region de Magallanes y de la Antartica-Primavera          ", tipo: "1" },
    { display: "Punta Arenas     ", value: "XII - Region de Magallanes y de la Antartica-Punta Arenas       ", tipo: "1" },
    { display: "Rio Verde        ", value: "XII - Region de Magallanes y de la Antartica-Rio Verde          ", tipo: "1" },
    { display: "San Gregorio     ", value: "XII - Region de Magallanes y de la Antartica-San Gregorio       ", tipo: "1" },
    { display: "Timaukel         ", value: "XII - Region de Magallanes y de la Antartica-Timaukel           ", tipo: "1" },
    { display: "Torres Del Paine ", value: "XII - Region de Magallanes y de la Antartica-Torres Del Paine   ", tipo: "1" }];

var xiii = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Alhue               ", value: "RM - Region Metropolitana -Alhue               ", tipo: "1" },
    { display: "Buin                ", value: "RM - Region Metropolitana -Buin                ", tipo: "1" },
    { display: "Calera de Tango     ", value: "RM - Region Metropolitana -Calera de Tango     ", tipo: "1" },
    { display: "Cerrillos           ", value: "RM - Region Metropolitana -Cerrillos           ", tipo: "3" },
    { display: "Cerro Navia         ", value: "RM - Region Metropolitana -Cerro Navia         ", tipo: "1" },
    { display: "Colina              ", value: "RM - Region Metropolitana -Colina              ", tipo: "3" },
    { display: "Conchali            ", value: "RM - Region Metropolitana -Conchali            ", tipo: "3" },
    { display: "Curacavi            ", value: "RM - Region Metropolitana -Curacavi            ", tipo: "3" },
    { display: "El Bosque           ", value: "RM - Region Metropolitana -El Bosque           ", tipo: "3" },
    { display: "El Monte            ", value: "RM - Region Metropolitana -El Monte            ", tipo: "1" },
    { display: "Estacion Central    ", value: "RM - Region Metropolitana -Estacion Central    ", tipo: "3" },
    { display: "Huechuraba          ", value: "RM - Region Metropolitana -Huechuraba          ", tipo: "3" },
    { display: "Independencia       ", value: "RM - Region Metropolitana -Independencia       ", tipo: "3" },
    { display: "Isla de Maipo       ", value: "RM - Region Metropolitana -Isla de Maipo       ", tipo: "1" },
    { display: "La Cisterna         ", value: "RM - Region Metropolitana -La Cisterna         ", tipo: "3" },
    { display: "La Florida          ", value: "RM - Region Metropolitana -La Florida          ", tipo: "3" },
    { display: "La Granja           ", value: "RM - Region Metropolitana -La Granja           ", tipo: "3" },
    { display: "La Pintana          ", value: "RM - Region Metropolitana -La Pintana          ", tipo: "1" },
    { display: "La Reina            ", value: "RM - Region Metropolitana -La Reina            ", tipo: "3" },
    { display: "Lampa               ", value: "RM - Region Metropolitana -Lampa               ", tipo: "3" },
    { display: "Las Condes          ", value: "RM - Region Metropolitana -Las Condes          ", tipo: "3" },
    { display: "Lo Barnechea        ", value: "RM - Region Metropolitana -Lo Barnechea        ", tipo: "3" },
    { display: "Lo Espejo           ", value: "RM - Region Metropolitana -Lo Espejo           ", tipo: "3" },
    { display: "Lo Prado            ", value: "RM - Region Metropolitana -Lo Prado            ", tipo: "3" },
    { display: "Macul               ", value: "RM - Region Metropolitana -Macul               ", tipo: "3" },
    { display: "Maipu               ", value: "RM - Region Metropolitana -Maipu               ", tipo: "3" },
    { display: "Maria Pinto         ", value: "RM - Region Metropolitana -Maria Pinto         ", tipo: "1" },
    { display: "Melipilla           ", value: "RM - Region Metropolitana -Melipilla           ", tipo: "3" },
    { display: "ñuñoa ", value: "RM - Region Metropolitana -ñuñoa ", tipo: "3" },
    { display: "Padre Hurtado       ", value: "RM - Region Metropolitana -Padre Hurtado       ", tipo: "3" },
    { display: "Paine               ", value: "RM - Region Metropolitana -Paine               ", tipo: "1" },
    { display: "Pedro Aguirre Cerda ", value: "RM - Region Metropolitana -Pedro Aguirre Cerda ", tipo: "3" },
    { display: "Peñaflor     ", value: "RM - Region Metropolitana -Peñaflor     ", tipo: "3" },
    { display: "Peñalolen    ", value: "RM - Region Metropolitana -Peñalolen    ", tipo: "3" },
    { display: "Pirque              ", value: "RM - Region Metropolitana -Pirque              ", tipo: "1" },
    { display: "Providencia         ", value: "RM - Region Metropolitana -Providencia         ", tipo: "3" },
    { display: "Pudahuel            ", value: "RM - Region Metropolitana -Pudahuel            ", tipo: "3" },
    { display: "Puente Alto         ", value: "RM - Region Metropolitana -Puente Alto         ", tipo: "3" },
    { display: "Quilicura           ", value: "RM - Region Metropolitana -Quilicura           ", tipo: "3" },
    { display: "Quinta Normal       ", value: "RM - Region Metropolitana -Quinta Normal       ", tipo: "3" },
    { display: "Recoleta            ", value: "RM - Region Metropolitana -Recoleta            ", tipo: "3" },
    { display: "Renca               ", value: "RM - Region Metropolitana -Renca               ", tipo: "3" },
    { display: "San Bernardo        ", value: "RM - Region Metropolitana -San Bernardo        ", tipo: "3" },
    { display: "San Joaquin         ", value: "RM - Region Metropolitana -San Joaquin         ", tipo: "3" },
    { display: "San Jose de Maipo   ", value: "RM - Region Metropolitana -San Jose de Maipo   ", tipo: "1" },
    { display: "San Miguel          ", value: "RM - Region Metropolitana -San Miguel          ", tipo: "3" },
    { display: "San Pedro           ", value: "RM - Region Metropolitana -San Pedro           ", tipo: "1" },
    { display: "San Ramon           ", value: "RM - Region Metropolitana -San Ramon           ", tipo: "1" },
    { display: "Santiago Centro     ", value: "RM - Region Metropolitana -Santiago Centro     ", tipo: "3" },
    { display: "Talagante           ", value: "RM - Region Metropolitana -Talagante           ", tipo: "3" },
    { display: "Til Til             ", value: "RM - Region Metropolitana -Til Til             ", tipo: "1" },
    { display: "Vitacura            ", value: "RM - Region Metropolitana -Vitacura            ", tipo: "3" }];

var xiv = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Corral                  ", value: "XIV - Region de Los Rios-Corral                  ", tipo: "1" },
    { display: "Futrono                 ", value: "XIV - Region de Los Rios-Futrono                 ", tipo: "1" },
    { display: "La Union                ", value: "XIV - Region de Los Rios-La Union                ", tipo: "2" },
    { display: "Lago Ranco              ", value: "XIV - Region de Los Rios-Lago Ranco              ", tipo: "1" },
    { display: "Lanco                   ", value: "XIV - Region de Los Rios-Lanco                   ", tipo: "1" },
    { display: "Mafil                   ", value: "XIV - Region de Los Rios-Mafil                   ", tipo: "1" },
    { display: "Paillaco                ", value: "XIV - Region de Los Rios-Paillaco                ", tipo: "1" },
    { display: "Rio Bueno               ", value: "XIV - Region de Los Rios-Rio Bueno               ", tipo: "1" },
    { display: "San Jose de la Mariquina", value: "XIV - Region de Los Rios-San Jose de la Mariquina", tipo: "1" },
    { display: "Valdivia                ", value: "XIV - Region de Los Rios-Valdivia                ", tipo: "3" }];

var xv = [
    { display: "Seleccione Comuna", value: "Seleccione Comuna", tipo: "0" },
    { display: "Arica     ", value: "XV - Region de Arica y Parinacota-Arica     ", tipo: "3" },
    { display: "Camarones ", value: "XV - Region de Arica y Parinacota-Camarones ", tipo: "1" },
    { display: "Putre     ", value: "XV - Region de Arica y Parinacota-Putre     ", tipo: "1" }];

var base = [{ display: "Seleccione Comuna", value: "" }];

$(window).on("load", function () {
    list(xiii);
    $("#comuna").val("RM - Region Metropolitana -Santiago Centro     ");
    if (!($('#buckTabChannels').hasClass('channelsbuck__show'))) {
        $('#buckTabChannels').addClass('channelsbuck__show');
    }
});

//evento del select region asigna la lista de valores al select comuna
$(document).on('change', '#region', function () {
    clean_msg();
    var parent = $(this).val();
    switch (parent) {
        case 'region_por_seleccionar':
            $("#comuna").html('');
            list(base);
            break;
        case 'I - Region de Tarapaca':
            list(i);
            break;
        case 'II - Region de Antofagasta':
            list(ii);
            break;
        case 'III - Region de Atacama':
            list(iii);
            break;
        case 'IV - Region de Coquimbo':
            list(iv);
            break;
        case 'V - Region de Valparaiso':
            list(v);
            break;
        case 'VI - Region de O\'Higgins':
            list(vi);
            break;
        case 'VII - Region del Maule':
            list(vii);
            break;
        case 'VIII - Region de Bio Bio':
            list(viii);
            break;
        case 'IX - Region de La Araucania':
            list(ix);
            break;
        case 'X - Region de Los Lagos':
            list(x);
            break;
        case 'XI - Region de Aysen':
            list(xi);
            break;
        case 'XII - Region de Magallanes y de la Antartica':
            list(xii);
            break;
        case 'RM - Region Metropolitana':
            list(xiii);
            break;
        case 'XIV - Region de Los Rios':
            list(xiv);
            break;
        case 'XV - Region de Arica y Parinacota':
            list(xv);
            break;
        default:
            $("#comuna").html('');
            list(xiii);
            break;
    }
});
//function para poblar select dependiente 'comuna'
function list(array_list) {
    $("#comuna").html("");
    $(array_list).each(function (i) {
        $("#comuna").append("<option value='" + array_list[i].value + "' data-tipo='" + array_list[i].tipo + "'>" + array_list[i].display + "</option>");
    });
}
function clean_msg() {
    $('#alerterror').removeClass('show__msg');
    $('#alertsuccess').removeClass('show__msg');
    if ($('#buckTabChannels').hasClass('channelsbuck__show')) {
        $('#buckTabChannels').removeClass('channelsbuck__show');
    }
}
$('.img__holder.channelOnlyLA').addClass('hide');

$(document).on('change', '#comuna', function () {
    var tipo = $('#comuna option:selected').data('tipo');
    switch (tipo) {
        case 0:
            $('#alerterror').find('#p__msg').remove();
            $('#alertsuccess').find('#p__msg').remove();
            break;
        case 1:
            $('#alertsuccess').find('#p__msg').remove();
            $('#alerterror').find('#p__msg').remove();
            clean_msg();
            $('#alerterror').append("<p id='p__msg' class='fore__color'><b>Lo sentimos,</b> comuna sin factibilidad de servicios hogar VTR.</p>");
            $('#alerterror').addClass('show__msg');
            if ($('#buckTabChannels').hasClass('channelsbuck__show')) {
                $('#buckTabChannels').removeClass('channelsbuck__show');
            }
            break;
        case 2:
            $('#alerterror').find('#p__msg').remove();
            $('#alertsuccess').find('#p__msg').remove();
            clean_msg();
            $('#alerterror').append("<p id='p__msg' class='fore__color'><b>Lo sentimos,</b> comuna sin factibilidad HD.</p>");
            $('#alerterror').addClass('show__msg');
            if ($('#buckTabChannels').hasClass('channelsbuck__show')) {
                $('#buckTabChannels').removeClass('channelsbuck__show');
            }
            break;
        case 3:
            $('#alerterror').find('#p__msg').remove();
            $('#alertsuccess').find('#p__msg').remove();
            clean_msg();
            if (!($('#buckTabChannels').hasClass('channelsbuck__show'))) {
                $('#buckTabChannels').addClass('channelsbuck__show');
            }
            $('.img__holder.channelOnlyLA').removeClass('show');
            $('.img__holder.channelOnlyLA').addClass('hide');
            $('.img__holder.channelNotLA').removeClass('show');
            $('.img__holder.channelNotLA').addClass('show');
            break;
        case 5:
        case 7:
            $('#alerterror').find('#p__msg').remove();
            $('#alertsuccess').find('#p__msg').remove();
            clean_msg();
            if (!($('#buckTabChannels').hasClass('channelsbuck__show'))) {
                $('#buckTabChannels').addClass('channelsbuck__show');
            }
            $('.img__holder.channelOnlyLA').removeClass('show');
            $('.img__holder.channelOnlyLA').addClass('hide');
            $('.img__holder.channelNotLA').removeClass('show');
            $('.img__holder.channelNotLA').addClass('show');
            break;
        case 4:
            $('#alerterror').find('#p__msg').remove();
            $('#alertsuccess').find('#p__msg').remove();
            clean_msg();
            if (!($('#buckTabChannels').hasClass('channelsbuck__show'))) {
                $('#buckTabChannels').addClass('channelsbuck__show')
            }
            $('.img__holder.channelNotLA').removeClass('show');
            $('.img__holder.channelNotLA').addClass('hide');
            $('.img__holder.channelOnlyLA').addClass('show');
            break;
        default:
            $('#alerterror').find('#p__msg').remove();
            $('#alertsuccess').find('#p__msg').remove();
            clean_msg();
    }
})

function show_category(item) {
    var category = item;
    $('.img__holder').addClass('hide');
    $('.img__holder').removeClass('show');
    $("div[data-select='" + category.trim() + "']").addClass('show');
    if (category === 'mostrar-todo') {
        show_all();
    }
    var tipo = $('#comuna option:selected').data('tipo');
    switch (tipo) {
        case 4:
            $('.img__holder.channelNotLA').removeClass('show');
            $('.img__holder.channelNotLA').addClass('hide');
            if (category === 'mostrar-todo') {
                $('.img__holder.channelOnlyLA').removeClass('hide');
                $('.img__holder.channelOnlyLA').addClass('show');
            }
            break;
    }
}

function show_all() {
    $('.img__holder').removeClass('hide');
    $('.img__holder').addClass('show');
    $('.img__holder.channelOnlyLA').removeClass('show');
    $('.img__holder.channelOnlyLA').addClass('hide');
}

$(document).on('click', '#li_tab_1', function () {
    show_category($('#filter_ch_tab1 option:selected').val());
})

$(document).on('click', '#li_tab_2', function () {
    show_category($('#filter_ch_tab2 option:selected').val());
})

$(document).on('click', '#li_tab_3', function () {
    show_all();
})

$(document).on('change', '#filter_ch_tab1, #filter_ch_tab2', function () {
    show_category($(this).val());
})