 //Sitio web "EL - ATENEO"
// Script (c) 2004 - Lucas Fabian
//
var pantalla_alto, pantalla_ancho;
var inicio_alto = 600;
var inicio_ancho = 800;
var url_base = "/elateneo";
var i = 100;
var k = 0;
var ndec = 20;
var z = ndec;
var fondo_color = "#EAEAEA";
var iframe_ancho, iframe_alto;
var imagen_fondo = url_base+"/imagenes_comunes/fondo1.gif";

function inicializar() {
	//ajustar_tabla();
	//document.getElementById("area_contenido").src = "principal.html";
}

function ajustar_tabla () {
	/*pantalla_alto = screen.height;
	pantalla_ancho = screen.width;
	correccion_ancho = document.getElementById("tabla_contenedora").width*pantalla_ancho/inicio_ancho;
	correccion_alto = document.getElementById("tabla_contenedora").height*pantalla_alto/inicio_alto;
	if ((correccion_ancho > 0) && (correccion_alto > 0)){
		document.getElementById("tabla_contenedora").width = correccion_ancho;
		document.getElementById("tabla_contenedora").height = correccion_alto;
		iframe_ancho = correccion_ancho;
		iframe_alto = correccion_alto*80/100;
		document.getElementById("area_contenido").height = iframe_alto;
	}*/
}

function chequear_marco () {
	if (window.parent.pagina == null){
		window.location = url_base+"/index.html";
	} else {
		//inicializar_marco ();
	}
}

function inicializar_marco () {
	//document.all.efecto.style.visibility = "visible";
	//document.all.efecto.style.top = 0;
	//document.all.efecto.style.left = 0;
	//document.all.efecto.style.width = self.document.body.offsetWidth-(self.document.body.offsetWidth-self.document.body.clientWidth);
	//document.all.efecto.style.height = self.document.body.scrollHeight;
	//document.all.efecto.style.backgroundColor = window.parent.document.body.bgColor;
	window.self.document.bgColor = fondo_color;
	window.self.document.body.background = imagen_fondo;
	//k = setInterval ("alpha_sale()", 1);
	//i = document.all.efecto.filters.alpha.opacity+ndec;
}

function alpha_sale () {
	z = z - 10;
	i = i - (ndec-z);
	document.all.efecto.filters.alpha.opacity = i;
	if (i < 1) {
		clearInterval(k);
		document.all.efecto.style.visibility = "hidden";
	} 
}

function insertar_capa () {
	//document.write ('<div id="efecto" style="position:absolute; filter: alpha(opacity=100); left:0px; top:0px; width:700px; height:300px; z-index:100; overflow: visible; visibility: visible; border: 0px none #808080" class="unnamed1"></div>');
}

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function barnav_DoFSCommand(command, args) {
	var barnavObj = InternetExplorer ? barnav : document.barnav;
	if (command == "ap") {
		saltar_url = url_base+args;
		window.document.getElementById("area_contenido").src = saltar_url;
	}
}

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub barnav_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call barnav_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}

function chequear_formulario (){
	continuar = true;
	msg_error = "";
	if (document.consulta.nombre.value.length < 1){
		continuar = false;
		msg_error = "Debe ingresar su nombre para continuar.\n";
	}
	if ((document.consulta.email.value.indexOf ("@") < 0) || (document.consulta.email.value.indexOf (".") < 0) || (document.consulta.email.value.length < 5)){
		continuar = false;
		msg_error = msg_error+"La dirección de e-mail es incorrecta.\n";
	}
	if (continuar == false){
		alert(msg_error);
	} else {
		document.consulta.submit();
	}

}
