//browser detection



// new window


function newWin(url) {
	
	newwindow = window.open(url);
	
	}

// preload images

if ( document.images ) {

Image1= new Image(155,30) // image width and height (xx,yy)
Image1.src = "http://www.loghouseinn.com/images/navActive.jpg" // change to final url ( ex: http://www.yourdomain.com/images/imagename

Image2= new Image(155,30)
Image2.src = "http://www.loghouseinn.com/images/tourActive.jpg"

Image3= new Image(155,30)
Image3.src = "http://www.loghouseinn.com/images/ratesActive.jpg"

Image4= new Image(155,30)
Image4.src = "http://www.loghouseinn.com/images/businessActive.jpg"

Image5= new Image(155,30)
Image5.src = "http://www.loghouseinn.com/images/exploreActive.jpg"

Image6= new Image(155,30)
Image6.src = "http://www.loghouseinn.com/images/storiesActive.jpg"

Image6= new Image(235,44)
Image6.src = "http://www.loghouseinn.com/images/eventdetActive.jpg"

Image7= new Image(235,44)
Image7.src = "http://www.loghouseinn.com/images/checkAvActive.jpg"

Image8= new Image(930,360)
Image8.src = "http://www.loghouseinn.com/images/ratesheader.jpg"

Image9= new Image(32,32)
Image9.src = "http://www.loghouseinn.com/images/icons/moneyexchngHover.jpg"

Image10= new Image(930,361)
Image10.src = "http://www.loghouseinn.com/images/businessheader.jpg"

Image11= new Image(74,68)
Image11.src = "http://www.loghouseinn.com/images/directionsActive.jpg"

Image12= new Image(930,361)
Image12.src = "http://www.loghouseinn.com/images/directionsHead.jpg"

Image13= new Image(74,68)
Image13.src = "http://www.loghouseinn.com/images/hwy99Active.jpg"

Image14= new Image(74,68)
Image14.src = "http://www.loghouseinn.com/images/weatherActive.jpg"

Image15= new Image(930,361)
Image15.src = "http://www.loghouseinn.com/images/eventsHeader.jpg"

}
		
	
// navigation


function activestate(id) {

	var home = document.getElementById('home');
	var tour = document.getElementById('tour');
	var rates = document.getElementById('rates');
	var business = document.getElementById('business');
	var explore = document.getElementById('explore');
	var stories = document.getElementById('stories');
	
	
	switch ( id ) {
	
	
	case "home":
			home.style.background = "url(./images/navActive.jpg) no-repeat";
			home.style.fontWeight = "bold";
			document.getElementById('homelink').style.color = "#000000";
			document.getElementById('homelink').style.fontSize = "11px";
			break
	
	case "tour":
			tour.style.background = "url(./images/tourActive.jpg) no-repeat";
			tour.style.fontWeight = "bold";
			document.getElementById('tourlink').style.color = "#000000";
			document.getElementById('tourlink').style.fontSize = "11px";
			break
			
	case "rates":
			rates.style.background = "url(./images/ratesActive.jpg) no-repeat";
			rates.style.fontWeight = "bold";
			document.getElementById('rateslink').style.color = "#000000";
			document.getElementById('rateslink').style.fontSize = "11px";
			break
			
	case "business":
			business.style.background = "url(./images/businessActive.jpg) no-repeat";
			business.style.fontWeight = "bold";
			document.getElementById('businesslink').style.color = "#000000";
			document.getElementById('businesslink').style.fontSize = "11px";
			break
			
	case "explore":
			explore.style.background = "url(./images/exploreActive.jpg) no-repeat";
			explore.style.fontWeight = "bold";
			document.getElementById('explorelink').style.color = "#000000";
			document.getElementById('explorelink').style.fontSize = "11px";
			break
			
	case "stories":
			stories.style.background = "url(./images/storiesActive.jpg) no-repeat";
			stories.style.fontWeight = "bold";
			document.getElementById('storieslink').style.color = "#000000";
			document.getElementById('storieslink').style.fontSize = "11px";
			break
			
	default:
			document.getElementById(id).style.background = "url(./images/navbg.jpg) no-repeat";
			
		}
		
		
	}
	
function normalstate(id) {
	
	var home = document.getElementById('home');
	var tour = document.getElementById('tour');
	var rates = document.getElementById('rates');
	var business = document.getElementById('business');
	var explore = document.getElementById('explore');
	var stories = document.getElementById('stories');
	
	switch ( id ) {
	
	
	case "home":
			home.style.background = "url(./images/navbg.jpg) no-repeat";
			home.style.fontWeight = "normal";
			document.getElementById('homelink').style.color = "#ffffff";
			document.getElementById('homelink').style.fontSize = "12px";
			break
	
	case "tour":
			tour.style.background = "url(./images/navbg.jpg) no-repeat";
			tour.style.fontWeight = "normal";
			document.getElementById('tourlink').style.color = "#ffffff";
			document.getElementById('tourlink').style.fontSize = "12px";
			break
			
	case "rates":
			rates.style.background = "url(./images/navbg.jpg) no-repeat";
			rates.style.fontWeight = "normal";
			document.getElementById('rateslink').style.color = "#ffffff";
			document.getElementById('rateslink').style.fontSize = "12px";
			break
			
	case "business":
			business.style.background = "url(./images/navbg.jpg) no-repeat";
			business.style.fontWeight = "normal";
			document.getElementById('businesslink').style.color = "#ffffff";
			document.getElementById('businesslink').style.fontSize = "12px";
			break
			
	case "explore":
			explore.style.background = "url(./images/navbg.jpg) no-repeat";
			explore.style.fontWeight = "normal";
			document.getElementById('explorelink').style.color = "#ffffff";
			document.getElementById('explorelink').style.fontSize = "12px";
			break
			
	case "stories":
			stories.style.background = "url(./images/navbg.jpg) no-repeat";
			stories.style.fontWeight = "normal";
			document.getElementById('storieslink').style.color = "#ffffff";
			document.getElementById('storieslink').style.fontSize = "12px";
			break
			
	default:
			document.getElementById(id).style.background = "url(./images/navbg.jpg) no-repeat";
			
		}


	}
	
	
	
// email club form


function emailClub(id) {

	var emailClubDiv = document.getElementById(id);

	if ( emailClubDiv.style.display != "block" ) {
	
		emailClubDiv.style.display = "block";
	
	} else {
		
		emailClubDiv.style.display = "none";
		
		}
	
	
	}