// JavaScript Document
function cambiar_color(objeto,tipo){
	if(tipo==1){
		objeto.className = "fila1";
	}else{
		objeto.className = "fila2";
	}
}
function cambiar_color2(objeto,tipo){
	if(tipo==1){
		objeto.className = "fila3";
	}else{
		objeto.className = "fila4";
	}
}
function abre(URL){
var opciones = 'toolbar=yes, location=yes, directories=yes, status=yes,resizable=yes, menubar=yes, scrollbars=yes, fullscreen=yes';
var w=window.open(URL,null,'');
return w ;

}
function openInNewTab(URL) {
var temporalForm = document.createElement('form');
with (temporalForm) {
setAttribute('method', 'GET');
setAttribute('action', URL);
setAttribute('target', '_blank');
}

var paramsString = URL.substring(URL.indexOf('?') + 1, URL.length);
var paramsArray = paramsString.split('&');

for (var i = 0; i < paramsArray.length; ++i) {
var elementIndex = paramsArray[i].indexOf('=');
var elementName = paramsArray[i].substring(0, elementIndex);
var elementValue = paramsArray[i].substring(elementIndex + 1, paramsArray[i].length);

var temporalElement = document.createElement('input');
with(temporalElement) {
setAttribute('type', 'hidden');
setAttribute('name', elementName);
setAttribute('value', elementValue);
}
temporalForm.appendChild(temporalElement);
}
document.body.appendChild(temporalForm);
temporalForm.submit();
document.body.removeChild(temporalForm);
}

function navegador(URL){
		var a=navigator.appName;
		if(a=="Microsoft Internet Explorer"){
			abre(URL);
			}else{
				openInNewTab(URL);
				  }
		}

function Abrir_computo () {
var opciones="width=708px, height=505px, top=55, left=180,toolbar=0, directories=no, status=no,resizable=no, menubar=0, scrollbars=no,scrollbars=no,toolbar=no,location=no ";
window.open("flash/computo.swf","_blank",opciones);
}
function Abrir_agenda() {
	var opciones="width=485px, height=655px, top=55, left=180,toolbar=0, directories=no, status=no,resizable=no, menubar=0, scrollbars=no,scrollbars=no,toolbar=no,location=no ";
	window.open("flash/agenda_junio2010.swf","_blank",opciones);
	}
function Abrir_simponica () {
var opciones="width=708px, height=490px, top=55, left=180,toolbar=0, directories=no, status=no,resizable=no, menubar=0, scrollbars=no,scrollbars=no,toolbar=no,location=no ";
window.open("flash/simponica.swf","_blank",opciones);
}

function Abrir_idioma () {
var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=790px, height=537px, top=85, left=140";
window.open("flash/centro_idiomas.swf","",opciones);
}
function Abrir_preferencial () {
var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, height=650px, width=630px, top=85, left=350";
window.open("ingreso.php","",opciones);
}
function Abrir_simulacro () {
var opciones="toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes,fullscreen=yes, top=85, left=350";
window.open("simulacro/index.php","",opciones);
}
function Abrir_libro () {
var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, height=650px, width=800px,  top=85, left=140";
window.open("flash/presentacion.swf","",opciones);
}
function Abrir_fiesta () {
var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, height=650px, width=444px,  top=85, left=160";
window.open("flash/fiesta2009.swf","",opciones);
}
function Abrir_invitacion () {
var opciones="toolbar=, location=0, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, height=650px, width=450px,  top=70, left=130";
window.open("invitacion.php","",opciones);
}
function Abrir_mural () {
var opciones="toolbar=, location=0, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, height=520px, width=845px, top=70, left=130";
window.open("flash/mural.swf","",opciones);
}

function Abrir_feria(){
	var opciones="toolbar=no location=no, directories=no, status=no,menubar=no, scrollbars=no, resizable=no, height=725px , width=475px, top85, left=240";
	window.open("flash/feria.swf","",opciones);
	}

function Abrir_galeria() {
var opciones="toolbar=, location=0, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, height=600px, width=915px,  top=70, left=130";
ab=window.open("galeria.swf","",opciones);
}
function Abrir_juego () {
var opciones="toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, fullscreen=yes";
window.open("http://190.41.47.30/app_charla_vocacional/juego/ingresar.php","",opciones);
}
function Abrir_juego2 () {
var opciones="toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, height=770px, width=800px, top=20%, left=2%";
window.open("valida.php","",opciones);
}
function cerrar(){
	window.open('','_parent','');
window.close(); 
window.opener = null;
window.close();
return false;
	}
/*contactenos*/
function validar(){
nom=document.getElementById('nombre').value;
	if(document.getElementById("nombre").value.length <= 0)
	{
		alert("Es necesario escribir su nombre");
		document.getElementById("nombre").focus()
		return false;
		}else if(!isNaN(nom)){		
		alert("Es necesario que ingrese un nombre v\xE1lido")
		document.getElementById("nombre").focus();
		return false;
		}		
		TelCel = document.getElementById("telefono").value
        document.getElementById("telefono").value=TelCel
		if (isNaN(TelCel) || TelCel.length<7 && TelCel!="") {
          alert("Ingrese un tel\xE9fono v\xE1lido.")
          document.getElementById("telefono").focus()
          return false;
      									   }
	else if(document.getElementById("telefono").value.length <= 0)
	{
		alert("Es necesario escribir su tel\xE9fono");
		document.getElementById("telefono").focus()
		return false;
	}
	 mail=document.getElementById("email").value
	 if(document.getElementById("email").value.length <= 0)
	{
		alert("Es necesario escribir su email");
		document.getElementById("email").focus()
		return false;
	}
	else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) {
	    
	alert("La direcci\xF3n de email es incorrecta.");
	document.getElementById("email").focus()
	return false;
		}
	else if(document.getElementById("consulta").value.length <= 0)
	{
		alert("Es necesario escribir su consulta");
		document.getElementById("consulta").focus()
		return false;
	}
	alert("Gracias por llenar su sugerencia");
	return true;
	}
/*verificar a quien le pertenece*/
function mostrar(){
div=document.getElementById('contenido');
div.style.display='none';

div2=document.getElementById('contenido4')
div2.style.display='';
}
function ocultar(){
div2=document.getElementById('contenido4')
div2.style.display='none';
}/*cerramos verificar*/



var arrImagenes2=new Array();
	for(j=1;j<=8;j++){
		arrImagenes2[j-1]=j+".jpg";
	}

	var valor=1;
	function mostrarPrimero2(carpeta,valor){
			document.getElementById(carpeta).src="./colegios/"+carpeta+"/images/"+carpeta+arrImagenes2[0];
			jPosicion2=0;
			}
			
	function mostrarUltimo2(carpeta,valor){
			document.getElementById(carpeta).src="./colegios/"+carpeta+"/images/"+carpeta+arrImagenes2[arrImagenes2.length-1];
		jPosicion2=arrImagenes2.length;
	}
	
	function mostrarSiguiente2(carpeta,valor){
		if(valor==0){
			jPosicion2++;
		if(jPosicion2>(arrImagenes2.length)){ jPosicion2=0;return;}
		document.getElementById(carpeta).src="./colegios/"+carpeta+"/images/"+carpeta+arrImagenes2[jPosicion2];
			}
	}
	
	function mostrarAnterior2(carpeta,valor){
		jPosicion2--;
		if(jPosicion2<0){jPosicion2++;return;}
		document.getElementById(carpeta).src="./colegios/"+carpeta+"/images/"+carpeta+arrImagenes2[jPosicion2];
	}
	jPosicion2=0;
	var j=1;
	
	
	function boletin(){
		nom=document.getElementById('nombre').value;
	if(document.getElementById("nombre").value.length <= 0)
	{
		alert("Es necesario escribir su Nombre");
		document.getElementById("nombre").focus()
		return false;
		}		
		 mail=document.getElementById("email").value
	 if(document.getElementById("email").value.length <= 0)
	{
		alert("Es necesario escribir su email");
		document.getElementById("email").focus()
		return false;
	}
	else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) {

	alert("La direcci\xF3n de email es incorrecta.");
	document.getElementById("email").focus()
	return false;
		}
	else if(document.getElementById("consulta").value.length <= 0)
	{
		alert("Es necesario escribir su comentario");
		document.getElementById("consulta").focus()
		return false;
	}
	alert("Gracias por enviar su comentarios");
	return true;
		}

		function enviar_correo(){
		nom=document.getElementById('txtde').value;
	if(document.getElementById("txtde").value.length <= 0)
	{
		alert("Es necesario escribir su correo");
		document.getElementById("txtde").focus()
		return false;
		}else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(nom)) {

	alert("La direcci\xF3n de correo es incorrecta.");
	document.getElementById("txtde").focus()
	return false;
		}

	 mail=document.getElementById("txtpara").value
	 if(document.getElementById("txtpara").value.length <= 0)
	{
		alert("Es necesario escribir el email a enviar");
		document.getElementById("txtpara").focus()
		return false;
	}
	else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) {

	alert("La direcci\xF3n de email es incorrecta.");
	document.getElementById("txtpara").focus()
	return false;
		}
		alert("Mensaje enviado con exito");
		window.close();
	return true;
		}
				
function abrir_correo(boletin) {
var opciones="toolbar=, location=0, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, height=200px, width=400px,  top=200, left=350";
window.open("../../boletines/boletin1/enviar.php?boletin="+boletin,"",opciones);
}

function escolar(){
		nom=document.getElementById('nombre').value;
	if(document.getElementById("nombre").value.length <= 0)
	{
		alert("Es necesario escribir su Nombre");
		document.getElementById("nombre").focus()
		return false;
		}		
		 mail=document.getElementById("email").value
	 if(document.getElementById("email").value.length <= 0)
	{
		alert("Es necesario escribir su email");
		document.getElementById("email").focus()
		return false;
	}
	else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) {

	alert("La direcci\xF3n de email es incorrecta.");
	document.getElementById("email").focus()
	return false;
		}
	else if(document.getElementById("consulta").value.length <= 0)
	{
		alert("Es necesario escribir su comentario");
		document.getElementById("consulta").focus()
		return false;
	}
	alert("Gracias por enviar su comentarios");
	return true;
}
function ingreso_pre(){
	 mail=document.getElementById("email").value
	 if(document.getElementById("email").value.length <= 0)
	{
		alert("Es necesario escribir su email");
		document.getElementById("email").focus()
		return false;
	}
	else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) {

	alert("La direcci\xF3n de email es incorrecta.");
	document.getElementById("email").focus()
	return false;}
	
		if(document.getElementById("consulta").value.length <= 0)
	{
		alert("Es necesario escribir su comentario");
		document.getElementById("consulta").focus()
		return false;
	}
	alert("Gracias por enviar su comentarios");
	window.close();
}

function abrir_alumno(alumno) {
var opciones="toolbar=, location=0, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, height=260px, width=400px,  top=200, left=350";
window.open("enviar.php?alumno="+alumno,"",opciones);
}

function cerrarventana(){
	alert('mensaje enviado correctamente');
	window.close();
}


function editorial(){
	nom=document.getElementById('nombre').value;
	if(document.getElementById("nombre").value.length <= 0)
	{
		alert("Es necesario escribir su Nombre");
		document.getElementById("nombre").focus()
		return false;
		}		
	mail=document.getElementById("email").value
	 if(document.getElementById("email").value.length <= 0)
	{
		alert("Es necesario escribir su email");
		document.getElementById("email").focus()
		return false;
	}
	else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) {

	alert("La direcci\xF3n de email es incorrecta.");
	document.getElementById("email").focus()
	return false;}
		if(document.getElementById("consulta").value.length <= 0)
	{
		alert("Es necesario escribir su comentario");
		document.getElementById("consulta").focus()
		return false;
	}
	alert("Gracias por enviar su comentarios");
	return true;
}
function simulacro(){
	
		if(document.getElementById("consulta").value.length <= 0)
	{
		alert("Es necesario escribir su comentario");
		document.getElementById("consulta").focus()
		return false;
	}
	alert("Gracias por enviar su comentarios");
	return true;
}

function ver_menu(){
	document.getElementById('fiesta').style.display='';
	}
	function ocultar_menu(){
	document.getElementById('fiesta').style.display='none';
		}

