function favoritos()
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) 	
	{
		window.external.AddFavorite ("http://www.kellscollege.com/");
	}
	else
	{
		var msg = "¡Para añadirnos a tus favoritos pulsa Ctrl + D!";
		if(navigator.appName == "Netscape") msg += " (CTRL-D)";
		alert(msg);
	}
}
function ini() 
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
	{
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage('http://www.kellscollege.com');
	}
	else
	{
		if(navigator.appName == "Netscape") alert("Su navegador no acepta esta opción automática.");
	}
}
function sw(loc, titulo, ancho, alto)
{
	options="toolbar=0,Status=0,menubar=0,scrollbars=no,resizable=0,location=0,directories=0,width=" + ancho + ",height=" + alto;
	window.open(loc,titulo,options);
}
function sw2(loc, titulo, ancho, alto)
{
	options="toolbar=0,Status=0,menubar=0,scrollbars=yes,resizable=1,location=0,directories=0,width=" + ancho + ",height=" + alto;
	window.open(loc,titulo,options);
}

function imprimir()
{

	var bName = navigator.appName;
	var bVer = parseFloat(navigator.appVersion);
	var contenido = document.getElementById("cont-centro").innerHTML;
	ventana=window.open("about :blank","ventana","width=535,height=600,top=0,left=3000");
	ventana.document.open();
	ventana.document.write('<html><head><link rel="stylesheet" href="http://kellscollege.com/css/style.css" type="text/css"><link rel="stylesheet" type="text/css" href="/css/editor.css.php" /><title>Kells College</title></head><body onprint="self.close()">');
	ventana.document.write(contenido);
	ventana.document.close();
	ventana.print();
	ventana.focus();
	ventana.close();
}
function ver(opcion,object)
{
	if(document.getElementById(object))
	{
		if(opcion==1)
			document.getElementById(object).style.display='block';	
		else if(opcion==0)
			document.getElementById(object).style.display='none';
		else if(opcion==2)
		{
			if(document.getElementById(object).style.display=='block')
				document.getElementById(object).style.display='none';
			else
				document.getElementById(object).style.display='block';
		}
	}
}
//foros
function valida(arg,texto)
{
	longitud = 5;
	if(parseInt(document.frmNew.txtTitulo.value.length) > longitud)
	{
		return true;
	}
	else{
		alert(texto +" (" + longitud + ").");
		return false;
	}
}
function confirmacion(arg,texto)
{
	if(confirm(texto))
		document.location.href = arg;
}
function Operacion(cual1,cual2,cual3)
{
	document.EliminarReg.foro.value=cual1;
	document.EliminarReg.tema.value=cual2;
	document.EliminarReg.niv.value=cual3;
	document.EliminarReg.action="tutor_activa_foro.php";
	document.EliminarReg.submit();
}
function preview(img,ancho,alto)
{
	window.open("/archivos/imagenes_contenidos/"+img, "", "width="+ancho+",height="+alto+", scrollbars=auto,directories=0,status=0");
}
function verPunto(latitud, longitud)
{
	document.getElementById('Ver').value=true;
	document.getElementById('Lat').value=latitud;
	document.getElementById('Lon').value=longitud;
	document.tabla_botones.submit();
}
function invertir(nombre)
{
	if(document.getElementById(nombre))
	{
		dummy = document.getElementById(nombre);
		dummy = dummy.getElementsByTagName("input");
		Size = dummy.length;
		for(q = 0; q < Size; q++)
		{
			if( dummy[q].checked == true ) dummy[q].checked = false;
			else dummy[q].checked = true;
		}
	}
}
function verPunto(latitud,longitud,zoom)
{
	document.getElementById('Ver').value=true;
	document.getElementById('Lat').value=latitud;
	document.getElementById('Lon').value=longitud;
	document.getElementById('Zom').value=zoom;
	document.tabla_botones.submit();
}
function evaluar_zoom()
{
	alert(map.getZoom());
}

function verformc(object)
{
	document.getElementById('pestf1').style.display='none';
	document.getElementById('pestf1a').style.color='#F4B37B';
	//document.getElementById('pestf2').style.display='none';
	//document.getElementById('pestf2a').style.color='#DECF73';
	document.getElementById('pestf3').style.display='none';
	document.getElementById('pestf3a').style.color='#BAD691';
	//document.getElementById('pestf4').style.display='none';
	//document.getElementById('pestf4a').style.color='#76C6D4';
	
	if(document.getElementById(object))
	{
		document.getElementById(object).style.display='block';	
		if(object=="pestf1")
			document.getElementById('pestf1a').style.color='#FD7E0E';
		//else if(object=="pestf2")
		//	document.getElementById('pestf2a').style.color='#D4B901';
		else if(object=="pestf3")
			document.getElementById('pestf3a').style.color='#8BC53C';
		//else if(object=="pestf4")
		//	document.getElementById('pestf4a').style.color='#02A5C1';
	}
}


