
// <!-- hide this from non-java-enabled browsers
	var sNavRollovers = new String() ;

	// LINK object
	function lnk(sPageName, sLinkName)
	{
		this.pagename = new String(sPageName) ;
		this.linkname = new String(sLinkName) ;
	}
	
	// LINK object array
	// NOTE: If you add one here, consider adding one to 'buildTOLinksArray()' in 'textonlylinks.asp'
	function buildLinkArray()
	{
		var ar = new Array() ;
		ar[ar.length] = new lnk("default", 			"navMain") ; 
//		ar[ar.length] = new lnk("directions", 		"navFindUs") ; 
		ar[ar.length] = new lnk("beckys_bio", 		"navBio") ; 
		ar[ar.length] = new lnk("daves_bio", 		"navDaveBio") ; 
		ar[ar.length] = new lnk("grouptraining", 	"navGroupTraining") ; 
		ar[ar.length] = new lnk("boardandtrain", 	"navBnT") ; 
//		ar[ar.length] = new lnk("specialevents",	"navSpecialEvents") ; 
		ar[ar.length] = new lnk("album", 			"navAlbum") ; 
		ar[ar.length] = new lnk("traintip", 		"navTrainingTip") ; 
		ar[ar.length] = new lnk("tricktip", 		"navTrickTip") ; 
		ar[ar.length] = new lnk("links", 			"navLinks") ; 
//'		ar[ar.length] = new lnk("starbucksgoes", 	"navStarbucksGoes") ; 
		ar[ar.length] = new lnk("mindmanners", 		"navMindManners") ; 
		ar[ar.length] = new lnk("ravereviews", 		"navRaveReviews") ; 
//		ar[ar.length] = new lnk("faq", 				"navFAQ") ; 
//'		ar[ar.length] = new lnk("blog", 			"navBlog") ;
		return(ar) ;
	}
	
	// build the string list
	function prepNavRolloversList()
	{	
		var s = new String() ;
		var ar = buildLinkArray() ; // go get all the rollover links and their names
		var nLen = 0 ;
		
		// assemble the colon-delimited string of links:
		for( var i = 0; i < ar.length; i++ )
		{
			if( ar[i].pagename != sPage ) 
			{
				s += (ar[i].linkname + ":") ; // colon-delimited string concatonation
			}
		}
		
		nLen = parseInt((s.length - 1)) ;
		// trim off the trailing colon character if it exists:
		if( s.lastIndexOf(":") == nLen ) 
		{
			sNavRollovers = s.substr(0, nLen) // trim the last character off the original string
		}
	}
	
	// -----------------------------------------------------------------------------------------------
	// assignImage()
	// -----------------------------------------------------------------------------------------------
	// 
	// Purpose:
	//
	// 	 • to assign images to each page element
	//
	// -----------------------------------------------------------------------------------------------
	// Parameters List:
	//
	// 	 • sName		string -- name of the element to which the image is assigned
	// 	 • sImgOut		string -- name of the image assigned to onMouseOut condition
	// 	 • sImgOvr		string -- name of the image assigned to onMouseOvr condition
	// 	 • ar			array -- reference to the array containing all of the preloaded images
	//	 • nElements	number -- array element count
	// -----------------------------------------------------------------------------------------------
	// Remarks:
	//
	//	 •
	// -----------------------------------------------------------------------------------------------
	// History:
	//
	//	 • 11.06.2001 -- threedeadflies@hotmail.com -- wrote the function 
	// -----------------------------------------------------------------------------------------------
	//	
	function assignImage(sName, sImgOut, sImgOvr, ar, nElements)
	{
		var x = new pmImage() ;
		with( x )
		{
			name = sName ;
			mouseOut.src = sImgOut ; 
			mouseOvr.src = sImgOvr ; 
		}
		ar[ar.length] = x ;			// add new pmImage object to pmImages array
		eval(sName).src = ar[nElements].mouseOut.src ; 
	}

	// -----------------------------------------------------------------------------------------------
	// pmImage() -- (duplicate of server-side object)
	// -----------------------------------------------------------------------------------------------
	//
	// Purpose:
	//
	// 		to define a reusable object representing each preloaded image in the page
	// -----------------------------------------------------------------------------------------------
	// Parameters List:
	//
	// 	 •
	// -----------------------------------------------------------------------------------------------
	// Remarks:
	//
	//	 • used by rollovers on the page
	// -----------------------------------------------------------------------------------------------
	// History:
	//
	//	 • 11.06.2001 -- threedeadflies@hotmail.com -- wrote the function 
	// -----------------------------------------------------------------------------------------------
	//
	function pmImage()
	{
		this.name = new String() ;
		this.mouseOut = new Image() ;
		this.mouseOvr = new Image() ;
	}


	// -----------------------------------------------------------------------------------------------
	// flipImage()
	// -----------------------------------------------------------------------------------------------
	// Purpose:
	//
	// 		to swap highlight and lowlight images on mouse rollover movements
	// -----------------------------------------------------------------------------------------------
	// Parameter List:
	//
	// 		oImg -- object -- reference to Image element in this page over which the mouse is rolling
	// -----------------------------------------------------------------------------------------------
	//
	function flipImage( oImg )
	{
		if( !oImg ) return ;

		var tmp = new Image() ; 						// create a temporary Image object
		for( var i = 0; i < pmImages.length; i++ )		// loop through all of the elements in the object array
		{
			if( oImg.name == pmImages[i].name )			// test the name against each element of the object array
			{
				tmp = oImg.src ; 						// store the images current source to temporary element
				oImg.src = pmImages[i].mouseOvr.src ;	// store the 'mouseOver' source from the array to the element's source
				with( pmImages[i] ) 					// swap the 'mouseOvr' and 'mouseOut' sources in the array:
				{
					mouseOut.src = mouseOvr.src ;		// 'mouseOvr' --> 'mouseOut'
					mouseOvr.src = tmp ;				// 'tmp.src'  --> 'mouseOvr'
				}
				return ; 								// exit the function
			}
		}
	}

	// -----------------------------------------------------------------------------------------------
	// preloadImages()
	// -----------------------------------------------------------------------------------------------
	//
	// Purpose:
	//
	// 		to preloaded images in the page
	// -----------------------------------------------------------------------------------------------
	// Parameters List:
	//
	// 	 •
	// -----------------------------------------------------------------------------------------------
	// Remarks:
	//
	//	 • used by rollovers on the page
	//	 • The following function receives the lists the elements on this page with images assigned to them.
	//	 • The order of this list is unimportant.
	//	 • The physical (display) order is determined by the HTML arrangement.
	//
	//	 • The sole purpose of this list is to give the routine a chance 
	//	   to preload the images for each element named in this list.
	//	 • The elements listed here have corresponding images in the 'images/site/' folder and are 
	//     named with the following logic scheme:
	//
	//	 • elementName.gif	-- for onMouseOut conditions
	//	 • elementName_.gif -- for onMouseOver conditions
	//
	// -----------------------------------------------------------------------------------------------
	// History:
	//
	//	 • 11.06.2001 -- threedeadflies@hotmail.com -- wrote the function 
	//	 • 05.31.2002 -- threedeadflies@hotmail.com -- modified the function to use a global list of 
	//		rollovers and combine that list with a 'page-specific' list of rollovers, if any exist.
	// -----------------------------------------------------------------------------------------------
	//
	function preloadImages()
	{	
		var nElements = 0 ;
		var sImgPath = "images/site/" ;
		var pmLinks = new Array() ;
		var s = new String() ;
		var sTemp = new String(sLinkList) ;
		
		prepNavRolloversList() ; // call the routine that prepares the rollover list
		
		// contatonate any 'page-specific' rollovers:
		
		s = ( ( sTemp.length > 0 ) ? (new String(sNavRollovers + ":" + sTemp)) : sNavRollovers ) ;
		
		pmLinks = s.split(":") ;
		// -----------------------------------------------------------------------------------------------
		// loop through the pmLinks array
		// assign images to each array element 
		// assign each array element to an HTML element
		// -----------------------------------------------------------------------------------------------
		for( var n = 0; n < pmLinks.length; n++, nElements++ )
		{
			var sMOutImg = sImgPath + pmLinks[n] + ".gif" ;		// imagename.gif
			var sMOvrImg = sImgPath + pmLinks[n] + "_.gif" ;	// imagename_.gif
			assignImage(pmLinks[n], sMOutImg, sMOvrImg, pmImages, nElements) ;
		}
	}


	// -----------------------------------------------------------------------------------------------
	// insertLineBreaks()
	// -----------------------------------------------------------------------------------------------
	// 
	// Purpose:
	//
	//	 • to dynamically break a text string into pieces that will fit in a specific-width SPAN element
	// -----------------------------------------------------------------------------------------------
	// Parameters List:
	//
	//	 • strText	string -- description of the link which we will chop into pieces to fit in the SPAN 
	// -----------------------------------------------------------------------------------------------
	// Remarks:
	//
	//	 • used by rollovers on the page
	//	 • break the string into chunks at complete words -- IOW, break the line at spaces only.
	// -----------------------------------------------------------------------------------------------
	// History:
	//
	//	 • 11.06.2001 -- threedeadflies@hotmail.com -- wrote the function 
	// -----------------------------------------------------------------------------------------------
	//
	function insertLineBreaks( strText )
	{
		var nBreakPoint = 21 ; 	// break the line at a maximum of 22 characters
    	var s = new String() ;	// create a new string
    	s = strText ; 			// put the received string into a string object variable
    	var sTemp = new String() ; // create a new string
    	var i = 0 ; 			// index variable
    
    	if( s.length == 0 ) return "" ; // nothing received so just return an empty string
        
      	strText = "" ; 			// clear the received string variable
    
    	while( s.length > nBreakPoint )
    	{
        	for( i = nBreakPoint; i > 0; i-- )
        	{
            	if( s.charAt(i) == " " ) // look for a space character
            	{
					sTemp = s.substr(0, i) + "<br/>" ;  // store the used portion
              	s = s.substr( i + 1, ( s.length - ( i + 1 ) ) ) ; // trim off the used portion of the string
               	break ;   		// we found a space so exit the loop
				}
			}
        	strText += sTemp ;  // append the new portion of string to the storage variable
        	sTemp = "" ; 		// reinitialize the variable
    	}
    
    	if( s.length > 0 ) strText += s ;
    
   		return(strText) ;
	}
		
	// ------------------------------------------------------------------------------------
	// openWindow
	// ------------------------------------------------------------------------------------
	// Parameter List:
	//
	//	• sURL			string -- the url of the file whose contents to display in the new window
	//	• nWidth		number -- the width of the new window in pixels
	//	• nHeight		number -- the height of the new window in pixels
	// 	• bResizable	boolean -- 0 or 1, indicates if the window is to be resizable 
	// 	• bStatus		boolean -- 0 or 1, indicates if the window is to have a status bar
	// 	• bMenubar		boolean -- 0 or 1, indicates if the window is to have a menu bar
	// 	• bToolbar		boolean -- 0 or 1, indicates if the window is to have a tool bar 
	// ------------------------------------------------------------------------------------
	// Remarks:
	//
	//	• Creates a new window and puts the contents of the file found at sURL in the window.
	//	• Has options preset regarding the window's menus, toolbars, etc. 
	//	• Centers the new window on the screen.
	// ------------------------------------------------------------------------------------
	// Requirements:
	//
	//	•
	// ------------------------------------------------------------------------------------
	// History:
	//
	//	• 03.06.2002 -- threedeadflies@hotmail.com -- wrote the function
	// ------------------------------------------------------------------------------------
	//
	function openWindow( sURL, nWidth, nHeight, bResizable, bStatus, bMenubar, bToolbar, bScrollbars, sWinName) 
	{ 
		var nLeft = ( screen.availWidth - ((nWidth) ? nWidth : 700) ) / 2 ;  
		var nTop = ( screen.availHeight - ((nHeight) ? nHeight : 600) ) / 2 ; 
	
		var oWnd = window.open( sURL, ((sWinName)?sWinName:"dlgMain"), "resizable=" + ((bResizable)?bResizable:0) + ", status=" + ((bStatus)?bStatus:0) + ", menubar=" + ((bMenubar)?bMenubar:0) + ", toolbar=" + ((bToolbar)?bToolbar:0) + ", left=" + nLeft + ", top=" + nTop + ", width=" + nWidth + ", height=" + nHeight + ", scrollbars=" + ((bScrollbars)?bScrollbars:0), true ) ; 
	
		return(oWnd); 
	} 


//-->	

