// 22 OCT 2004

var totalSPG = 0;
var SPG = new Array();
var SS_selected = 0;
var SS_lastnum  = 0;
var SS_imageDir = "images/";
var SS_imagePrefix       = "SS_spigot";
var SS_onSuffix          = "_ON.gif";
var SS_offSuffix         = "_OFF.gif";
var SS_selSuffix         = "_SEL.gif";
var SS_num;
var SS_top = 0;
var SS_currtop = 0;
var check = 0;



// --------------------- MAKE CHANGES ---------------------------------------

addSPG(180, 72, "_1", "Specialty IPA", "#special1","IPA","_top");
addSPG(180, 48, "_2", "Specialty Stout", "#special2","Stout","_top");
addSPG(180, 60, "_3", "Specialty Double Mash", "#special3","Double Mash","_top");
addSPG(180, 36, "_3.5", " ", "#top", " ", "_top");
addSPG(180, 60, "_4", "Grizzly", "#grizzly","Grizzly","_top");
addSPG(180, 48, "_5", "Extra Special Blizzard", "#ESB","Snowshoe ESB","_top");
addSPG(180, 60, "_6", "Thompson Pale Ale", "#thompson","Thompson Pale Ale","_top");
addSPG(180, 48, "_7", "Apricot Ale", "#apricot","Apricot Ale","_top");
addSPG(180, 72, "_8", "SnoWeizen Wheat Beer", "#weizen","SnoWeizen","_top");

// --------------------- END CHANGES -----------------------------------------



function writeSpigots()
{
	with(this.document)
	{
		write('<table border="0" bordercolor="blue" cellpadding="0" cellspacing="0" width="505" valign="top"><tr>');
		write('<td valign="top">');
		for(i = 0; i < totalSPG; i++)
		{
			write ('<a target="'+ SPG[i].target + '" href="' + SPG[i].link + '" onMouseOver="do_SPG_MouseOver(' + i + '); return true" onMouseOut="do_SPG_MouseOut(' + i + ')" onClick="do_SPG_Click(' + i + ')">');
			write ('<img vspace="2" name="' + SPG[i].name + '" src="' + SPG[i].offname + '" alt="' + SPG[i].alt + '" width="' + SPG[i].width + '" height="' + SPG[i].height + '" border="0">');
			write ('</a>');
		}
		write('</td></tr></table>');
	}
}


function SPGitem(height, width, name, infoText, link, alt, target)
{
  this.height   = height;
  this.width    = width;
  this.name     = name;
  this.info     = infoText;
  this.link     = link;
  this.on       = new Image (width, height);
  this.on.src   = SS_imageDir + SS_imagePrefix + name + SS_onSuffix;
  this.off      = new Image (width, height);
  this.off.src  = SS_imageDir + SS_imagePrefix + name + SS_offSuffix;
  this.offname  = SS_imageDir + SS_imagePrefix + name + SS_offSuffix;
  this.over     = new Image (width, height);
  this.over.src = SS_imageDir + SS_imagePrefix + name + SS_selSuffix;
  this.alt      = alt;
  this.target   = target;
  this.selected = 0;
  this.pos      = SS_currtop;
  SS_currtop += width;
}

function addSPG(height, width, name, infoText, link, alt, target)
{
  SPG[totalSPG] = new SPGitem(height, width, name, infoText, link, alt, target);
  totalSPG++;
}

function do_SPG_Click(SS_num)
{
  document.images[SPG[SS_num].name].src = SPG[SS_num].on.src;
  self.status = "";
}

function do_SPG_MouseOver(SS_num)
{
  document.images[SPG[SS_num].name].src = SPG[SS_num].over.src;
//  alert("over "+SPG[SS_num].over.src+" versus "+document.images[SPG[SS_num].name].src);
  self.status = SPG[SS_num].info;
}

function do_SPG_MouseOut(SS_num)
{
  document.images[SPG[SS_num].name].src = SPG[SS_num].on.src;
//  alert("out "+SPG[SS_num].on.src+" versus "+document.images[SPG[SS_num].name].src);
  self.status = "";
}


