document.write('<link rel="stylesheet" type="text/css" media="screen" href="inscripcionf.css" />');

function Formatear(Idioma) {
if (!DOM) return;
var Etiquetas = document.getElementsByTagName('LABEL');
for (var i=0; i<Etiquetas.length; i++) {
	if (Etiquetas[i].previousSibling) {
		if (Etiquetas[i].previousSibling.type=='radio'||Etiquetas[i].previousSibling.type=='checkbox') {
			Etiquetas[i].style.fontWeight = 'normal';
			Etiquetas[i].style.marginRight = '1em';
			Etiquetas[i].previousSibling['onclick']=new Function('Accionar(this);');
			}
		}
	}

//document.getElementById('dNivel').style.display='none';
//document.getElementById('Duracion').style.display='none';
//document.getElementById('LeccionesSemana').style.display='none';

//Mensajes = new Array('Pulsa aqu'+String.fromCharCode(237), ' si quieres alojarte con una familia espa' + String.fromCharCode(241) + 'ola durante el curso.', 'Pulsa aqu' + String.fromCharCode(237), ' si NO quieres alojarte con una familia espa' + String.fromCharCode(241) + 'ola durante el curso.', 'Pulsa aqu' + String.fromCharCode(237), ' si quieres solicitar la recogida en el aeropuerto.', 'Pulsa aqu' + String.fromCharCode(237), ' si NO quieres solicitar la recogida en el aeropuerto.', 'Click here', ' if you want to lodge with a spanish family during your course.', 'Click here', ' if you DON' + String.fromCharCode(39) + 'T want to lodge with a spanish family.', 'Click here', ' if you want to request the pick up in airport.', 'Click here', ' if you DON' + String.fromCharCode(39) + 'T want to request the pick up in airport.', '$B%3!<%94|4VCf!"%9%Z%$%s?M2HDm$X$N%[!<%`%9%F%$$r4uK>$5$l$kJ}$O(B', '$B$3$3$r%/%j%C%/(B', '$B%[!<%`%9%F%$$r4uK>$7$J$$J}$O(B', '$B$3$3$r%/%j%C%/(B', '$B%P%i%O%96u9A$^$G$N=P7^$($r4uK>$NJ}$O(B', '$B$3$3$r%/%j%C%/(B', '$B6u9A$X$N=P7^$($r4uK>$7$J$$J}$O(B', '$B$3$3$r%/%j%C%/(B', 'Clicca qui',  ' se vuoi trovare sistemazione in famiglia spagnola durante il corso.','Clicca qui', ' se NON vuoi trovare sistemazione in famiglia spagnola durante il corso.','Clicca qui', ' se vuoi richiedere il transfer dall\'aeroporto.','Clicca qui', ' se NON vuoi richiedere il transfer dall\'aeroporto.', 'Click here', ' if you want to lodge with a spanish family during your course.', 'Click here', ' if you DON' + String.fromCharCode(39) + 'T want to lodge with a spanish family.', 'Click here', ' if you want to request the pick up in airport.', 'Click here', ' if you DON' + String.fromCharCode(39) + 'T want to request the pick up in airport.');
//Mensajes = new Array('Pulsa aqu'+String.fromCharCode(237), ' si quieres alojarte con una familia espa' + String.fromCharCode(241) + 'ola durante el curso.', 'Pulsa aqu' + String.fromCharCode(237), ' si NO quieres alojarte con una familia espa' + String.fromCharCode(241) + 'ola durante el curso.', 'Pulsa aqu' + String.fromCharCode(237), ' si quieres solicitar la recogida en el aeropuerto.', 'Pulsa aqu' + String.fromCharCode(237), ' si NO quieres solicitar la recogida en el aeropuerto.', 'Click here', ' if you want to lodge with a spanish family during your course.', 'Click here', ' if you DON' + String.fromCharCode(39) + 'T want to lodge with a spanish family.', 'Click here', ' if you want to request the pick up in airport.', 'Click here', ' if you DON' + String.fromCharCode(39) + 'T want to request the pick up in airport.', '$B%3!<%94|4VCf!"%9%Z%$%s?M2HDm$X$N%[!<%`%9%F%$$r4uK>$5$l$kJ}$O(B', '$B$3$3$r%/%j%C%/(B', '$B%[!<%`%9%F%$$r4uK>$7$J$$J}$O(B', '$B$3$3$r%/%j%C%/(B', '$B%P%i%O%96u9A$^$G$N=P7^$($r4uK>$NJ}$O(B', '$B$3$3$r%/%j%C%/(B', '$B6u9A$X$N=P7^$($r4uK>$7$J$$J}$O(B', '$B$3$3$r%/%j%C%/(B', 'Clicca qui',  ' se vuoi trovare sistemazione in famiglia spagnola durante il corso.','Clicca qui', ' se NON vuoi trovare sistemazione in famiglia spagnola durante il corso.','Clicca qui', ' se vuoi richiedere il transfer dall\'aeroporto.','Clicca qui', ' se NON vuoi richiedere il transfer dall\'aeroporto.', '点击这里', '如果你想在课程期间在西班牙家庭寄宿。', '点击这里', '如果您不想在课程期间在西班牙家庭寄宿。', '点击这里', '如果您想预约机场接机服务。', '点击这里', '如果您不想预约机场接机服务。');

Atributos = new Array(0,-1,1,-1,0,-1,1,-1,0,-1,1,-1,0,-1,1,-1,-1,0,-1,1,-1,0,-1,1,0,-1,1,-1,0,-1,1,-1,0,-1,1,-1,0,-1,1,-1); 
Funciones = new Array('Mostrar(this.parentNode.nextSibling)', 'Ocultar(this.parentNode.parentNode)');
Textos = new Array();
Parrafos = new Array();
Enlaces = new Array();
var j = 0;
var k = 0;
for (var i=0; i<8; i++) {
	if (i%2==0) {
		Parrafos[k] = document.createElement('p');
		Parrafos[k].className='pMostrar';
		if (k%2==0)Parrafos[k].style.display='none';
		}
	Textos[i] = document.createTextNode(Mensajes[i+8*Idioma]);
	if (Atributos[i+8*Idioma]!=-1) {
		Enlaces[j] = document.createElement('a');
		Enlaces[j].appendChild(Textos[i]);
		Enlaces[j]['onclick']=new Function(Funciones[Atributos[i+8*Idioma]]+';return false;');
		Enlaces[j].href='#';
		Parrafos[k].appendChild(Enlaces[j]);
		j++;
		}
	else {
		Parrafos[k].appendChild(Textos[i]);
		}
	if (i%2==1) k++;
	}
document.getElementById('dAlojamiento').parentNode.insertBefore(Parrafos[0],document.getElementById('dAlojamiento'));
document.getElementById('dAlojamiento').appendChild(Parrafos[1]);
document.getElementById('dAlojamiento').style.display='none';
document.getElementById('Recogida').parentNode.insertBefore(Parrafos[2],document.getElementById('Recogida'));
document.getElementById('Recogida').appendChild(Parrafos[3]);
document.getElementById('Recogida').style.display='none';
document.getElementById('h3Alojamiento').style.display='none';
document.getElementById('h3Recogida').style.display='none';

if (document.getElementById('hCurso')) {
	Accionar(document.getElementById('hCurso'))
	}
if (document.getElementById('hAlojamiento')) {
	if (document.getElementById('hAlojamiento').value !='') {
		document.getElementById('h3Alojamiento').style.display='block';
		Mostrar(document.getElementById('dAlojamiento'))
		}
	}
if (document.getElementById('FechaVuelo').value !='') {
	document.getElementById('h3Recogida').style.display='block';
	Mostrar(document.getElementById('Recogida'))
	}

if (document.getElementById('RecogidaEnEspera').checked =='checked') {
	document.getElementById('h3Recogida').style.display='block';
	Mostrar(document.getElementById('Recogida'))
	}
}


function Accionar(Elemento) {
if (Elemento.name=='Curso'||Elemento.name=='hCurso') var Valor = Elemento.value;
if (!Valor) return;

EliminarOpciones(document.getElementById('Lecciones'));
if (Valor=='DELEonLine'||Valor=='ELEvirtual'||Valor=='Verano'||Valor=='Granada'||Valor=='Verano07') {
	document.getElementById('LeccionesSemana').style.display='none';
	}
else {
	AgregarOpcion (document.getElementById('Lecciones'),'','')
	if (Valor=='Intensivo') AgregarOpcion (document.getElementById('Lecciones'),'20',20);
	if (Valor!='Alterno') AgregarOpcion (document.getElementById('Lecciones'),'15',15);
	if (Valor!='Alterno') AgregarOpcion (document.getElementById('Lecciones'),'10',10);
	if (Valor=='Alterno') AgregarOpcion (document.getElementById('Lecciones'),'6',6);
	if (Valor!='Alterno'&&Valor!='Intensivo') AgregarOpcion (document.getElementById('Lecciones'),'5',5);
	if (Valor=='Especial'||Valor=='Individual'||Valor=='Alterno') AgregarOpcion (document.getElementById('Lecciones'),'4',4);
	if (Valor=='Especial'||Valor=='Individual') AgregarOpcion (document.getElementById('Lecciones'),'3',3);
	if (Valor=='Especial'||Valor=='Individual'||Valor=='Alterno') AgregarOpcion (document.getElementById('Lecciones'),'2',2);
	if (Valor=='Especial'||Valor=='Individual') AgregarOpcion (document.getElementById('Lecciones'),'1',1);
	document.getElementById('LeccionesSemana').style.display='block';
	}
EliminarOpciones(document.getElementById('SemanasCurso'));
EliminarOpciones(document.getElementById('SemanasAlojamiento'));
if (Valor=='DELEonLine'||Valor=='ELEvirtual'||Valor=='Granada'||Valor=='Verano07') {
	if (Valor=='Verano07') {
		for (var i=2; i>0; i--) {
			AgregarOpcion (document.getElementById('SemanasCurso'),i,i);
			}	
		}
	document.getElementById('SemanasCurso').style.display=(Valor=='Verano07')?'inline':'none';
	document.getElementById('SemanasCurso').previousSibling.style.display=(Valor=='Verano07')?'inline':'none';
	document.getElementById('Duracion').style.display=(Valor=='Granada'||Valor=='Verano07')?'inline':'none';
	document.getElementById('dAlojamiento').style.display='none';
	document.getElementById('Recogida').style.display='none';
	document.getElementById('ELEBasico').nextSibling.style.display=(Valor=='ELEvirtual')?'inline':'none';
	document.getElementById('ELEBasico').style.display=(Valor=='ELEvirtual')?'inline':'none';
	document.getElementById('ELEIntermedio').nextSibling.style.display=(Valor=='ELEvirtual')?'inline':'none';
	document.getElementById('ELEIntermedio').style.display=(Valor=='ELEvirtual')?'inline':'none';
	document.getElementById('ELEAvanzado').nextSibling.style.display=(Valor=='ELEvirtual')?'inline':'none';
	document.getElementById('ELEAvanzado').style.display=(Valor=='ELEvirtual')?'inline':'none';
	document.getElementById('DELEElemental').nextSibling.style.display='none';
	document.getElementById('DELEElemental').style.display='none';
	document.getElementById('DELEIntermedio').nextSibling.style.display=(Valor=='DELEonLine')?'inline':'none';
	document.getElementById('DELEIntermedio').style.display=(Valor=='DELEonLine')?'inline':'none';
	document.getElementById('DELESuperior').nextSibling.style.display=(Valor=='DELEonLine')?'inline':'none';
	document.getElementById('DELESuperior').style.display=(Valor=='DELEonLine')?'inline':'none';
	document.getElementById('dNivel').style.display=(Valor=='DELEonLine'||Valor=='ELEvirtual')?'block':'none';
	document.getElementById('dAlojamiento').previousSibling.style.display='none';
	document.getElementById('dAlojamiento').previousSibling.previousSibling.style.display='none';
	document.getElementById('Recogida').previousSibling.style.display=(Valor=='Granada'||Valor=='Verano07')?'block':'none';
	document.getElementById('Recogida').previousSibling.previousSibling.style.display=(Valor=='Granada'||Valor=='Verano07')?'block':'none';
	}
else {
	AgregarOpcion (document.getElementById('SemanasCurso'),'','');
	AgregarOpcion (document.getElementById('SemanasAlojamiento'),'','');
	for (var i=12; i>3; i--) {
		AgregarOpcion (document.getElementById('SemanasCurso'),i,i);
		AgregarOpcion (document.getElementById('SemanasAlojamiento'),i,i);
		}
	if (!(Valor=='Alterno'||Valor=='DELE'||Valor=='Estandar')) {
		for (var i=3; i>1; i--) {
			AgregarOpcion (document.getElementById('SemanasCurso'),i,i);
			AgregarOpcion (document.getElementById('SemanasAlojamiento'),i,i);
			}
		if (Valor!='Verano') {
			AgregarOpcion (document.getElementById('SemanasCurso'),1,1);
			AgregarOpcion (document.getElementById('SemanasAlojamiento'),1,1);
			}
		}
	document.getElementById('ELEBasico').nextSibling.style.display='none';
	document.getElementById('ELEBasico').style.display='none';
	document.getElementById('ELEIntermedio').nextSibling.style.display='none';
	document.getElementById('ELEIntermedio').style.display='none';
	document.getElementById('ELEAvanzado').nextSibling.style.display='none';
	document.getElementById('ELEAvanzado').style.display='none';
	document.getElementById('DELEElemental').nextSibling.style.display=(Valor=='DELE')?'inline':'none';
	document.getElementById('DELEElemental').style.display=(Valor=='DELE')?'inline':'none';
	document.getElementById('DELEIntermedio').nextSibling.style.display=(Valor=='DELE')?'inline':'none';
	document.getElementById('DELEIntermedio').style.display=(Valor=='DELE')?'inline':'none';
	document.getElementById('DELESuperior').nextSibling.style.display=(Valor=='DELE')?'inline':'none';
	document.getElementById('DELESuperior').style.display=(Valor=='DELE')?'inline':'none';
	document.getElementById('SemanasCurso').style.display='inline';
	document.getElementById('SemanasCurso').previousSibling.style.display='inline';
	document.getElementById('Duracion').style.display='block';
	document.getElementById('dNivel').style.display=(Valor=='DELE')?'block':'none';
	document.getElementById('dAlojamiento').previousSibling.style.display='block';
	document.getElementById('dAlojamiento').previousSibling.previousSibling.style.display='block';
	document.getElementById('Recogida').previousSibling.style.display='block';
	document.getElementById('Recogida').previousSibling.previousSibling.style.display='block';
	}

if (document.getElementById('hLecciones')) document.getElementById('Lecciones').value=document.getElementById('hLecciones').value;
if (document.getElementById('hSemanasCurso')) document.getElementById('SemanasCurso').value=document.getElementById('hSemanasCurso').value;
if (document.getElementById('hSemanasAlojamiento')) document.getElementById('SemanasAlojamiento').value=document.getElementById('hSemanasAlojamiento').value;
//document.getElementById('ELEBasico').checked = false;
//document.getElementById('ELEIntermedio').checked = false;
//document.getElementById('ELEAvanzado').checked = false;
//document.getElementById('DELEIntermedio').checked = false;
//document.getElementById('DELESuperior').checked = false;
}

function Mostrar (Elemento) {
Elemento.style.display='block';
Elemento.previousSibling.style.display='none';
}

function Ocultar (Elemento) {
Elemento.style.display='none';
Elemento.previousSibling.style.display='block';
}

function AgregarOpcion (Elemento,Valor,Texto) {
var elmText=document.createTextNode(Texto);
var elmX=document.createElement('option');
elmX.appendChild(elmText);
elmX.setAttribute('value',Valor);
Elemento.appendChild(elmX);
}

function EliminarOpciones (Elemento) {
while (Elemento.firstChild) {
	Elemento.removeChild(Elemento.firstChild);
	}
}