/* ***************************************************************************** */
/* SCRIPT       : JAVASCRIPT                                                     */
/*                                                                               */
/* Authors      : C. Tobehn                                                      */
/* Version      : 1.1                                                            */
/* Revision     : a                                                              */
/*                                                                               */
/* Date	        : 20.3.2000                                                      */
/*                                                                               */
/* Description  :                                                                */
/* 	- Debuging Switch                                                        */
/* 	- Browser compartibility check                                           */
/* 	- Highlight / Normal Buttons at mouse move                               */
/* 	- Highlight / Normal Buttons at page selection & init page               */
/*                                                                               */
/* Change Record :                                                               */
/* 	- 20.03.2000:	Debuging switch, Browser check                           */
/*                                                                               */
/* ***************************************************************************** */

/* ***************************************************************************** */
/* DANGER: Debuging switch                                                       */
/* ***************************************************************************** */
var Debug 		= false ;

/* ***************************************************************************** */
/* Browser compartibility test                                                   */
/* ***************************************************************************** */
var BrowserVersion 	= 0;
var BrowserName 	= "NULL";
var browserOk 		= 0;
var browserAbbrev 	= "NULL";

BrowserName 	= navigator.appName;             
BrowserVersion 	= parseInt(navigator.appVersion); 

if ( BrowserName == "Netscape" && BrowserVersion >= 4) 
{
	browserAbbrev = "n4"; 
	browserOk = "1";

} else if ( BrowserName == "Netscape" && BrowserVersion == 3) 
{
	browserAbbrev = "n3"; 
	browserOk = "1";

} else if ( BrowserName == "Microsoft Internet Explorer" && BrowserVersion >= 4) 
{
	browserAbbrev = "e4"; 
	browserOk = "1";

} else 
{
	browserOk = 0;
}

if ( Debug == true ) 
{
	window.alert ("DEBUG: " +BrowserName +" -  version: " +BrowserVersion +" (" +browserAbbrev +")");
}


/* ***************************************************************************** */
/* ***************************************************************************** */
/* ***************************************************************************** */


/* ***************************************************************************** */
/* Highlight Buttons on Navigation Bars                                          */
/* Highlight 	at movse over                                                    */
/* Normal 	at mose out                                                      */
/* Highlight Button of current page at selection and Normal other Buttons        */
/* ***************************************************************************** */
var Pages 	= new Array (
	"index.htm", 
	"whois.htm", 
	"topic.htm", 
	"world.htm", 
	"nasa.htm", 
	"link.htm");
var Normal 	= new Array (
	"images/jpg/hand.jpg", 
	"images/jpg/Gaspra.jpg", 
	"images/jpg/earth1.jpg", 
	"images/jpg/solarys1.jpg", 
	"images/jpg/Nasa1009.jpg", 
	"images/jpg/Pleides1.jpg");
var Highlight 	= new Array (
	"images/jpg/hand_hl.jpg", 
	"images/jpg/Gaspra_hl.jpg", 
	"images/jpg/earth1_hl.jpg", 
	"images/jpg/solarys1_hl.jpg", 
	"images/jpg/Nasa1009_hl.jpg", 
	"images/jpg/Pleides1_hl.jpg");

/* ***************************************************************************** */
/* Select Highlight button image [ImageNo] with image file Array ID [LinkNo]     */
/* ***************************************************************************** */
function ImageHighlight(LinkNo, ImageNo)
{
	window.document.images[ImageNo].src = Highlight[LinkNo];
}
	
/* ***************************************************************************** */
/* Select Normal button image [ImageNo] with image file Array ID [LinkNo]        */
/* if frames, then only,                                                         */
/*    if current page file name is not curent image ref [LinkNo] file name       */
/* ***************************************************************************** */
function ImageNormal(LinkNo, ImageNo)
{
	if (parent.frames.length > 1) 
	{
		TargetHref = parent.Target.location.href;
		 if (TargetHref.indexOf (Pages[LinkNo]) == -1)
			 window.document.images[ImageNo].src = Normal[LinkNo];
	} else {
		 window.document.images[ImageNo].src = Normal[LinkNo];
	}
}

/* ***************************************************************************** */
/* Select Highlight button image corresponding to current frame page and         */
/* select normal for all other button images                                     */
/* ***************************************************************************** */
function PageInit()
{
	if (parent.frames.length > 1) 
	{
		var TargetHref = parent.Target.location.href;
/* DEGUB */
if ( Debug == true ) 
{
	window.alert ("DEBUG: Frames: " +parent.frames.length +" HREF: " +TargetHref );
}

		for (i = 1; i < 4; i++)
		{
			if (TargetHref.indexOf (Pages[i]) != -1) 
				 parent.Navigation.document.images[i].src = Highlight[i];
  			else
				 parent.Navigation.document.images[i].src = Normal[i];
		}
		if (TargetHref.indexOf (Pages[5]) != -1) 
			 parent.Navigation.document.images[4].src = Highlight[5];
		else
			 parent.Navigation.document.images[4].src = Normal[5];
	}
}


/* ***************************************************************************** */
/* ***************************************************************************** */
/* ***************************************************************************** */


/* ***************************************************************************** */
/* Variables for version number in bottom line                                   */
/* ***************************************************************************** */
var Version=3.1;

