
// <!-- 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") ; 
		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); 
	} 
	// -----------------------------------------------------------------------------------------------
	// getDescription()
	// -----------------------------------------------------------------------------------------------
	// Purpose:
	//
	//	 • to dynamically assign text to a SPAN element -- the link description that displays in a box
	// -----------------------------------------------------------------------------------------------
	// Parameters List:
	//
	// 	 • sLink		string -- name of the link about which we will select a description
	// -----------------------------------------------------------------------------------------------
	// Remarks:
	//
	//	 • used by rollovers on the page "Links.asp"
	//	 • the other file that needs to be altered when you add a new link is 'linkRollovers.asp'
	// -----------------------------------------------------------------------------------------------
	// History:
	//
	//	 • 11.06.2001 -- threedeadflies@hotmail.com -- wrote the function 
	// -----------------------------------------------------------------------------------------------
	//
	function getDescription( sLink )
	{
		var sLinkDesc = new String( sLink ) ;
		
		switch( sLink )
		{
			case "InvFenNW" :
				sLinkDesc = "Invisible Fence strives to keep pets safe and happy, provide their owners peace of mind and help companion animals be companions for life. Endorsed by Roger Caras, President of the ASPCA, Invisible Fence is the premier pet containment system on the market. Remember: there are many pet containment systems you can't see; but there is only ONE Invisible Fence brand system!" ;
				break ;
			case "Delta" :
				sLinkDesc = "Delta Society is the leading international resource for the human-animal bond. Their Pet Partners program trains volunteers and screens their pets for visiting animal programs in hospitals, nursing homes, rehabilitation centers, and schools." ; 
				break ;
			case "APDT" :
				sLinkDesc = "The Association of Pet Dog Trainers (APDT) is a professional organization of individual trainers who are committed to becoming better trainers through education." ;
				break ;
			case "Anne" :
				sLinkDesc = "Anne is the premier supplier of animal actors in the Northwest. Her animals have been featured in numerous major motion pictures, TV series, national TV commercials, and still pictures for printed media." ;
				break ;
			case "GreatPets" :
				sLinkDesc = "GreatPets.com was founded by Brian Kilcommons and Sarah Wilson, world-famous authors of <i>Paws to Consider</i>, <i>Good Owners, Great Dogs</i>, <i>Good Owners, Great Cats</i>, and most recently <i>Metro Dogs</i>. It is the best web location for the exchange of high quality information about responsible pet ownership and training." ;
				break ;
			case "Paws" :
				sLinkDesc = "Paws For Health is owned by Dave and Dotti Snow. They run a program providing courses and team evaluations for people and their dogs for certification as Pet Partners registered with the Delta Society." ;
				break ;
			case "SeattleHumane" :
				sLinkDesc = "The Humane Society for Seattle/King County is dedicated to preventing cruelty to animals through animal welfare programs and services." ;
				break ;
			case "AKC" :
				sLinkDesc = "The American Kennel Club's website's theme is &quot;For the Love of the Purebred Dog&quot;. The simplest reason why someone chooses to live with a dog is because of an inherent love for man's four-legged best friend." ;
				break ;
			case "OFA" :
				sLinkDesc = "The OFA objectives are to collate and disseminate information concerning orthopedic and genetic diseases of animals and to advise, encourage and establish control programs to lower the incidence of orthopedic and genetic diseases." ;
				break ;
			case "SPDR" :
				sLinkDesc = "A non-profit referral organization dedicated to placing unwanted purebred dogs into suitable homes, and preventing unwanted purebreds from overloading the shelter system." ;
				break ;				
			case "AFD" :
				sLinkDesc = "Trainer Karen Pomerinke is a dedicated, talented dog trainer who lives in the Monroe, WA area. If you're looking for an excellent dog trainer in North King County or Snohomish County, one who greatly values your dog's well being during training, Karen is perfect!" ;
				break ;				
			case "CK" :
				sLinkDesc = "Cascade Kennels, located in Woodinville, WA, provides a full line of pet services including group training classes, grooming, and boarding. For excellent pet care, check out Cascade Kennels." ;
				break ;				
			case "TDI" :
				sLinkDesc = "Therapy Dogs International is the oldest and largest therapy dog organization. Founded in 1976, its members can be found all over the world. TDI is a volunteer group organized to provide qualified handlers and their Therapy Dogs for visitations to institutions, facilities, and any other place where Therapy Dogs are needed." ;
				break ;				
			case "PSH" :
				sLinkDesc = "Pasado&rsquo;s Safe Haven is one of the country&rsquo;s premiere animal sanctuaries dedicated to the rescue and rehabilitation of dogs, cats, and factory farm animals." ;
				break ;				
			case "RED" :
				sLinkDesc = "R.E.D. (Rescue Every Dog) is a support group for rural animal shelters who do not have the necessary staff or funding to provide adequate space, medical care and adoption capability for the number of animals they receive. Saving highly adoptable companion animals that are to be euthanized in such shelters is R.E.D.'s top priority." ;
				break ;				
			case "NP" :
				sLinkDesc = "NetPets.org is a Non-Profit 501(c)3 corporation and through YOUR donations is able to be: your complete internet pet connection for... birds, dogs, cats, horses, and fish. Together, we CAN make a difference!" ;
				break ;				
			case "GTG" :
				sLinkDesc = "Are you crunched for time? Need help maintaining your busy life? Or are there errands that you just don't want to do? The Go To Gal is an errand running service that helps you create time...time for you!" ;
				break ;				
			case "WMD" :
				sLinkDesc = "The Well-Mannered Dog, Inc. is owned and run by Toni Kay-Wolff, a very well-known and well-respected dog trainer in Manhattan/Tri-Cities area of New York. We know, love, and trust Toni and you should too--if you're ever in the New York area!" ;
				break ;				
			case "TFD" :
				sLinkDesc = "The Family Dog is owned and run by Sarah Wilson, a world-renowned and well-respected dog trainer, author, lecturer, and teacher in upstate New York. We know, love, and trust Sarah and you should too--if you're ever in the upstate New York area!" ;
				break ;				
			case "LAPAW" :
				sLinkDesc = "Does your dog have an injury or chronic condition that would benefit from swimming, warm water massage, range of motion work and other non-weight bearing exercise? Does your dog love to swim? Or does your dog just love the simple luxuries in life? That is what we are here for! Every dog could benefit from a visit to the spa!" ;
				break ;				
			case "UM" :
				sLinkDesc = "You've undoubtedly seen the standard motivational posters that contain scenic landscapes and pictures of men accomplishing superhuman feats. For many of us, those &quot;motivational experiences&quot; seem a bit out of reach. But this is something completely different. We’ve combined unique dog photos (some stunningly beautiful and some outrageously funny) with perfect quotes to match. The result is something that everyone can relate to... and it's a whole new way to express yourself!" ;
				break ;				
			case "PID" :
				sLinkDesc = "Dogs and cats should never be without a Pet ID Tag. Pet ID Tags lets you create a custom tag in minutes. Protect your pet--buy them fine Pet ID Tags." ;
				break ;				
			case "CCI" :
				sLinkDesc = "Canine Companions for Independence is a non-profit organization that enhances the lives of people with disabilities by providing highly-trained assistance dogs and ongoing support to ensure quality partnerships." ;
				break ;				
			case "WRL" :
				sLinkDesc = "Willoridge Labradors is where our very own Moose came from! Owner Greg Phillips is a great lover of the labrador breed and maintains the breed to the highest standards possible. His labradors are fine examples of the breed and have wonderful temperaments, excellent for families with children. We highly recommend Greg and Willoridge Labradors for your next labrador retriever pup!" ;
				break ;				
			case "SDZ" :
				sLinkDesc = "Sunydaze Labradors has been showing, working and breeding the English Type Traditional Labrador Retriever for over 14 years. They take pride in the temperaments and type they produce offering Labradors as companion gundogs, companion family dogs, show dogs, obedience dogs, service dogs, narcotics dogs, search &amp; rescue dogs and therapy dogs. They emphasize the importance of temperament, type and trainability." ;
				break ;				
			case "SPV" :
				sLinkDesc = "Our company was created to provide compassionate at-home veterinary care to pets on the Eastside and North End. We provide a kid-friendly and experienced veterinary staff to care for your animals in the comfort of their own home." ;
				break ;
			case "HHAH" :
				sLinkDesc = "We are committed to providing compassionate, high quality care for you and your pets. We want to be partners with you. We invite you to ask questions and be actively involved in every aspect of your pets’ healthcare." ;
				break ;
/*
			case "" :
				sLinkDesc = "" ;
				break ;
			case "" :
				sLinkDesc = "" ;
				break ;
			case "" :
				sLinkDesc = "" ;
				break ;
			case "" :
*/
			default :
				sLinkDesc = "" ; // for either of these two cases (the default or a blank variable)
		}
		linkDescription.innerHTML = insertLineBreaks( sLinkDesc ) ;
	}


//-->	

