// JavaScript Document
// textos de las opciones, debe ponerse como numero consecutivo
//var pcierra="images/cierra.gif";
//var pabre="images/abre.gif";

var conexion2;
var colorletra;
var inf=new Array(20);
var infi= new Array(20);
var corrida=239;
var leftmsg;
var leftfaq;
var enle = new Array(18);
var enli = new Array(18);

// enlaces
enle[1]="Más (sobre ASISTUR)";
enle[18]="Más (viajar asegurado a Cuba)";
enle[7]="Más (Asistencia Médica)";
enle[8]="Más (Repatriación Sanitaria)";
enle[15]="Más (viajar al exterior)";
enle[16]="Más (Almacenes y Comercio)";
enle[13]="Más (seguro Automotor)";
enle[17]="Más (Viviendas y Oficinas)";
enli[1]="More (about ASISTUR)";
enli[18]="More (travel insurance to Cuba)";
enli[7]="More (Medical Assistance)";
enli[8]="More (Medical Evacuation)";
enli[15]="More (travel abroad, assured)";
enli[16]="More (Warehouses & Trading)";
enli[13]="More (Car Insurance)";
enli[17]="More (Houses & Offices)";
//


// bloque de contenidos en ESPAÑOL
// fragmento de la organizacion

inf[1]="Desde 1991 es la compañía líder en Cuba en la prestación de servicios especializados de asistencia a los viajeros, para lo cual dispone de: <br><br> .Personal calificado <br> .Una extensa red de proveedores<br>.Corresponsales en el extranjero <br>que garantiza la asistencia al viajero en cualquier país<br> .Central de Alarma disponible las 24 horas del año todos los días<br><a href=javascript:menos('01')>Cerrar..</a><br />ASISTUR  actúa además como corredor de seguros en la comercialización de diferentes productos de las compañías del mercado cubano<br><br>La Organizaci&oacute;n cuenta con la reconocida confianza de las principales compañias internacionales de asistencia para los cuales actúa como corresponsal en Cuba<br><a href=javascript:menos('01')>Cerrar..</a>";

infi[1]="Since 1991 is the leading company in Cuba specialized in rendering assistance services to visitors. To do so, it disposes of: <br>.A highly qualified personal <br> .Wide network of providers throughout the country.<br> .Correspondant companies abroad <br>which guarantee the attendant to traveller in any country<br> .Alarm Centre available 24 hours every day<br> ASISTUR acts as insurance broker offering different insurance covers tailored by the main Cuban insurance companies<br><br> The company acts as correspondent of the most important<br>international assistance and insurance companies from all over the world.<br><a href=javascript:menos('01')>Close..</a>";


inf[2]="Oficinas en los polos turísticos más importantes de la Isla: <br><br> .Varadero<br> .Cienfuegos<br> .Cayo Coco<br> .   GuardaLaVaca<br> .Santiago de Cuba<br><br><center><a href='mapa.html' target='_top'>Ubicación</a>";
infi[2]="The company has offices in the most important tourist resorts of the Island : <br><br> .Varadero<br> .Cienfuegos<br> .   Cayo Coco<br> .GuardaLaVaca<br> .Santiago de Cuba<br><br><center><a href='mapa.html' target='_top'>Location</a>";


inf[3]="Sistema de Gestión de la Calidad, Norma ISO 9001:2008<br>desde octubre 2009<br><br><center><img src='images/onn2009.jpg'></center><br>";
infi[3]="Quality Procurement System, Norm ISO 9001:2008<br>since October 2009<br><br><center><img src='images/onn2009.jpg'></center><br>";

inf[4]="<center><img src='images/organigrama.gif'></center><br>";
infi[4]="<center><img src='images/flowchart.gif'></center><br>";

inf[5]="Apreciamos su opinión sobre nuestros servicios.<br><center><a href='http://www.asistur.cu/encuestamedica_2.php'  target='_blank'>Asistencia Médica</a><br><a href='http://www.asistur.cu/encuestarepfun_2.php' target='_blank'>Repatriación Funeraria</a><br><a href='http://www.asistur.cu/encuestaautos_2.php' target='_blank'>Seguro Automotor</a><br><a href='http://www.asistur.cu/encuestagm_2.php' target='_blank'>Seguro para Gastos Médicos</a></center>";
infi[5]="We appreciate your opinion on our services.<br><center><a href='http://www.asistur.cu/encuestamedica_2.php' target='_blank'>Medical Assistance</a><br><a href='http://www.asistur.cu/encuestarepfun_2.php' target='_blank'>Funeral Repatriation</a><br><a href='http://www.asistur.cu/encuestaautos_2.php' target='_blank'>Car Insurance</a></center>";		

// fragmento de asistencia
inf[7]="-Obtenci&oacute;n y env&iacute;o de reportes m&eacute;dicos.<br>-Coordinaci&oacute;n de sillas de ruedas.<br>-Coordinaci&oacute;n de ambulancias a&eacute;reas y terrestres.<br>-Control de gastos m&eacute;dicos.<br><a href=javascript:menos('07')>Cerrar..</a>";
infi[7]="-Obtaining and sending of medical reports.<br>-Obtaining and sending of medical reports.<br>-Coordination of wheelchairs and medication<br>.Coordination of Air and land ambulance services<br>.Control of medical expenses<br><a href=javascript:menos('07')>Close..</a>";

inf[8]="-Acompa&ntilde;amientos m&eacute;dicos.<br> -Recepci&oacute;n, atenci&oacute;n y hospedaje de m&eacute;dicos y param&eacute;dicos.<br> -Gestiones para la autorizaci&oacute;n de aterrizaje de ambulancias a&eacute;reas.<br> -Coordinaci&oacute;n de ambulancias a&eacute;reas y terrestres.<br> -Atenci&oacute;n a los tripulantes de las ambulancias a&eacute;reas<br><a href=javascript:menos('08')>Cerrar..</a>";
infi[8]="-Reception and accomodation for doctors and paramedics.<br>-Authorization for air ambulance landing<br> .  Coordination of Air and land ambulance services<br> -Assistance to the air ambulance crew.<br><a href=javascript:menos('08')>Close..</a>";


inf[9]= "Si Usted se ha quedado sin efectivo durante su estancia en Cuba, cuente con nosotros, podemos ocuparnos de su urgencia financiera.<br> Le adelantamos efectivo <br>previo dep&oacute;sito de un familiar<br> o amigo suyo en el extranjero<br><br> !! LL&aacute;menos !!   por el tel&eacute;fono<br><center>  (53 7) 861 8290  <br><br><a href=javascript:correo('4') title='E-mail hacia Asistencia Financiera'>o envie un e-mail</a></center><br>";
infi[9]= "If you are run  out of cash   while your staying in Cuba, we can take care of your financial urgency<br> We advance some cash previous deposit <br>from a relative or friend abroad<br><br> Call us !!  <br>by the phone<br><center>  (53 7) 861 8290  <br><br><a href=javascript:correo('4') title='E-mail to financial aid service'>or send a e-mail</a></center><br>";


inf[10]=" .Realizaci&oacute;n de gestiones m&eacute;dico - legales y de los servicios necrol&oacute;gicos requeridos<br> .  Tramitaci&oacute;n de la documentaci&oacute;n con las autoridades locales y consulados<br> .Reservaci&oacute;n de espacios en l&iacute;neas a&eacute;reas  <br> .  Coordinaci&oacute;n para la transportaci&oacute;n al aeropuerto<br> .Env&iacute;o a los servicios funerarios receptivos de la documentaci&oacute;n acompa&ntilde;ante";
infi[10]=" .Medical-Legal procedures and the required obituary services.<br> .Processing of documents with local and consular authorities.<br> .Airline booking<br> .Coordination of transfer to the airport.<br> .Sending of appropriate documents to receptive funeral services";

inf[11]= ".Localizaci&oacute;n de equipajes <br> .Tramitaci&oacute;n en la obtenci&oacute;n de documentos de viajes<br> .  Coordinaci&oacute;n de representaci&oacute;n legal  .Coordinaci&oacute;n en la tramitaci&oacute;n de fianzas";
infi[11]= ".Retrieval of misplaced luggages<br> .Coordination of new trip documents<br> .Coordination of legal assistance .  Payment of Bail Bond";


// seguros
inf[13]=".Cubierta Comprensiva &nbsp;(Da&ntilde;os a la cubierta no provocados por un accidente <br> .Sustracciones   <br><a href='http://www.asistur.cu/seguroautomotor.php' title='Cotizaci&oacute;n de Cobertura de Da&ntilde;o F&iacute;sico y Responsabilidad Civil' target='_blank'>Ejemplo de cotizaci&oacute;n</a><br><a href=javascript:menos('13')>Cerrar..</a>";
infi[13]=".Comprehensive Car body(other physical damages caused no by crash or overturn).<br> .  Theft  <br> .  Civil Liability (RC)<br /><a href='http://www.asistur.cu/seguroautomotor.php' title='Cotizaci&oacute;n de Cobertura de Da&ntilde;o F&iacute;sico y Responsabilidad Civil' target='_blank'>Quotation example (in Spanish so far)</a><br><a href=javascript:menos('13')>Close..</a>   ";


inf[14]="Producto dirigido a personas extranjeras con residencia temporal<br> en la Republica de Cuba.<br>Cubre servicios de salud seg&uacute;n la edad y el sexo  de la persona<br>(Precios en CUC /a&ntilde;o).<a href=javascript:void(0)><img src='images/beneficios.gif' alt='Beneficios' width='13' height='13' border='0' title='Beneficios de la póliza' onclick=window.open('beneficios_del_producto_gastosmedicos.htm','','height=500,width=575,left=100,top=40') target='_top' /></a><br><br><center>Edad :<select name='edad' size='1' id='edad' style='font-family:Verdana; font-size:10px' title='Seleccione la edad' onchange= 'edad()'></select><br><br>H <input name='hombres' type='text'id='hombres' style='font-family:Verdana;font-size:10px;border:0px;background-color:#99CCFF' value='148.00' size='7' />  &nbsp; &nbsp; <br>M <input name='mujeres' type='text' id='mujeres' style='font-family:Verdana;font-size:10px;border:0px;background-color:#99CCFF' value='148.00' size='7' /></center>";
infi[14]="Product directed to foreign people <br>with temporary residence in the Republic of Cuba.<br> It covers health services according <br>to the age and gender of the person.<br>Benefits <br>(Precios en CUC /a&ntilde;o).  <a href=javascript:void(0)><img src='images/beneficios.gif' alt='Benefits' width='13' height='13' border='0' title='Policy benefits' onclick=window.open('beneficios_del_producto_gastosmedicos_ingles.htm','','height=500,width=575,left=100,top=40') target='_top' /></a><br><br><center>Age :<select name='edad' size='1' id='edad' style='font-family:Verdana; font-size:10px' title='Select the age' onchange= 'edad()'></select><br><br>M <input name='hombres' type='text'id='hombres' style='font-family:Verdana;font-size:10px;border:0px;background-color:#99CCFF' value='148.00' size='7' />  &nbsp; &nbsp; <br><br>F  <input name='mujeres' type='text' id='mujeres' style='font-family:Verdana;font-size:10px;border:0px;background-color:#99CCFF' value='148.00' size='7' /></center>";

inf[15]="Sal<select name='s_dia1' id='s_dia1' title='Dia' onChange=calcula_save() style='font-family:verdana; font-size:9px'></select>&nbsp;<select name='s_mes1' id='s_mes1' title='Mes' onChange=calcula_save() style='font-family:verdana; font-size:9px'></select>&nbsp<select name='s_anio1' title='Año' id='s_anio1' onChange=calcula_save() style='font-family:verdana; font-size:9px'></select><br>Reg<select name='s_dia2' title='Dia' id='s_dia2' onChange=calcula_save() style='font-family:verdana; font-size:9px' ></select>&nbsp<select name='s_mes2' title='Mes' id='s_mes2' onChange=calcula_save() style='font-family:verdana; font-size:9px'></select>&nbsp;<select name='s_anio2' title='Año' id='s_anio2' onChange=calcula_save() style='font-family:verdana; font-size:9px'><option></option></select><br>Dias : <input name='dias' type='text' id='dias' value='1' size='4' style='font-family:verdana; font-size:9px'  readonly='true' /><br><br>Precio : <input name='precio' type='text' id='precio' value='2.50' size='6' style='font-family:verdana; font-size:9px' readonly='true' /><br><a href=javascript:menos('15')>Cerrar..</a>";
infi[15]="Dep<select name='s_dia1' id='s_dia1' title='Day' onChange=calcula_save() style='font-family:verdana; font-size:9px'></select>&nbsp<select name='s_mes1' id='s_mes1' title='Month' onChange=calcula_save() style='font-family:verdana; font-size:9px'></select>&nbsp<select name='s_anio1' id='s_anio1' title='Year' onChange=calcula_save() style='font-family:verdana; font-size:9px'></select><br>Ret<select name='s_dia2' id='s_dia2'  title='Day' onChange=calcula_save() style='font-family:verdana; font-size:9px'></select>&nbsp;<select name='s_mes2' id='s_mes2' title='Month' onChange=calcula_save() style='font-family:verdana; font-size:9px'></select>&nbsp;<select name='s_anio2' id='s_anio2' title='Year' onChange=calcula_save() style='font-family:verdana; font-size:9px'><option></option></select><br><br>Days : <input name='dias' type='text' id='dias' value='1' size='4' style='font-family:verdana; font-size:9px'  readonly='true' /><br><br>Precio / Price : <input name='precio' type='text' id='precio' value='2.50' size='6' style='font-family:verdana; font-size:9px' readonly='true' /><br><a href=javascript:menos('15')>Close..</a>";

inf[16]=".Seguro de mercanc&iacute;as (cubre p&eacute;rdida o da&ntilde;o a las mercanc&iacute;as, <br>almacenadas en el inmueble)<br> .Cobertura adicional para mercanc&iacute;as refrigeradas<br> (por falta de refrigeraci&oacute;n en el inmueble donde est&eacute;n almacenadas)<br> .Cobertura adicional para dinero en efectivo<br> <a href=javascript:menos('16')>Cerrar..</a>";
infi[16]=".Merchandise Insurance (against lose or damages of stored goods)<br> .Addtitional Covering to refrigerated merchandises<br> for lack of refrigeration in the property<br> where they are stored)<br> .Additional Cover for money in cash<br><a href=javascript:menos('16')>Close..</a>";


inf[17]="<br>Seguro del contenido (da&ntilde;os ocasionados al contenido del inmueble).<br> .Cobertura Adicional para Propiedades de Alto Riesgo.<br> .Cobertura Adicional para Efectos Personales.<br> .  Cobertura Adicional para  Dinero en efectivo<br><a href=javascript:menos('17')>Cerrar..</a>";
infi[17]=".Content Insurance (protection against the content of property).<br> .Aditional Covering to Properties<br> .Aditional Covering for Personal Effects.<br> .Aditional Covering for money in cash<br><a href=javascript:menos('17')>Close..</a>";


inf[18]="en situaciones como repatriaci&oacute;n y evacuaci&oacute;n sanitaria, procesos de responsabilidad civil, accidentes, robo o p&eacute;rdida de equipaje, etc. <a href=javascript:correo('5')> Escriba </a> a la Direcci&oacute;n de Seguros para obtener m&aacute;s informaci&oacute;n<br><a href=javascript:menos('18')>Cerrar..</a>";
infi[18]="<br> for facing some incidents during your stay in Cuba <br> such as repatriation and evacuation, <br> civil liability processes, accidents, robbery and loss of baggages, etc. <br> <a href=javascript:correo('5')>Write </a> to the Insurance Division for getting more information.<br><a href=javascript:menos('18')>Close..</a>";


function compa () {
var sele=document.getElementById("indice");
 var alfa="ABCDEFGHIJKLMNOPQRSTWYVUXZ";
 var alfa0=alfa.length;
 var hlink="";
 var reng=0;	  
 for (x=0; x<= alfa0-1; x++) {
	   indi=alfa.substr(x,1);
	   hlink=hlink+"<a href='javascript:void(0)' onclick=company('"+indi+"') />"+indi+"</a>&nbsp;&nbsp";
	   if (reng ==8) {
	    hlink=hlink+"<br />";
		reng=0;
	   } else {
		reng++;
	   }
	 
 } // del for
 
 sele.innerHTML=hlink;

} // de la funcion sele



function inctext() {
	var gros0=parseInt(document.getElementById("letra").value);
	if (gros0 <= 13) {
		gros0++;
		ngros=gros0+"px";
		document.getElementById("letra").value=gros0;
		
		var colu="";
		for (h=1; h<=4; h++) {
			colu="columna"+h;
		    document.getElementById(colu).style.fontSize=ngros;
		}
	}

} // de inctext

function dectext() {
	var gros0=parseInt(document.getElementById("letra").value);
	if (gros0 >= 11) {
		gros0--;
		ngros=gros0+"px";
		document.getElementById("letra").value=gros0;
		
		var colu="";
		for (h=1; h<=4; h++) {
			colu="columna"+h;
		    document.getElementById(colu).style.fontSize=ngros;
		}
	}

} // de dectext

function mas(w) {
 var idi=document.getElementById("idioma").value;
 var winf=w+"inf";
 var inh=document.getElementById(winf);
 var ar=parseInt(w,10);
 var dlink=w+"link";
 var dlinkn=document.getElementById(dlink);
 
 
 switch (w) {
	 case "15": // save
	    
		var fec=new Date();
					 document.getElementById(winf).innerHTML=inf[ar];
					 var a1=parseInt(fec.getFullYear());
					 //alert(a1);
					 var auno=document.getElementById("s_anio1");
					 var ados=document.getElementById("s_anio2");
					 // propiedades
					 auno.style.fontSize="10px";
					 auno.style.color="blue";
					 ados.style.fontSize="10px";
					 ados.style.color="green";
					 					 
					 auno.length=0;
					 ados.length=0;
					 
					 for (f=0; f<=1; f++) {
					   var g=parseInt(a1+f);
					   
					   auno.options[f] =new Option(g,g);
					   ados.options[f] =new Option(g,g);
					 }
		 		
						// los meses
					 var m1=parseInt(fec.getMonth());
					 //alert(a1);
					 var muno=document.getElementById("s_mes1");
					 var mdos=document.getElementById("s_mes2");
					 
					 muno.style.fontSize="10px";
					 muno.style.color="blue";
					 mdos.style.fontSize="10px";
					 mdos.style.color="green";
					 
					 muno.length=0;
					 mdos.length=0;
					 
					 for (f=0; f<=11; f++) {
					   var g=parseInt(f+1);
					   
					   muno.options[f] =new Option(g,g);
					   mdos.options[f] =new Option(g,g);
					 }
					 
					 if (m1<=11) {
						 mreal=parseInt(m1);
					 } 
					 
					 muno.options[parseInt(mreal)].selected=true;
					 mdos.options[parseInt(mreal)].selected=true;
					 
					 // los dias
					 var d1=parseInt(fec.getDate());
					 //alert(a1);
					 var duno=document.getElementById("s_dia1");
					 var ddos=document.getElementById("s_dia2");
					 
					 duno.style.fontSize="10px";
					 duno.style.color="blue";
					 ddos.style.fontSize="10px";
					 ddos.style.color="green";
					 
					 duno.length=0;
					 ddos.length=0;
					 
					 for (f=1; f<=31; f++) {
								   
					   duno.options[f] =new Option(f,f);
					   ddos.options[f] =new Option(f,f);
					 }
					 
					 duno.options[d1].selected=true;
					 ddos.options[d1].selected=true;
		 
	 break;
 } // del switch
 
 
 
 if (idi=="e") {
	 if (w != "15") { 
	  inh.innerHTML=inf[ar];
	 }
	 que="Cerrar..";
 } else {
	 if (w !="15") {
	  inh.innerHTML=infi[ar];
	 }
	 que="Close..";
 }
 
 dlinkn.innerHTML="<a href=javascript:menos('"+w+"')>"+que+"</a>";
} // funcion mas

function menos(w) {
 var idi=document.getElementById("idioma").value;
 var g=parseInt(w,10);
 var dmsg=w+"inf";
 var dlink=w+"link";
 document.getElementById(dmsg).innerHTML="";
 
 if (idi=="e") {
	 que=enle[g];
 } else {
	 que=enli[g];
 }
 document.getElementById(dlink).innerHTML="<a href=javascript:mas('"+w+"')>"+que+"</a>";
	
} // funcion mas


function look(bild) {
 var espacio=document.getElementById("imagen");
 
 if (bild=="N") {
 
   espacio.innerHTML="";
   
 } else {
   if (bild=="hturbahamas.jpg") {
	   
	   espacio.innerHTML="<img src='images/hturbahamas.jpg' border='0'>";
       
   } else {
   
	   aa="images/"+bild;
	   espacio.innerHTML="<img src="+aa+" border='0'>";
	   //espacio.src=aa;
   }
 }

}


function correo(d) {
 var capae=document.getElementById("ecorreo");
 var i=document.getElementById("idioma").value;
 
 capae.innerHTML="";
 
 switch (d) {
	 case "1" :
		 if (i=="e") {
		   
		  var nomb="Su nombre";
		  var pers="Estimados Srs./ Sras.";
		  var suje="Info sobre auxilio al Viajero.";
		 
		 } else {
		  
		  var nomb="Your name";
		  var pers="Dear Mr. /Mrs.";
		  var suje="Info about Aid to Traveler."; 
			 
		 }
		 		 
		 var dest="asisten@asistur.cu";
		 var lectura="readonly='true'";
	 break;
	 
	 case "2" :
		 
		 if (i=="e") {
		   
		  var nomb="Su nombre";
		  var pers="Estimados Srs./ Sras.";
		  var suje="Info sobre productos de seguros.";
		 
		 } else {
		  
		  var nomb="Your name";
		  var pers="Dear Mr. /Mrs.";
		  var suje="Info about Insurance products."; 
			 
		 }
		 
		 var dest="seguros@asistur.cu";
		 var lectura="readonly='true'";
	 break;
	
	 case "3" :
		 
		 if (i=="e") {
		   
		  var nomb="Su nombre";
		  var pers="Estimado(a) [Nombre] :\n\nDebieras visitar la pagina WEB http://www.asistur.cu/\n";
		  var suje="Pagina WEB sobre auxilio al Viajero";
		 
		 } else {
		  
		  var nomb="Your name";
		  var pers="Dear [Name] :\n\nYou should visit the WEB page http://www.asistur.cu/\n";
		  var suje="WEB page about Aid to Traveler."; 
			 
		 }
		 		 
		 var dest='';
		 var lectura="";
     break;
	 
	 case "4" :
         
		 if (i=="e") {
		   
		  var nomb="Su nombre";
		  var pers="Estimados Sr./ Sra.";
		  var suje="Info sobre asistencia financiera.";
		 
		 } else {
		  
		  var nomb="Your name";
		  var pers="Dear Mr. /Mrs.";
		  var suje="Info about Financial Aid."; 
			 
		 }
		 
		 var dest="asistenciafinanciera@asistur.cu";
		 var lectura="readonly='true'";
	 break;
	 
     case "5" :
		 
		 if (i=="e") {
		   
		  var nomb="Su nombre";
		  var pers="Estimado Srs./ Sra.";
		  var suje="Info sobre viajar a Cuba con seguro.";
		 
		 } else {
		  
		  var nomb="Your name";
		  var pers="Dear Mr. /Mrs.";
		  var suje="Info about travel to Cuba assured."; 
			 
		 }
		 
		 var dest="seguros@asistur.cu";
		 var lectura="readonly='true'";
	 break;
	 
	 case "6" :
		 
		 if (i=="e") {
		   
		  var nomb="Su nombre";
		  var pers="Estimado Srs./ Sra. \n\nTengo la intención de suscribir una póliza \npara gastos médicos";
		  var suje="Solicitud de póliza para gastos médicos";
		 
		 } else {
		  
		  var nomb="Your name";
		  var pers="Dear Mr. /Mrs. \n\nI have the intention to subscribe a policy \nfor medical costs";
		  var suje="Requesting policy for medical costs"; 
			 
		 }
		 
		 var dest="yelaine@asistur.cu";
		 var lectura="readonly='true'";
	 break;
	 
	 case "7" :
		 
		 if (i=="e") {
		   
		  var nomb="Su nombre";
		  var pers="Estimado Srs./ Sra. \n\nRepresento a una agencia de viajes o TT.OO y deseo negociar con Uds..";
		  var suje="Solicitud de CONTRATO para inclusión del seguros de viajes a Cuba";
		 
		 } else {
		  
		  var nomb="Your name";
		  var pers="Dear Mr. /Mrs. \n\nI represent a travel agency or TT.OO and I would like to negotiate with you..";
		  var suje="Requesting a CONTRACT for including the travel insurance to Cuba"; 
			 
		 }
		 
		 var dest="seguros@asistur.cu";
		 var lectura="readonly='true'";
	 break;
 
  
 
 } // del switch
	
 var korper="<br /><center>De / From:<br><input type='text' name='remite' id='remite' size='24' value='"+nomb+"'><br />Su / Your Email<br /><input type='text' name='eremite' id='eremite' size='24'><br>Para / To:<br><input type='text' name='destino' id='destino' size='24' value='"+dest+"'"+lectura+" /><br />Sujeto / Subject<br><input type='text' name='sujeto' id='sujeto' size='26' value='"+suje+"' /> <br>Texto / Text<br><textarea  name='texto' id='texto'  cols='24' rows='6'>"+pers+" </textarea><br><br><input type='button' name='enviar' id='enviar' size='12' value='Enviar/Send'  style='font-family:verdana; font-size:9px; background-color:black; color:white; font-weight:bold' onClick='sendmail()'> &nbsp;&nbsp;&nbsp;<input type='button' name='cancelar' id='cancelar' size='12' value='Cancel'  style='font-family:verdana; font-size:9px; background-color:red; color:white; font-weight:bold' onClick='cancelmail()'></center>"; 	
 
 capae.innerHTML=korper;
 capae.style.visibility="visible";
 capae.style.backgroundColor="#FFCCCC";
 document.getElementById("Layer2").style.visibility="hidden";
 document.getElementById("Layer3").style.visibility="hidden";
 document.getElementById("ecorreo").style.top="155px";
 document.getElementById("ecorreo").style.left=leftmsg;
} // fin de la funcion correo

function cancelmail() {

document.getElementById("ecorreo").innerHTML="";
document.getElementById("ecorreo").style.visibility="hidden";
document.getElementById("Layer2").style.visibility="visible";
document.getElementById("Layer3").style.visibility="visible";
//document.getElementById("Layer6").style.top="273px";
}

function valida() {
	
	var dnombre = document.getElementById("nombre").value;
	var demail = document.getElementById("email").value;
	var durl = document.getElementById("url").value;
	var dtlink = document.getElementById("tlink").value;
	var dpoint = document.getElementById("point").value;
	var ddescripcion = document.getElementById("descripcion").value;
	
	
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(demail)) { //0
	 
	  if (dnombre.length > 2) {  //1
	  
	    if (durl.length > 6) {//2
			
			if (dtlink.length > 1) {//3
				
				if (dpoint.length > 6) {//4
					
					if (ddescripcion.length > 20) {//5
						
						document.form.datos.submit();
						
					} else {
						alert("Descripion insuficiente..Insufficient description");
						return false;
					}// 5
				
				} else {
				   
				   alert("Revisar hiperlink... Check hyperlink");
				   return false;
				}//4
				
			} else {
				
				alert("Insuficiente texto del link.. Insufficient text link");
				return false;
			}//3
			
		} else {
			
			alert("Revisar la URL.. Check the URL");
			return false;
		}// 2
		
	  } else {
		  
		  alert("Nombre muy corto..Very short name");
		  return false;
	  } // 1
				
	} else {
		alert("Dirección de e-mail no válida.. Invalid e-Mail address");
		return false;
	} // 0
		
	
} // de la funcion valida

function noconexion (idi) {
	
	if (idi=="e") {
		msg="No pude conectarme a la base de datos. Por favor intente en breves momentos";
	} else {
	    msg="Can not connect to the data base. Please try again in few moments"	
	}
	alert(msg);
	
} // de la funcion no conexion

function sendmail() {

var email_1 = document.getElementById("destino").value;
var email_2 = document.getElementById("eremite").value;		
var nombre=	document.getElementById("remite").value;	
var sujeto = document.getElementById("sujeto").value;
var mensaje = document.getElementById("texto").value;		
	
if (email_1=="seguros@asistur.cu") {
	email_1="yelaine@asistur.cu";
}



if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(email_1)) {

 if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(email_2)) {

    //alert ("Ok."); // enviar correo
	
	
	conexion2=crearXMLHttpRequest();
	conexion2.onreadystatechange = sendmail2;
		conexion2.open('GET','ecorreo.php?destino='+email_1+'&eremite='+email_2+'&nombre='+nombre+'&sujeto='+sujeto+'&mensaje='+mensaje, true);
		conexion2.send(null);
 
 } else {
	  
	  alert("Su direccion de correo no es valida \r\n Your e-mail address is not valid");
	  return false;
 } // 1ra validacion

} else {
	
	 alert("La direccion de correo del destino no es valida \r\n The destination's e-mail address is not valid");
	 return false;


} // 2da validacion

} // de la funcion send mail


function sendmail2() {
	
 var capita=document.getElementById("ecorreo");
 //capita.style="background-color:yellow";
 capita.innerHTML="";
 var proceso="<br><br><br><center>Enviando / Sending e-Mail<blink>...</blink></center>";
  
  if (conexion2.readyState == 4)
  {
    
	var xml = conexion2.responseXML;
	var v_1=xml.getElementsByTagName('a');
	var result = v_1[0].childNodes[0].nodeValue;  // notificacion
	
	var nota="<br><br><center><span class='Estilo2'> "+result+"<br><br><input type='button' name='terminar' id='terminar' value='Aceptar / Accept' style='font-family:verdana; font-size:12px; background-color:blue; color:white; font-weight:bold; border:none' onClick='cancelmail()'></center><br><br>";
	
	capita.innerHTML=nota;
	
  } 
  else 
  {
  
   capita.innerHTML=proceso;
  
  }


} // fin de la funcion sendmail2


function edad() {

valor = document.getElementById("edad").value;

switch (valor){

case "Edad":  
 document.getElementById("hombres").value="Hombre";
 document.getElementById("mujeres").value="Mujer";
 break;

case "17":  
 document.getElementById("hombres").value=360;
 document.getElementById("mujeres").value=377;
 break;

case "18":  
 document.getElementById("hombres").value=297;
 document.getElementById("mujeres").value=433;
 break;
  
case "19":   
 document.getElementById("hombres").value=311;
 document.getElementById("mujeres").value=448;
 break;
 
     
case "20":     
 document.getElementById("hombres").value=325;
 document.getElementById("mujeres").value=462;
 break;
        
case "21":   
 document.getElementById("hombres").value=340;
 document.getElementById("mujeres").value=478;
 break;
        
case "22":   
 document.getElementById("hombres").value=356;
 document.getElementById("mujeres").value=492;
  break;
       
case "23":   
 document.getElementById("hombres").value=370;
 document.getElementById("mujeres").value=507;
 break;
         
case "24":   
 document.getElementById("hombres").value=385;
 document.getElementById("mujeres").value=522;
 break;
        
case "25":   
 document.getElementById("hombres").value=399;
 document.getElementById("mujeres").value=538;
 break;
      

case "26":   
 document.getElementById("hombres").value=414;
 document.getElementById("mujeres").value=552;
 break;
        
case "27":   
 document.getElementById("hombres").value=430;
 document.getElementById("mujeres").value=568;
 break;
         
case "28":   
 document.getElementById("hombres").value=442;
 document.getElementById("mujeres").value=580;
 break;
         
case "29":   
 document.getElementById("hombres").value=453;
 document.getElementById("mujeres").value=590;
 break;
         
case "30":   
 document.getElementById("hombres").value=466;
 document.getElementById("mujeres").value=765;
 break;
         
case "31":   
 document.getElementById("hombres").value=478;
 document.getElementById("mujeres").value=778;
 break;
         
case "32":   
 document.getElementById("hombres").value=489;
 document.getElementById("mujeres").value=793;
break;
         
case  "33":   
 document.getElementById("hombres").value=502;
 document.getElementById("mujeres").value=801;
 break;

case  "34":     
 document.getElementById("hombres").value=516;
 document.getElementById("mujeres").value=808;
 break;
         
case   "35":     
 document.getElementById("hombres").value=531;
 document.getElementById("mujeres").value=816;
 break;
         
case  "36":     
 document.getElementById("hombres").value=546;
 document.getElementById("mujeres").value=823;
 break;
         
case "37":     
 document.getElementById("hombres").value=560;
 document.getElementById("mujeres").value=832;
 break;
         
case "38":     
 document.getElementById("hombres").value=603;
 document.getElementById("mujeres").value=876;
 break;
         
case "39":     
 document.getElementById("hombres").value=645;
 document.getElementById("mujeres").value=922;
 break;
         
case "40":     
 document.getElementById("hombres").value=688;
 document.getElementById("mujeres").value=967;
 break;
         
case "41":     
 document.getElementById("hombres").value=732;
 document.getElementById("mujeres").value=1011;
 break;

case  "42":     
 document.getElementById("hombres").value=776;
 document.getElementById("mujeres").value=1056;
 break;
         
case "43":     
 document.getElementById("hombres").value=830;
 document.getElementById("mujeres").value=1108;
 break;
         
case "44":      
 document.getElementById("hombres").value=885;
 document.getElementById("mujeres").value=1160;
 break;
         
case  "45":     
 document.getElementById("hombres").value=940;
 document.getElementById("mujeres").value=1212;
  break;
        
case "46":     
 document.getElementById("hombres").value=994;
 document.getElementById("mujeres").value=1265;
 break;
         
case "47":     
 document.getElementById("hombres").value=1049;
 document.getElementById("mujeres").value=1316;
 break;
         
case "48":     
 document.getElementById("hombres").value=1087;
 document.getElementById("mujeres").value=1375;
 break;
         
case "49":     
 document.getElementById("hombres").value=1127;
 document.getElementById("mujeres").value=1430;
 break;
         
case "50":     
 document.getElementById("hombres").value=1164;
 document.getElementById("mujeres").value=1489;
 
 break;
         
case "51":     
 document.getElementById("hombres").value=1203;
 document.getElementById("mujeres").value=1545;
 break;
         
case "52":     
 document.getElementById("hombres").value=1242;
 document.getElementById("mujeres").value=1601;
 break;
         
case "53":     
 document.getElementById("hombres").value=1336;
 document.getElementById("mujeres").value=1705;
 break;
         
case "54":      
 document.getElementById("hombres").value=1432;
 document.getElementById("mujeres").value=1810;
 break;
         
case "55":     
 document.getElementById("hombres").value=1527;
 document.getElementById("mujeres").value=1913;
 break;
         
case "56":     
 document.getElementById("hombres").value=1621;
 document.getElementById("mujeres").value=2017;
 break;
         
case "57":     
 document.getElementById("hombres").value=1717;
 document.getElementById("mujeres").value=2122;
 break;
         
case "58":     
 document.getElementById("hombres").value=1865;
 document.getElementById("mujeres").value=2264;
 break;
         
case "59":     
 document.getElementById("hombres").value=2012;
 document.getElementById("mujeres").value=2402;
 break;
         
case "60":     
 document.getElementById("hombres").value=2134;
 document.getElementById("mujeres").value=2088;
 break;
         
case "61":     
 document.getElementById("hombres").value=2280;
 document.getElementById("mujeres").value=2203;
 break;
         
case "62":     
 document.getElementById("hombres").value=2427;
 document.getElementById("mujeres").value=2317;
 break;
         
case "63":     
 document.getElementById("hombres").value=2543;
 document.getElementById("mujeres").value=2473;
 break;
         
case  "64":     
 document.getElementById("hombres").value=2659;
 document.getElementById("mujeres").value=2628;
 break;
         
case "65":     
 document.getElementById("hombres").value=2775;
 document.getElementById("mujeres").value=2782;
 break;
         
case "66":     
 document.getElementById("hombres").value=2892;
 document.getElementById("mujeres").value=2938;
 break;
         
case "67":     
 document.getElementById("hombres").value=3009;
 document.getElementById("mujeres").value=3093;
 break;
         
case "68":     
 document.getElementById("hombres").value=3124;
 document.getElementById("mujeres").value=3247;
 break;
         
case "69":     
 document.getElementById("hombres").value=3242;
 document.getElementById("mujeres").value=3402;
break;

case "70":     
 document.getElementById("hombres").value=3355;
 document.getElementById("mujeres").value=3521;
break;
 }
         
var ho=parseInt(document.getElementById("hombres").value);
var mu=parseInt(document.getElementById("mujeres").value);
var mu1= mu*1.0;
var ho1= ho*1.0;
mu1=mu1.toFixed(2);
ho1=ho1.toFixed(2);
document.getElementById("hombres").value=ho1;
document.getElementById("mujeres").value=mu1;

} // fin d ela funcion edad


function calcula_save() {

var d1=parseInt(document.getElementById("s_dia1").value);
var m1=parseInt(document.getElementById("s_mes1").value,10)-1;
var a1=parseInt(document.getElementById("s_anio1").value);
var fecha_1=new Date(a1,m1,d1);
var d2=parseInt(document.getElementById("s_dia2").value);
var m2=parseInt(document.getElementById("s_mes2").value,10)-1;
var a2=parseInt(document.getElementById("s_anio2").value);
var fecha_2=new Date(a2,m2,d2);


if (m1 != m2) {  // meses diferentes calcular con php
	conexion2=crearXMLHttpRequest();
	conexion2.onreadystatechange = dias2;
	m1=m1+1;
	m2=m2+1;
	
	conexion2.open('GET','dias.php?d1='+d1+'&d2='+d2+'&m1='+m1+'&m2='+m2+'&a1='+a1+'&a2='+a2, true);
	conexion2.send(null);
			
} else { // meses iguales trabajar com javaScript

	var mseg=1000*60*60*24;
	var n_dias=Math.ceil((fecha_2.getTime()-fecha_1.getTime())/(mseg))+1;
	if (isNaN(n_dias) || n_dias<0) {
	 
	 
		 if (document.getElementById("idioma").value=="e") { 
			 alert("Hay algún problema con las fechas. Favor chequearlas");
		 } else {
			 alert("There is some problem with the dates. Please check them");
		 }
	 
		 document.getElementById("dias").value = 0;
		 document.getElementById("precio").value = 0;
	} else {
		 document.getElementById("dias").value = Math.ceil((fecha_2.getTime()-fecha_1.getTime())/(mseg))+1;
		 var monto=parseFloat(document.getElementById("dias").value) * 2.5;
		 monto= monto.toFixed(2);
		 document.getElementById("precio").value = monto;
	}

} // del if (m1 != m2)

} // de la funcion calcula_save()

function dias2() {
  
  
  if (conexion2.readyState == 4)
  {
    
	var xml = conexion2.responseXML;
	var v_1=xml.getElementsByTagName('d');
	var n_dias =parseInt( v_1[0].childNodes[0].nodeValue);  // cantidad de dias
	
	if (isNaN(n_dias) || n_dias<0 || n_dias=="X") {
	 
		 if (document.getElementById("idioma").value=="e") { 
			 alert("Hay algún problema con la fechas. Favor chequearlas");
		 } else {
			 alert("There is some problem with the dates. Please check them");
		 }
		 
		 document.getElementById("dias").value = 0;
		 document.getElementById("precio").value = 0;
	
	
	} else {
		 //document.getElementById("dias").value = Math.ceil((fecha_2.getTime()-fecha_1.getTime())/(mseg))+1;
		 document.getElementById("dias").value=n_dias;
		 var monto=n_dias * 2.5;
		 monto= monto.toFixed(2);
		 document.getElementById("precio").value = monto;
	}
	
		
  }  else  {
  // nada
  }


} // de la funcion dias2


function display() {

var ancho=parseInt(window.innerWidth);
//var ancho2=parseInt(screen.innerWidth);
//var ancholayer6=parseInt(document.getElementById("Layer6").style.width);
var iz6a=parseFloat((ancho - 820) / 2);
var iz6=parseInt(iz6a,10);

// margen izq del formulario y de las faqs
leftmsg=parseFloat((ancho - 300) / 2)+"px";
leftfaq=parseFloat((ancho - 700) / 2)+"px";
//var ca=document.getElementById("Layer1").width;
//alert (ca);
//alert(ancho);


 switch (ancho) {

	  case 800:
	
	  var iz1=8;
	  //var iz2="259";
	  //var iz3="406";
	  //var iz4="554";
	  
	  break;
	 
	 case 1024:
	 var iz1=105;
	 
	 break;
	  
	  
	  case 1152:
	
	  var iz1=249;
	  //var iz2="372";
	  //var iz3="585";
	  //var iz4="798";
	  
	 break;
	 
	 case 1280:
		
	  var iz1=257;
	  //var iz2="413";
	  //var iz3="650";
	  //var iz4="886";
		  
	  break;
	
	
	 case 1366:
	  var iz1= 273;
	
	 break;
	
	default:
	 var iz1= Math.abs((ancho - 812) / 2);
	
	break;
	
	
	
	} // del switch

ns=(document.layers); 
//alert(ancho2);
var m1=iz1;
var m2=parseInt(m1 + 210);
var m3=parseInt(m2 + 201);
var m4=parseInt(m3 + 201);

var iz1=m1+"px";
var iz2=m2+"px";
var iz3=m3+"px";
var iz4=m4+"px";

//var iz6=iz6+"px"; 

if (ns) {
//if (navigator.appName != "Microsoft Internet Explorer") {
	
	
	document.getElementById("Layer1").style.left=m1;
	document.getElementById("Layer2").style.left=m2;
	document.getElementById("Layer3").style.left=m3;
	document.getElementById("Layer4").style.left=m4;
    document.getElementById("Layer1").style.top="164px";
	document.getElementById("Layer2").style.top="164px";
	document.getElementById("Layer3").style.top="164px";
	document.getElementById("Layer4").style.top="164px";
	//document.getElementById("Layer5").style.left=m1;

} else {

   document.all.Layer1.style.left=m1;
   document.all.Layer2.style.left=m2;
   document.all.Layer3.style.left=m3;
   document.all.Layer4.style.left=m4;
   document.all.Layer1.style.top="164px";
   document.all.Layer2.style.top="164px";
   document.all.Layer3.style.top="164px";
   document.all.Layer4.style.top="164px";
   //document.all.Layer5.style.left=m1;

}
	
} // de la funcion display


//***************************************
//Funciones comunes a todos los problemas
//***************************************
function addEvent(elemento,nomevento,funcion,captura)
{
  if (elemento.attachEvent)
  {
    elemento.attachEvent('on'+nomevento,funcion);
    return true;
  }
  else  
    if (elemento.addEventListener)
    {
      elemento.addEventListener(nomevento,funcion,captura);
      return true;
    }
    else
      return false;
}

function crearXMLHttpRequest() 
{
  var xmlHttp=null;
  if (window.ActiveXObject) 
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  else 
    if (window.XMLHttpRequest) 
      xmlHttp = new XMLHttpRequest();
  return xmlHttp;
}





