// JavaScript Document Developed by Health On Line

/*'*************************************************************************************
'*                          ClickIE y ClickNS								           *
'***************************************************************************************
'*Fecha:            Abril 28 de 2003                                                   *
'*Proyecto:         Intranet Heon 	                                         		   *
'*Desarrollado por: Alejandro Espinosa P.											   *
'*Descripcion:      Función que desabilita el click derecho en Internet Explorer	   *
'*					y en Netscape   												   *
'*Retorna:																			   *
'**************************************************************************************/
/*
var mensaje = "";
function clickIE(){
	if (document.all){
    	(mensaje); //No retorna mensaje en el evento mousedown
    return false;
    }
}

function clickNS(e){
	if (document.layers || (document.getElementById && !document.all)){
    	if (e.which == 2 || e.which == 3){
      		(mensaje);
      	return false;
     	}
    }
}

if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = clickNS;
} else {
	document.onmouseup = clickNS;
    document.oncontextmenu = clickIE;
}

document.oncontextmenu = new Function("return false")
*/
/*'*************************************************************************************
'*                          agregar											           *
'***************************************************************************************
'*Fecha:            Abril 28 de 2003                                                   *
'*Proyecto:         Intranet Heon 	                                         		   *
'*Desarrollado por: Alejandro Espinosa P.											   *
'*Descripcion:      Función que permite agregar el sitio web a Favoritos               *
'*Retorna:																			   *
'**************************************************************************************/
function agregar(){
var titulo="Gimnasio Los Pinos 2004" //Definimos el Titulo que se almacenara en Favoritos
var dir = window.location;
dir = dir.toString();
corte = dir.indexOf("/",dir.indexOf("//")+2); //Obtenemos la direccion principal de la pagina actual
var mi_url = dir.slice(0,corte);

if (document.all)
window.external.AddFavorite(mi_url,titulo) //Aqui es donde se llama la ventana para adicionar la url a Favoritos
}

/*'*************************************************************************************
'*                          Pagina_Inicio											   *
'***************************************************************************************
'*Fecha:            Abril 28 de 2003                                                   *
'*Proyecto:         Intranet Heon 	                                         		   *
'*Desarrollado por: Alejandro Espinosa P.											   *
'*Descripcion:      Función que permite al usuario definir la pagina principal del	   *	
'*					sitio web como pagina de inicio.               					   *
'*Retorna:																			   *
'**************************************************************************************/
function Pagina_Inicio() 
{
var dir = window.location;
dir = dir.toString();
corte = dir.indexOf("/",dir.indexOf("//")+2);
var mi_url = dir.slice(0,corte);

obj_Pagina_Inicio.style.behavior='url(#default#homepage)';
obj_Pagina_Inicio.setHomePage(mi_url);
} 


/*'*************************************************************************************
'*                          Pagina_Inicio											   *
'***************************************************************************************
'*Fecha:            Abril 28 de 2003                                                   *
'*Proyecto:         Intranet Heon 	                                         		   *
'*Desarrollado por: Alejandro Espinosa P.											   *
'*Descripcion:      Función que permite desplegar un mensaje en la barra de estado	   *	
'*Retorna:																			   *
'**************************************************************************************/

<!--
var speed = 100 
var pause = 3000
var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = ">>>> Bienvenido al sitio web del Gimnasio Los Pinos <<<<"
var currentMessage = 0
var offset = 0
function stopBanner() {
if (bannerRunning)
clearTimeout(timerID)
bannerRunning = false
}
function startBanner() {
stopBanner()
showBanner()
}
function showBanner() {
var text = ar[currentMessage]
if (offset < text.length) {
if (text.charAt(offset) == " ")
offset++ 
var partialMessage = text.substring(0, offset + 1) 
window.status = partialMessage
offset++ // IE sometimes has trouble with "++offset"
timerID = setTimeout("showBanner()", speed)
bannerRunning = true
} else {
offset = 0
currentMessage++
if (currentMessage == ar.length)
currentMessage = 0
timerID = setTimeout("showBanner()", pause)
bannerRunning = true
}
}
startBanner();
// -->
