var hColor = '#454545';
function hilite(element) {
	obj = document.getElementById(element);
	obj.style.backgroundColor = hColor;
}
function unHilite(element) {
	obj = document.getElementById(element);
	obj.style.backgroundColor = '';
}

comments = Array();
comments[1]='Mike, Tom &amp; Rich - Live at The Garage - Photo By Ian Marchant';
comments[2]='Tom - Photo By Louise Macdonald';
comments[3]='Tom, Rich &amp; Ben - Photo By Nick Gough';
comments[4]='Mike &amp; Tom - Photo By Nick Gough';
comments[5]='Tom - Photo By Louise Macdonald';
comments[6]='Mike - Photo By Louise Macdonald';
comments[7]='Tom - Photo By Louise Macdonald';
comments[8]='Tom - Photo By Louise Macdonald';
comments[10]='Rich - Photo By Dawsy';
comments[11]='Tom - Photo By Dawsy';
comments[12]='Tom - Photo By Dawsy';
comments[13]='Mike - Photo By Colin Smith';
comments[14]='Tom &amp; Rich - Photo By Colin Smith';
comments[15]='Ben - Photo By Dawsy';
comments[16]='Rich - Photo By Dawsy';
comments[17]='Mike &amp; Tom - Photo By Colin Smith';
comments[18]='Mike - Photo By Karolina';
comments[19]='Mike &amp; Ben - Photo By Colin Smith';
comments[20]='Tom - Photo By Colin Smith';

gallerySize=20;
var thisImage=20;

function swapImage(img) {
	galObj = document.getElementById('gallery_main_image');
	galObjLink = document.getElementById('gallery_main_image_link');
	galObjCom = document.getElementById('image_comment');
	galObj.src = 'images/gallery/suzerain-g-'+img+'.jpg';
	galObjLink.href = 'images/gallery/suzerain-g-'+img+'.jpg';
	galObjCom.innerHTML = comments[img];
	thisImage=img;
	//alert (thisImage);
}

function nextImg() {
	if (thisImage!=1)
	{ swapImage(thisImage-1); }
	else { swapImage(20); }
}

function prevImg() {
	if (thisImage!=gallerySize)
	{ swapImage(thisImage+1); }
	else { swapImage(1); }
}

function validateTickets()
{
  qty=document.getElementById('tickets_qty').value;
  if((qty.match(/^\d+$/))&&(qty>0)) { return true; } else { alert('Sorry - bad quantity'); return false; }
  return false;
}


function recordOutboundLink(link, category, action) {
  try {
    var pageTracker=_gat._getTracker("UA-267602-1");
    pageTracker._trackEvent(category, action);
    setTimeout('document.location = "' + link.href + '"', 100)
  }catch(err){}
}
