
function hideAllBeerArrows(){
  for (var i=1; i < 14; i++){
    $("arrow" + i).toggle();
  }
}

function toggleBeerArrow(beer){
  $("arrow" + beer).toggle();
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("main-nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function findImgInputs(oParent)
{
   var oChildren = oParent.children
   if (oChildren)
   {
      for (var i=0; i < oChildren.length; i++ )
      {
         var oChild = oChildren(i)
         if ((oChild.type == 'image') && (oChild.src))
         {
             var origSrc = oChild.src
             oChild.src = strGif
             oChild.style.filter = strFilter + "(src='" + origSrc + "')"
         }
         findImgInputs(oChild)
      }
   }
}

setHovers = function() {
  if (document.all&&document.getElementById) {
    navRoot = document.getElementById("nav");
    for (i=0; i<navRoot.childNodes.length; i++) {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI") {
        node.onmouseover=function() {

          this.className+=" over";
        }
        node.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
      }
    }
  }
}

setHovers2 = function() {
  if (document.all&&document.getElementById) {
    navRoot = document.getElementById("secondary-nav");
    for (i=0; i<navRoot.childNodes.length; i++) {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI") {
        node.onmouseover=function() {

          this.className+=" over";
        }
        node.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
      }
    }
  }
}


var popup;

function wheatyPopup(url, w, h){
	
	if(popup) popup.close();
	
	popup = window.open(url, "fileWindow",
                            "menubar=no, toolbar=no, location=no, scrollbars=no, status=no, resizable=no, width="+w+", height="+h);
	
	popup.focus();

   
}


function helpPopup(help_item, for_question){
  
  var w = 415;
  var h  = 389;
  
  if (for_question){
    url = "/help/" + help_item;
  } else {
    url = "/help/detail?help=" + help_item;
  }

  if(popup) popup.close();

  popup = window.open(url, "popup",
                            "menubar=no, toolbar=no, location=no, scrollbars=no, status=no, resizable=no, width="+w+", height="+h);

  popup.focus();

   
}

function fishyBackground(){
  return $('subscribe-bg');
}


function moreFish(){
  fishyBackground().setStyle({"background-position":"0 -107px"});

}

function lessFish(){
  fishyBackground().setStyle({"background-position":"0 -214px"});
}

function normalFish(){
  fishyBackground().setStyle({"background-position":"0 0"});
}
