
function conSinAlojamiento(valor){if(valor=="Con Alojamiento"){document.getElementById("tr_inicio_fin_acc").style.display="table-row";}else{document.getElementById("tr_inicio_fin_acc").style.display="none";}}
function mensaje(idioma)
{switch(idioma)
{case'spanish':alert('Por favor, este campo es obligatorio');break;case'english':alert('please, this information is required');break;case'french':alert('s\u2019il vous pla\u00EEt, cet champ est obligatoire');break;case'german':alert('wenden Sie sich bitte in diesem Bereich erforderlich ist');break;default:alert('please, this information is required');break;}}
function validar(idioma){if(document.form1.alojamiento.options[document.form1.alojamiento.selectedIndex].value=="")
{document.form1.alojamiento.focus();mensaje(idioma);return false;}
if(document.form1.CiudadSelect.options[document.form1.CiudadSelect.selectedIndex].value=="")
{document.form1.CiudadSelect.focus();mensaje(idioma);return false;}
if(document.form1.Nombre.value=="")
{document.form1.Nombre.focus();mensaje(idioma);return false;}
if(document.form1.Apellidos.value=="")
{document.form1.Apellidos.focus();mensaje(idioma);return false;}
if(document.form1.email.value=="")
{document.form1.email.focus();mensaje(idioma);return false;}
if(paisOri.getComboText()==""){mensaje(idioma);paisOri.DOMelem_input.focus();return false;}
if(document.form1.Sexo.options[document.form1.Sexo.selectedIndex].value=="")
{document.form1.Sexo.focus();mensaje(idioma);return false;}
if(document.form1.Nacimiento.value==""||document.form1.Nacimiento.value=="dd/mm/yy")
{document.form1.Nacimiento.focus();mensaje(idioma);return false;}
if(document.getElementById("alojamiento").value=="Con Alojamiento"){var fecha_inicio=document.form1.fecha_inicio.value;var fecha_fin=document.form1.fecha_fin.value;if(fecha_inicio==""){cargaCalendario(document.getElementById("fecha_inicio"))
mensaje(idioma);return false;}
if(fecha_fin==""){cargaCalendario(document.getElementById("fecha_fin"))
mensaje(idioma);return false;}
if(fechaJs(fecha_fin)<=fechaJs(fecha_inicio)){if(idioma=="french"){alert("la date de début doit être antérieure à la fin");}else{alert("La fecha de Fin del alojamiento ha ser POSTERIOR a la fecha de Inicio del alojamiento");}
cargaCalendario(document.getElementById("fecha_fin"))
return false;}}
var fecha_inicio_curso=document.form1.fecha_inicio_curso.value;var fecha_fin_curso=document.form1.fecha_fin_curso.value;if(fecha_inicio_curso==""){cargaCalendario(document.getElementById("fecha_inicio_curso"))
mensaje(idioma);return false;}
if(fecha_fin_curso==""){cargaCalendario(document.getElementById("fecha_fin_curso"))
mensaje(idioma);return false;}
if(fechaJs(fecha_fin_curso)<=fechaJs(fecha_inicio_curso)){if(idioma=="french"){alert("La date d\'arriv\u00E9e doit avoir lieu avant la date de d\u00E9part")}else{alert("La fecha de Fin del alojamiento ha ser POSTERIOR a la fecha de Inicio del alojamiento")}
cargaCalendario(document.getElementById("fecha_fin_curso"))
return false;}
var nivel=getCheckedValue(document.forms['form1'].elements['nivel']);if(nivel==""){document.getElementById("tabla_niveles").style.backgroundColor="#CCCCCC";alert("falta nivel");return false;}
form1.submit();}
function fechaJs(fecha){var array_fecha=fecha.split("/");var dia=(array_fecha[0])-1;var mes=(array_fecha[1])-1;var anio=(array_fecha[2]);var nuevaFecha=new Date(anio,mes,dia);return nuevaFecha;}
function getCheckedValue(radioObj){if(!radioObj)
return"";var radioLength=radioObj.length;if(radioLength==undefined)
if(radioObj.checked)
return radioObj.value;else
return"";for(var i=0;i<radioLength;i++){if(radioObj[i].checked){return radioObj[i].value;}}
return"";}
function validaEmail(email,objeto){var filter=/[A-Za-z0-9_.-]+@[A-Za-z0-9_.-]+\.[A-Za-z0-9_-]+/;if(filter.test(email)==false){alert("Incorrect email");objeto.value="";objeto.focus();return false;}}
function cargaTexto(idioma,desde){if(idioma=="english"){var cadena="";cadena+="<div id='texto_1_cabecera'>";if(desde=="index"){cadena+="<img src='im_comunes/texto_cabecera.jpg' width='780' height='36' border='0'>";}else{cadena+="<img src='../im_comunes/texto_cabecera.jpg' width='780' height='36' border='0'>";}
cadena+="</div>";cadena+="<div class='titulo_texto1'>";cadena+="<h1 class='titulo_texto1'>The best Spanish is learned in SPAIN!</h1>";cadena+="</div>";cadena+="<div class='pal_texto1'>";cadena+="ALUNI.net, in colaboration with <a href='http://www.spanishcoursemadrid.com' class='enlace' target='_blank'>Paraninfo</a> (<a href='http://centrosasociados.cervantes.es/Inicio2.htm' class='enlace'  target='_blank'>Accredited Center of the Instituto Cervantes</a>) in <strong>Madrid</strong>, and  <a href='http://www.albereda.es/inicio.html' class='enlace' target='_blank'>Albereda</a> in <strong>Valencia</strong>, offers, at great prices, 40 hour/<u><strong>2 weeks</strong></u> Spanish courses in Madrid with housing (optional):";cadena+="</div>";if(desde=="index"){cadena+="<div style='text-align:center; margin-bottom:0px;'><img src='im_comunes/ing_precio.jpg' width='700' height='158' border='0'></div>";}else{cadena+="<div style='text-align:center; margin-bottom:0px;'><img src='../im_comunes/ing_precio.jpg' width='700' height='158' border='0'></div>";}
cadena+="<div class='rojo_texto1' style='float:left'>";cadena+="* Enrollment fee is only required for the first course<br>";cadena+="* This Course-Housing price is valid if the course take place between <strong>March 1st - September 1st</strong> <br>";cadena+="* Enrollment fee is not required for ALUNI.net students (who stay 3 months or more, in the past or in the future)";cadena+="</div>";}
if(idioma=="french"){var cadena="";cadena+="<div id='texto_1_cabecera'>";if(desde=="index"){cadena+="<img border='0' src='im_comunes/texto_cabecera.jpg'>";}else{cadena+="<img border='0' src='../im_comunes/texto_cabecera.jpg'>";}
cadena+="</div>";cadena+="<div class='titulo_texto1'>";cadena+="LE PLUS BEL ESPAGNOL S'APPREND À MADRID ET VALENCE!";cadena+="</div>";cadena+="<div class='pal_texto1'>";cadena+="ALUNI.net organise en partenariat avec  <a href='http://www.spanishcoursemadrid.com/espagnol' class='enlace' target='_blank'>L\u00B4\u00E9cole Paraninfo</a> (<a href='http://centrosasociados.cervantes.es/Inicio2.htm' class='enlace'  target='_blank'>Centre agr\u00E9\u00E9 par l\'Institut Cervantes</a>) \u00E0 <strong>Madrid</strong>, et avec   <a href='http://www.albereda.es/inicio.html' class='enlace' target='_blank'>L\u00B4\u00E9cole Albereda</a> \u00E0 <strong>Valencia</strong>, et pendant toute l\u00B4ann\u00E9e, des cours intensifs de 40 heures de cours en 2 semaines avec logement en activit\u00E9s (en option)"
cadena+="</div>";if(desde=="index"){cadena+="<div style='text-align:center; margin-bottom:0px;'><img src='im_comunes/fr_precio.jpg'  border='0'  title='Spanish courses in Madrid, Sevilla and Valencia'></div>";}else{cadena+="<div style='text-align:center; margin-bottom:0px;'><img src='../im_comunes/fr_precio.jpg'  border='0'  title='Spanish courses in Madrid, Sevilla and Valencia'></div>";}
cadena+="<div class='rojo_texto1' style='float:left'>";cadena+="* L\u2019inscription seule se paye au premier cours<br>";cadena+="* l\u2019offre sp\u00E9ciale : prix du cours + logement  (390 \u20AC) est valable si les cours ont lieu entre le 1er mars et le 1er septembre <br>";cadena+="* L\u2019inscription est gratuite pour les \u00E9tudiants de Aluni (engagement de 3 mois minimum)";cadena+="</div>";}
if(idioma=="spanish"){var cadena="";cadena+="<div id='texto_1_cabecera'>";if(desde=="index"){cadena+="<img border='0' src='im_comunes/texto_cabecera.jpg'>";}else{cadena+="<img border='0' src='../im_comunes/texto_cabecera.jpg'>";}
cadena+="</div>";cadena+="<div class='titulo_texto1'>";cadena+="\u00A1El  buen castellano se aprende en Madrid y Valencia!";cadena+="</div>";cadena+="<div class='pal_texto1'>";cadena+="ALUNI.net, en colaboraci\u00F3n con  <a href='http://www.spanishcoursemadrid.com/espanol' class='enlace' target='_blank'>Paraninfo</a> (<a href='http://centrosasociados.cervantes.es/Inicio.htm' class='enlace'  target='_blank'>Centro acreditado del Instituto Cervantes</a>) en <strong>Madrid</strong>, y con  <a href='http://www.albereda.es/inicio.html' class='enlace' target='_blank'>Albereda</a> en <strong>Valencia</strong>, ofrece aloajamiento y cursos de Espa\u00F1ol, de 40 horas de clases (2 semanas), en Madrid y Valencia";cadena+="</div>";if(desde=="index"){cadena+="<div style='text-align:center; margin-bottom:0px;'><img src='im_comunes/esp_precio.jpg'  border='0'  title='Spanish courses in Madrid, Sevilla and Valencia'></div>";}else{cadena+="<div style='text-align:center; margin-bottom:0px;'><img src='../im_comunes/esp_precio.jpg'  border='0'  title='Spanish courses in Madrid, Sevilla and Valencia'></div>";}
cadena+="<div class='rojo_texto1' style='float:left'>";cadena+="* La matr\u00EDcula solamente se paga en el primer curso<br>";cadena+="* Oferta de alojamiento v\u00E1lida para todos los cursos realizados <strong>entre el 1 de marzo y el 1 de septiembre</strong><br>";cadena+="* La matr\u00EDcula es gratuita para los estudiantes que se alojen en Aluni durante tres meses o m\u00E1s";cadena+="</div>";}
document.getElementById('texto1').innerHTML=cadena;ocultaCargandoTodo()}
function ocultaCargandoTodo(){if(document.getElementById('cargandoTodo')){document.getElementById('cargandoTodo').style.display='none';}}

if(navigator.userAgent.indexOf("MSIE")>=0)navegador=0;else navegador=1;function muestraCapaMensaje(mensaje){var xActual,yActual;if(navegador==0)
{xActual=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;yActual=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;}
if(navegador==1)
{xActual=event.clientX+window.scrollX;yActual=event.clientY+window.scrollY;}
if(mensaje=="niveles"){mensaje=niveles();}
document.getElementById('capaMensaje').style.left=xActual+10+"px";document.getElementById('capaMensaje').style.top=yActual+"px";document.getElementById('capaMensaje').innerHTML=mensaje;document.getElementById('capaMensaje').style.display="block";}
function ocultaCapaMensaje(){document.getElementById('capaMensaje').style.display="none";document.getElementById('capaMensaje').innerHTML="";}
function niveles(){var niveles="";niveles+="<table border='0' align='center' cellpadding='2' cellspacing='1'>";niveles+="<tr align='left'  bgcolor='#E87A1B' >";niveles+="<td width='70' align='center'  >Level:</td>";niveles+="<td width='290'>Programme:</td>";niveles+="</tr>";niveles+="<tr bgcolor='#FFFF99' >";niveles+="<td width='70' align='center' bgcolor='#FFD7AE' ><strong>A1</strong></td>";niveles+="<td width='290' bgcolor='#FFD7AE'>Phonetic exercises I: vocabulary, introduction to expressions. Introduction to grammatical knowledge.</td>";niveles+="</tr>";niveles+="<tr bgcolor='#FFCC66' >";niveles+="<td width='70' align='center' bgcolor='#FFCC99' ><strong>A2</strong></td>";niveles+="<td width='290' bgcolor='#FFCC99'>Phonetic Exercises II: Understanding listening, perfecting pronunciation, structural exercises II and dialogues. More grammatical knowledge.</td>";niveles+="</tr>";niveles+="<tr bgcolor='#FFFF99' >";niveles+="<td width='70' align='center' bgcolor='#FFDD95' ><strong>B1</strong></td>";niveles+="<td width='290' bgcolor='#FFDD95'>New structures, exercises top apply the structures, the Basic mechanism of the language and dramatizations.</td>";niveles+="</tr>";niveles+="<tr bgcolor='#FFCC66' >";niveles+="<td width='70' align='center' bgcolor='#FFD782' ><strong>B2</strong></td>";niveles+="<td width='290' bgcolor='#FFD782'>More grammatical structures, listening exercises, expositions and production of simple written texts.</td>";niveles+="</tr>";niveles+="<tr bgcolor='#FFFF99' >";niveles+="<td width='70' align='center' bgcolor='#FFD06F' ><strong>C1</strong></td>";niveles+="<td width='290' bgcolor='#FFD06F'>Introduction to complex structures, reading and analysis of text, expositions and debates, producing texts.</td>";niveles+="</tr>";niveles+="<tr bgcolor='#FFCC66' >";niveles+="<td width='70' height='24' align='center' bgcolor='#FFCC66' ><strong> C2</strong></td>";niveles+="<td width='290' bgcolor='#FFCC66'>Advanced studies of all aspects of the language and in-depth studying of grammar, expositions, practical writing and analyzing texts.</td>";niveles+="</tr>";niveles+="</table>";return niveles;}
var arrCon = new Array(3);
arrCon[0]="1_condicion";
arrCon[1]="2_condicion";
arrCon[2]="3_condicion";
function cambiar(Id)
{
    for (i=0;i<3;i++)
    { 
        var sel_id=arrCon[i]+"_sel";
        var no_sel_id=arrCon[i]+"_nosel";
        if(arrCon[i]==Id)
        { // mostramos
            document.getElementById(sel_id).style.display="block";
            document.getElementById(no_sel_id).style.display="none";
        }
        else
        { // ocultamos
            document.getElementById(sel_id).style.display="none";
            document.getElementById(no_sel_id).style.display="block";
        }
    } 
}
function inicializar()
{
    for (i=0;i<3;i++)
    { 
        var sel_id=arrCon[i]+"_sel";
        var no_sel_id=arrCon[i]+"_nosel";
        document.getElementById(sel_id).style.display="none";
        document.getElementById(no_sel_id).style.display="block";
    }
}
