//////////////////////////////////////////////////////
function irToSugerenciasAndErrores(e) {
	reSetHash( "sugyerr" );
	var id = creaVentana('80%',aleatorio(5,15)+'%',aleatorio(5,15)+'%','70%');
	ponerTituloVentana(id, "Sugerencias y Errores");
	llamaraconsincronismo('emergenteContenido'+id, 'php/sugerenciasYerrores.php' );
}
function irToQuienesSomos(e) {
	reSetHash( "quienes" );
	llamaraconsincronismo('emergenteContenido', 'php/quienesSomos.php');
	emergenteA('');
}
function irToNuestroBlog(e) {
	reSetHash( "irablog" );
	llamaraconsincronismo('emergenteContenido', 'php/nuestroBlog.php');
	emergenteA('');
}
function irToAvisoLegal(e) {
	reSetHash( "avlegal" );
	llamaraconsincronismo('emergenteContenido', 'php/avisoLegal.php');
	emergenteA('');
}
function irToAyuda(f) {
	f =  f || "";
	if( f == "" ){
		reSetHash( "irayuda" );
		llamaraconsincronismo('emergenteContenido', 'php/ayuda/ayuda.php');
	}else if( f == "usuario" ){
		reSetHash( "irayuda-usuario" );
		llamaraconsincronismo('emergenteContenido', 'php/ayuda/ayudaUsuario.php');
	}else if( f == "administrador" ){
		reSetHash( "irayuda-administrador" );
		llamaraconsincronismo('emergenteContenido', 'php/ayuda/ayudaAdministrador.php');
	}else if( f == "desarrollador" ){
		reSetHash( "irayuda-desarrollador" );
		llamaraconsincronismo('emergenteContenido', 'php/ayuda/ayudaDesarrollador.php');
	}
	emergenteA('');
}
function irToEntidades() {
	reSetHash( "entidades" );
	llamaraconsincronismo('emergenteContenido', 'php/usuarios/entidades.php');
	emergenteA('');
}

function irToRegistro(e, h) {
	e =  e || "registrandopaso1";
	if( e == "registrocaducado" ){
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=caducado&IDIOMA=val');
	}else if( e == "registrocritico" ){
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=critico&IDIOMA=val');
	}else if( e == "registrofatal" ){
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=fatal&IDIOMA=val', "h="+h);
	}else if( e == "registrousado" ){
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=usado&IDIOMA=val', "h="+h);
	}else if( e == "registrandopaso4" ){
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=4&IDIOMA=val', "h="+h);
	}else if( e == "registrandopaso5" ){
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=completo&IDIOMA=val', "h="+h);
	}else{
		reSetHash(e);
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=1&IDIOMA=val', "subpaso="+e);
	}
	emergenteA('');
}
function irToRecuperarClave(e, h) {
	e =  e || "recuperarClave";
	if( e == "registrocaducado" ){
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=caducado');
	}else if( e == "registrocritico" ){
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=critico');
	}else{
		reSetHash(e);
		llamaraconsincronismo('emergenteContenido', 'proxy.php?x=registrar.php&paso=r', "email="+h);
	}
	emergenteA('');
}
function irToDarDeBajaCuenta(e, h) {
	e =  e || "dardebajalacuenta";
	reSetHash(e);
	llamaraconsincronismo('emergenteContenido', 'php/usuarios/borrar.php');
	emergenteA('');
}
function tab_btn(donde,event){
	var t = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	if (t == 9 ){
		id = null;
		if( donde.id == 'psesion' && !event.shiftKey ){
			id = document.getElementById('isesion');
		}else if( donde.id == 'isesion' && event.shiftKey ){
			id = document.getElementById('psesion');
		}
		if( id != null ){
			id.focus();
			return false;
		}
	}
	return true;
}
