<!--
	function mail_check(email) {
		var mail_correcto = 0;
		var term_dom;

		if (email.length >= 6 && email.indexOf("@") >= 0 && email.indexOf("@") == email.lastIndexOf("@") && email.substr(0,1) != "@" && email.substr(email.length - 1, 1) != "@") {
			if (email.indexOf('"') == -1 && email.indexOf("'") == -1 && email.indexOf("\\") == -1 && email.indexOf("\$") == -1 && email.indexOf(" ") == -1) {
				//miro si tiene caracter .
				if (email.indexOf('.') > -1) {
					//obtengo la terminacion del dominio
					term_dom = email.substr(email.lastIndexOf('.') + 1);
					//compruebo que la terminación del dominio sea correcta
					if (term_dom.length > 1 && term_dom.length < 5 && term_dom.indexOf('@') == -1) {
						//compruebo que lo de antes del dominio sea correcto
						antes_dom = email.substr(0,email.length - term_dom.length - 1);
						caracter_ult = antes_dom.substr(antes_dom.length - 1,1);
						if (caracter_ult != "@" && caracter_ult != ".")
							mail_correcto = 1;
					}
				}
			}
		}
		return mail_correcto;
	}
	
	function is_number(cadena) {
		var primero, ultimo, codigo;
		if (cadena == "") return false;

		primero=cadena.indexOf('.');
		ultimo=cadena.lastIndexOf('.');
		
		// Si tiene más de un punto decimal, retornar falso
		
		if (primero > -1 && ultimo > -1 && primero != ultimo)
			return false;

		for (x=0;x < cadena.length;x++) {
			codigo=cadena.charCodeAt(x);
			if ((codigo < 48 || codigo > 57) && codigo != 46)
				return false;
		}

		return true;
	}

	function parserInt(number) {
		var x, result = "";
		number=number.toString();

		if (is_number(number)) {
			for (x=0;x < number.length;x++) {
				if (number.substr(x,1) != "0") {
					result = number.substr(x);
					break;
				}
			}
			if (result == "")
				return 0;
			else
				return parseInt(result);
		}
		else
			return false;
	}
	
	function checkHour(objeto) {
		var hora_inicio = chkHora(objeto.value);
		if (hora_inicio !== false)
			objeto.value = hora_inicio;
		else {
			alert('Debe indicar una hora correcta');
			objeto.value="";
		}
	}
	
	function chkHora(hora) {
		variables = hora.split(':');

		if (variables.length != 3)
			return false;
		else {
			hora = (parserInt(variables[0]) !== false) ? (parserInt(variables[0])) : (-1);
			minutos = (parserInt(variables[1]) !== false) ? (parserInt(variables[1])) : (-1);
			segundos = (parserInt(variables[2]) !== false) ? (parserInt(variables[2])) : (-1);
			
			if (hora < 0 || hora > 23)
				return false;
			if (minutos < 0 || minutos > 59)
				return false;
			if (segundos < 0 || segundos > 59)
				return false;
		}
		
		if (hora < 10) hora = "0" + hora.toString();
		if (minutos < 10) minutos = "0" + minutos.toString();
		if (segundos < 10) segundos = "0" + segundos.toString();
		
		return hora + ":" + minutos + ":" + segundos;
	}
	
	function popup(URL, width, height)
		{
			if (height > (window.screen.height - 100)) {
				height = window.screen.height - 100;
				scrollbars = "yes";
			}
			else{
				scrollbars = "no";
			}
	
			controlador=window.open(URL,"ventana1","scrollbars=" + scrollbars + ",resizable=no,menubar=no,toolbar=no,width=" + width + ",height=" + height + ",top=" + (window.screen.height/2 - height/2) + ",left=" + (window.screen.width/2 - width/2));
			controlador.focus();
			
		} 
		
	
// -->