// JavaScript Document
var accesible_intro,accesible_introarriba,accesible_links,accesible_idiomas;

accesible_intro ='<a href="home.asp" class="blanco10bold">SALTAR INTRO</a>';
accesible_intro2 ='<a href="taller.asp" target="_blank" class="grisoscuro10">VER AULA TALLER</a>';
accesible_intro3 ='<a href="estetica.asp" target="_blank" class="grisoscuro10">VER AULA DE ESTETICA</a>';
accesible_intro4 ='<a href="practicas.asp" target="_blank" class="grisoscuro10">VER SALA DE PRACTICAS</a>';
accesible_introarriba ='';
accesible_mapa ='<img src="images/mapa.jpg" alt=""/>';
accesible_links='<a href="quienes.asp" class="blanco10bold">QUIENES SOMOS</a>&nbsp;&nbsp;&nbsp;<a href="instalaciones.asp" class="blanco10bold">INSTALACIONES</a>&nbsp;&nbsp;&nbsp;<a href="cursos.asp" class="blanco10bold">CURSOS</a>&nbsp;&nbsp;&nbsp;<a href="eventos.asp" class="blanco10bold">EVENTOS</a>&nbsp;&nbsp;&nbsp; <a href="belleza.asp" class="blanco10bold">CONSEJOS DE BELLEZA</a>&nbsp;&nbsp;&nbsp;<a href="contacto.asp" class="blanco10bold">CONTACTO</a>&nbsp;&nbsp;&nbsp;<a href="localizacion.htm" class="blanco10bold">LOCALIZACION</a>&nbsp;&nbsp;&nbsp;'
accesible_idiomas='<a href="home.asp" class="blanco10bold">Castellano</a><br /><a href="ehome.asp" class="blanco10bold">Euskera</a>';
		
		function poner_flash(peli,ancho,alto,accesible)
	{
		document.write('<object type="application/x-shockwave-flash" width="'+ancho+'" height="'+alto+'" data="'+peli+'">\n');
		document.write('<param name="movie" value="'+peli+'" />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="wmode" value="transparent" />\n');
		document.write(accesible+'\n');
		document.write('</object>\n');
		return false;
	}
function cargar_not(pagina)
{
window.open(pagina,"Pagina","status=yes, toolbar=yes, location=yes, directories=yes, menubar=yes, titlebar=yes, scrollbars=yes, resizable=yes, width=1035, height=745, left=0, top=0");
}
var ie4 = false;
       if(document.all) {
                ie4 = true; 
        }       
        function setContent(name, value) {
                var d;  
                if (ie4) { 
                        d = document.all[name];
                } else {
                        d = document.getElementById(name);
                }       
                d.innerHTML = value;    
        }       

	function getContent(name) {
		var d;
                if (ie4) {
                        d = document.all[name];
                } else {
                        d = document.getElementById(name);
                }
                return d.innerHTML;
	}

        function setColor(name, value) {
                var d;  
                if (ie4) { 
                        d = document.all[name];
                } else {
                        d = document.getElementById(name);
                }
                d.style.color = value;  
        }

	function getColor(name) {
                var d;
                if (ie4) {
                        d = document.all[name];
                } else {
                        d = document.getElementById(name);
                }
                return d.style.color;
        }

        function animate(name, col) {
		var value = getContent(name);
		if (value.indexOf('<span') >= 0) { return; }
		var length = 0;
                var str = '';
		var ch;
		var token = '';
		var htmltag = false;	
                for (i = 0; i < value.length; i++) {
			ch = value.substring(i, i+1);
			if (i < value.length - 1) { nextch = value.substring(i+1, i+2); } else { nextch = ' '; }
			token += ch;
			if (ch == '<' && '/aAbBpPhHiIoOuUlLtT'.indexOf(nextch) >= 0) { htmltag = true; }
			if (ch == '>' && htmltag) { htmltag = false; }
			if (!htmltag && ch.charCodeAt(0) > 30 && ch != ' ' && ch != '\n') {		
                        	str += '<span id="' + name + '_' + length + '">' + token + '</span>';
				token = '';
				length++;
			}
                }
                setContent(name, str);
                command = 'animateloop(\'' + name + '\', ' + length + ', 0, 1, \'' + col + '\')';
                setTimeout(command , 100);
        }

        function animateloop(name, length, ind, delta, col) {
		var next = ind + delta;
		if (next >= length) { delta = delta * -1; next = ind + delta; }
		if (next < 0) { delta = delta * -1; next = ind + delta; }
                setColor(name + '_' + ind, getColor(name + '_' + next));
                setColor(name + '_' + next, col);
                command = 'animateloop(\'' + name + '\', ' + length + ', ' + next + ', ' + delta + ', \'' + col + '\')';
                setTimeout(command , 300);
        }