function actualizaroriginal() {
	actualizarTodo();
}

function paso2() {
	for (var i=0; i < document.pag_est.tipoletra.length; i++){
   	if (document.pag_est.tipoletra[i].checked) {
      var rad_val = document.pag_est.tipoletra[i].value;
      }
   	}
   	if(document.getElementById('eoriginal').value == "Escribe aquí lo que quieras convertir.") {
   		document.location.href = "/?error=vacio";
   	} else {
	document.location.href = "/paso2/?texto=" + document.getElementById('eoriginal').value + "&tipoletra=" + rad_val;
   	}
}

function cambioPagEst(destino) {
var textoatraspasar = document.getElementById('eoriginal').value;
	if(textoatraspasar == "Escribe aquí lo que quieras convertir.") {
		textoatraspasar = "";
	} 
	
	if(destino > 1) {
		document.location.href = "/pag" + destino + "/?texto=" + textoatraspasar;
	} else { 
		document.location.href = "/?texto=" + textoatraspasar;
	}
}

function selecescribe() {
	document.getElementById('eoriginal').className='inputescribe_con';
	if(document.getElementById('eoriginal').value == 'Escribe aquí lo que quieras convertir.') {
		document.getElementById('eoriginal').value='';	
	}
}

function deselecescribe() {
	if(document.getElementById('eoriginal').value == '') {
		document.getElementById('eoriginal').value='Escribe aquí lo que quieras convertir.';	
		document.getElementById('eoriginal').className='inputescribe_sin';
	}
}

function muestraayuda() {
	document.getElementById('escribe').style.height='70px';
	document.getElementById('ayuda_escribe').style.display='block';
	document.getElementById('ayuda_escribe').style.behavior='url(pie.htc)';
	document.getElementById('ayuda_paso2').style.display='block';
	document.getElementById('ayuda_paso2').style.behavior='url(pie.htc)';
	document.getElementById('eoriginal').focus();
}

function ocultaayuda() {
	document.getElementById('escribe').style.height='40px';
	document.getElementById('ayuda_escribe').style.display='none';
	document.getElementById('ayuda_escribe').style.behavior='none';
	document.getElementById('ayuda_paso2').style.display='none';
	document.getElementById('ayuda_paso2').style.behavior='none';
}

function muestrahelp1() { // Mostrar ayuda, paso 1
	document.getElementById('pasohelp1').style.display='block';
	document.getElementById('pasohelp1').style.behavior='url(pie.htc)';
	document.getElementById('pasohelp_min').style.display='none';
	document.getElementById('pasohelp_min').style.behavior='none';
	document.getElementById('pasohelp2').style.display='none';
	document.getElementById('pasohelp2').style.behavior='none';
	document.getElementById('pasohelp3').style.display='none';
	document.getElementById('pasohelp3').style.behavior='none';
	document.getElementById('pasohelp4').style.display='none';
	document.getElementById('pasohelp4').style.behavior='none';
}

function muestrahelp2() { // Mostrar ayuda, paso 2
	document.getElementById('pasohelp2').style.display='block';
	document.getElementById('pasohelp2').style.behavior='url(pie.htc)';
	document.getElementById('pasohelp_min').style.display='none';
	document.getElementById('pasohelp_min').style.behavior='none';
	document.getElementById('pasohelp1').style.display='none';
	document.getElementById('pasohelp1').style.behavior='none';
	document.getElementById('pasohelp3').style.display='none';
	document.getElementById('pasohelp3').style.behavior='none';
	document.getElementById('pasohelp4').style.display='none';
	document.getElementById('pasohelp4').style.behavior='none';
}

function muestrahelp3() { // Mostrar ayuda, paso 3
	document.getElementById('pasohelp3').style.display='block';
	document.getElementById('pasohelp3').style.behavior='url(pie.htc)';
	document.getElementById('pasohelp_min').style.display='none';
	document.getElementById('pasohelp_min').style.behavior='none';
	document.getElementById('pasohelp1').style.display='none';
	document.getElementById('pasohelp1').style.behavior='none';
	document.getElementById('pasohelp2').style.display='none';
	document.getElementById('pasohelp2').style.behavior='none';
	document.getElementById('pasohelp4').style.display='none';
	document.getElementById('pasohelp4').style.behavior='none';
}

function muestrahelp4() { // Mostrar ayuda, paso 4
	document.getElementById('pasohelp4').style.display='block';
	document.getElementById('pasohelp4').style.behavior='url(pie.htc)';
	document.getElementById('pasohelp_min').style.display='none';
	document.getElementById('pasohelp_min').style.behavior='none';
	document.getElementById('pasohelp1').style.display='none';
	document.getElementById('pasohelp1').style.behavior='none';
	document.getElementById('pasohelp3').style.display='none';
	document.getElementById('pasohelp3').style.behavior='none';
	document.getElementById('pasohelp2').style.display='none';
	document.getElementById('pasohelp2').style.behavior='none';
}

function muestrahelp_min() { // Ocultar ayuda
	document.getElementById('pasohelp_min').style.display='block';
	document.getElementById('pasohelp_min').style.behavior='url(pie.htc)';
	document.getElementById('pasohelp4').style.display='none';
	document.getElementById('pasohelp4').style.behavior='none';
	document.getElementById('pasohelp1').style.display='none';
	document.getElementById('pasohelp1').style.behavior='none';
	document.getElementById('pasohelp3').style.display='none';
	document.getElementById('pasohelp3').style.behavior='none';
	document.getElementById('pasohelp2').style.display='none';
	document.getElementById('pasohelp2').style.behavior='none';
}
