
function trashThisFunction()
{
	alert("this function does nothing") ;
}

// -------------------------------------------------------- //
// ------------------- GLOBAL VARIABLES ------------------- //
// -------------------------------------------------------- //
	var previousPage ;

// -------------------------------------------------------- //
// --------------- TEST FOR SEARCH ENGINES ---------------- //
// -------------------------------------------------------- //
	var isSE = false;			// Final result
	var seName ;		// Temporarily holds SE's Name
	var testForSE ;		// 
	testForSE = true ;

	// For holding referring URL
	var referringURL;
	referringURL = document.referrer ;		
	if(referringURL == "")
	{
		testForSE = false ;
	}

	//Set up array to hold search engine names
	var seArray = new Array("yahoo.com", "altavista.com", "infoseek.com", "netfind", "excite.com", "mckinley.com", "dogpile.com", "goto.com", "netfind.aol.com", "search.aol.com", "looksmart.com", "hotbot.com", "lycos.com", "miningco.com", "snap.com", "northernlight.com", "msn.com", "www.go.com", "searchengine.htm", "google.com") ;
	
	// Comb through referring URL to see if there's a match with the above Search Engines
	if(testForSE == true)	// testForSE is set to false above if the referring URL is an empty string (no referrer)
	{
		for(i=0; i<seArray.length; i++) 
		{
			if(referringURL.indexOf(seArray[i]) != -1) 	
			{
				isSE = true ;				
				seName = seArray[i] ;
				break ;
			}
			else 
			{
				isSE = false;				
				seName = "" ; 
			}
		}
	}
	
	// -------------------------------------------------------- //
	// -------------- TEST FOR BROWSER VERSION ---------------- //
	// -------------------------------------------------------- //
	var isNav4, isIE4 ;
	if(parseInt(navigator.appVersion) >= 4)
	{
		isNav4 = (navigator.appName == "Netscape") ;
		isIE4 = (navigator.appName.indexOf("Microsoft Internet Explorer") != -1) ;

		// Navigator 4.00 and 4.01 are broken and do not implement the
		// Network properly.  Because of this they need to be weeded out.
		
		if((navigator.appVersion.indexOf("4.00") != -1) || (navigator.appVersion.indexOf("4.01") != -1) || (navigator.appVersion.indexOf("4.02") != -1))
		{
			isNav4 = false ;
		}
		
	}

	
	// -------------------------------------------------------- //
	// ----  Bring in Logo graphic so it loads faster ---------- //
	// -------------------------------------------------------- //

	logoGraphic = new Image() ;
	logoGraphic.src = "http://network.kitchens.com/network-logo.gif" ;
	// You could bring in other graphics but they're not as important
		

	// -------------------------------------------------------- //
	// ------------- SET UP CROSS-PLATFORM DOM ---------------- //
	// -------------------------------------------------------- //
	var docObj, styleObj, dom ;
	if(isIE4)
	{
		docObj = "document.all." ;
		styleObj = ".style" ;
	}
	else if(isNav4)
	{
		docObj = "document." ;
		styleObj = "" ;
	}

	// -------------------------------------------------------- //
	// ------- SET UP INITIAL PLACEMENT & SIZE VARIABLES ------ //
	// -------------------------------------------------------- //
	
	function initializeNetwork()
	{
		nScreenHeight = (isIE4) ? document.body.clientHeight : window.innerHeight ;
		nScreenWidth = (isIE4) ? document.body.clientWidth : window.innerWidth ;

		nLogoHeight = 32 ;
		nLogoWidth = 122 ;
		
		nHideBoxHeight = 32 ;
		nHideBoxWidth = 74 ;

		nFrameWidth = 200 ;
		nFrameHeight = 250 ; //parseInt(nScreenHeight*.65) - this is old code

		// Below is setting up the placement of the Network components
		nLogoTop = nScreenHeight - (nLogoHeight + 20) ;
		nLogoLeft = nScreenWidth - (nLogoWidth + 20) ;
		nHideBoxTop = nLogoTop ;  // The hide box is in line with the logo
		nHideBoxLeft = nLogoLeft - nHideBoxWidth ;
						
		nFrameTop = nLogoTop - nFrameHeight ;
		nFrameLeft = nHideBoxLeft ;
	}	
	

	// -------------------------------------------------------- //
	// -SET UP FUNCTIONS TO SHOW & HIDE THE NETWORK COMPONENTS- //
	// -------------------------------------------------------- //

	function showNetwork()
	{
		if(isIE4) 
		{
		document.all.NetworkHideBox.style.visibility = "visible" ;
		document.all.NetworkFrame.style.visibility = "visible" ;
		}
		
		else if(isNav4)  
		{
		document.NetworkHideBox.visibility = "show" ;
		document.NetworkFrame.visibility = "show" ;
		}
			
	}

	function hideNetwork()
	{
		if(isIE4) 
		{
		document.all.NetworkHideBox.style.visibility = "hidden" ;
		document.all.NetworkFrame.style.visibility = "hidden" ;
		}
		
		else if(isNav4) 
		{
		document.NetworkHideBox.visibility = "hide" ;
		document.NetworkFrame.visibility = "hide" ;
		}
			
	}	
	
	// -------------------------------------------------------- //
	// -- AFTER A LINK IS CLICKED DETERMINE HOW TO HANDLE IT -- //
	// -- NETSCAPE IS TOO STUPID TO HANDLE LINKS NORMALLY SO -- //
	// -- YOU MUST REPLACE THE .SRC FILE WITH THE NEW FILE   -- //
	// -- IE JUST HANDLES IT IN A FRAME SO YOU JUST RETURN   -- //
	// -- TRUE AND LET THE LINK PROCESS NORMALL  -------------- //
	// -------------------------------------------------------- //
	
	function determineLink(layerLink)
	{
		if(isNav4)
		{	
			// Change NetworkFrameInside src with the linked to page
			document.NetworkFrame.document.NetworkFrameBody.document.NetworkFrameInside.src = layerLink ;
			initializeScroll() ;	// When layer changes it is necessary to determine the document size of the new page
		}
		// The code below may not be necessary but, you need to return someting for Netscape
		else if(isIE4)  
		{
			return true ;
		}
		else  
		{
			return false ;	
		}
	}

	// -------------------------------------------------------- //
	// ---------------- Place Network on Scroll --------------- //
	// -------------------------------------------------------- //
		
	function changePlacement()
	{
		if(isIE4)
		{
			// This changes the location of the Network every on a scroll or a browser resize
				document.all.NetworkFrame.style.top = document.body.clientHeight + document.body.scrollTop - nFrameHeight - 20 - nLogoHeight ;
				document.all.NetworkHideBox.style.top = document.body.clientHeight + document.body.scrollTop - nHideBoxHeight - 20 ;
				document.all.NetworkLogo.style.top = document.body.clientHeight + document.body.scrollTop - nLogoHeight - 20 ;
				document.all.NetworkFrame.style.left = document.body.clientWidth + document.body.scrollLeft - nFrameWidth -18 ;
				document.all.NetworkHideBox.style.left = document.body.clientWidth + document.body.scrollLeft - nHideBoxWidth - nLogoWidth - 20 ;
				document.all.NetworkLogo.style.left = document.body.clientWidth + document.body.scrollLeft - nLogoWidth - 20 ;

				timeout = setTimeout("changePlacement()", 100) ;
		}
		if(isNav4)
		{
				
			// Move the Hide Box					
			document.NetworkHideBox.top = pageYOffset + window.innerHeight - nHideBoxHeight - 20 ;
			document.NetworkHideBox.left = pageXOffset + window.innerWidth - nFrameWidth - 20 ;
			// Move the Frame
			document.NetworkFrame.top = pageYOffset + window.innerHeight - nFrameHeight - nLogoHeight - 20 ;
			document.NetworkFrame.left = document.NetworkHideBox.left ;
			// Move the Network Logo
			document.NetworkLogo.top = pageYOffset + window.innerHeight - nLogoHeight - 20 ;
			document.NetworkLogo.left = document.NetworkHideBox.left + nHideBoxWidth ;
					
			// Call this function again to keep placing the logo
			timeout = setTimeout("changePlacement()", 100) ;
		}
	}
	// -------------------------------------------------------- //
	// ------------- NETSCAPE LAYER SCROLL CODE --------------- //
	// -------------------------------------------------------- //

	// Global Scroll Variables
	var scrollBrake = "off" ;
	var scrollStart = "0" ;
	var scrollPosition = "0" ;
	var scrollHeight = "0" ;

	// function to initialize scroll variables each time the content changes (called from determineLink())
	function initializeScroll()
	{	
		// This sets up the scroll information to stop the scroll in Netscape at the top and bottom - it's not functioning at this point
		document.NetworkFrame.document.NetworkFrameBody.document.NetworkFrameInside.top = 0 ;
		scrollHeight = document.NetworkFrame.document.NetworkFrameBody.document.NetworkFrameInside.document.height - document.NetworkFrame.document.NetworkFrameBody.clip.height;
		scrollStart = document.NetworkFrame.document.NetworkFrameBody.document.NetworkFrameInside.top ;
		scrollPosition = scrollStart ;
		scrollBrake = "off" ;
	}
	function stopScroll()
	{
		scrollBrake = "on" ;
	}
	
	function scrollUp()
	{
		// To stop the scroll at the top and bottom, you would put an if statement around
		// the next two lines
		scrollPosition = scrollPosition + 10 ;   
		document.NetworkFrame.document.NetworkFrameBody.document.NetworkFrameInside.top = scrollPosition ;
			
		if(scrollBrake == "off")
		{
			timeout = setTimeout("scrollUp()", 100) ;
		}
		else
		{
			scrollBrake = "off" ;
			return false ;
		} 
	}

	function scrollDown()
	{
		scrollPosition = scrollPosition - 10 ; 
		document.NetworkFrame.document.NetworkFrameBody.document.NetworkFrameInside.top = scrollPosition ;
			
		if(scrollBrake == "off")
		{
			timeout = setTimeout("scrollDown()", 100) ;
		}
		else
		{
			scrollBrake = "off" ;
			return false ;
		}
	}
	

	
	// -------------------------------------------------------- //
	// ---------- Determine Layer Size & Positioning ---------- //
	// -------------------------------------------------------- //
	
	function initializeLayer()
	{
		document.NetworkFrame.document.NetworkFrameBody.document.NetworkFrameInside.top ;
	}
	function initializeAllPlacementVariables()
	{
		layerSrc = new Layer() ;
	}


