// wine country directory
last_dir = 'dir_img';
function showWDir(id) {
	//show the supplied directory and make the previous dissappea
	new Effect.Fade(last_dir, {queue:'front'});
	new Effect.Appear(id, {queue:'end'});
	last_dir = id;
}

prev_cat = '';
function showTDir(id) {
	if(prev_cat != '') new Effect.Fade(prev_cat, {queue:'front'});
	new Effect.Appear(id, {queue:'end'});
	new Effect.Highlight(id, {queue:'end'});
	prev_cat = id;
}

//menu stay list
function stayLit(id) {
	document.getElementById(id).style.backgroundColor="#333";
}
function unLit(id) {
	document.getElementById(id).style.backgroundColor="";
}


/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

sffHover = function() {
	var sffEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sffEls.length; i++) {
		sffEls[i].onmouseover=function() {
			this.className+=" sffhover";
		}
		sffEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sffhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sffHover);

