function syncNavBar()
{
if (document.getElementById)	
	{

	//hilight navbar link
	if(window.navSection)
		{
			activeLink = document.getElementById(navSection)
			activeLink.className = 'active';	
		}
				
	
	path = location.href
	dot = path.lastIndexOf('.')
	slash = path.lastIndexOf('/')
	
	//hilight subnav link
	docName = path.substr( (slash +1), (dot - slash -1) ) // start,length

	if( activeSubLink = document.getElementById(docName) )
		{
			activeSubLink.className= 'active';
			activeSubLink.removeAttribute('href')
		}
	
	
	}
	
}



function viewFloorplan(link)
{
window.open(link.href,'floorplan','menubar=0,resizable=1,width=600,height=520,toolbar=no,scrollbars=yes');
return false;
}

function openRegister()
{
/*window.open('http://www.mylasso.com/Signups/dreamcatcher_signup.php','register','menubar=0,resizable=1,width=752,height=600,toolbar=no,scrollbars=yes');
return false;*/
}


function insertFlashBanner()
{

if(document.getElementById ) 
	{
		dom = true
	}

/*if (navigator.userAgent.indexOf('Opera') != -1)
	{
		flashCanOverlap = true
	}
else{flashCanOverlap = true}*/

var banner

if( (dom == true) && (!window.noBanner) )
							   
	{
		bannerPhoto = document.getElementById("banner").firstChild
		while(bannerPhoto.nodeName !="IMG")
			{
				bannerPhoto = bannerPhoto.nextSibling
			}
		
bannerList = new Array('branches', 'leaves', 'mountains', 'clouds', 'landscape', 'trees', 'golf','hike','fish','ski')

var num
function randomize()
	{
	num = Math.floor( Math.random() * bannerList.length)
		if(num == top.window.name)
		{
		randomize()	
		}
	}

randomize()

banner = bannerList[num]
top.window.name = num	
	

if (window.bannerMovie)
	{
		banner =  bannerMovie
	}

baseFolder = "../swf/"
address = "../swf/" + banner + ".swf"


//root folder pages	
lastSlash = location.href.lastIndexOf('/') 
secondLastSlash = location.href.lastIndexOf('/', lastSlash-1)
containingFolder= location.href.substring(secondLastSlash +1, lastSlash)
if( containingFolder.indexOf('publish') != -1 || containingFolder.indexOf('.com') !=-1 )
	{
		baseFolder =  "swf/"
		address = "swf/" + banner + ".swf"
	}

if (window.homepage) //homepage
	{
		baseFolder =  "swf/"
		address = "swf/intro.swf"
	}
		
		var so = new SWFObject(address, "movie", bannerPhoto.width, bannerPhoto.height , "8", "#DCCDB0"); // SWFmovie, id, width, height, version, background
		so.addParam("scale","noscale");
		so.addParam("base", baseFolder);
		so.addParam("wmode","opaque");
		if(window.largePhotos)
			{so.addVariable("largePhotos", largePhotos);}
		if(window.smallPhotos)
			{so.addVariable("smallPhotos", smallPhotos);}
		
		so.write("banner");
	}
}

function openSitemap()
{
window.open('siteplan.htm','sitemap','menubar=0,resizable=1,width=770,height=590');
return false;
}


function createExpandableItems()
{
	$('.collapsed-item').hide()
	$('.expand-link').click(function(){
		$(this).toggleClass('expanded').next().slideToggle();
	})
}