
function GalleryShowPic()
{
	if(document.getElementById)
	{
		var largepic = document.getElementById('placeholder');
		largepic.src = GalleryImages[GalleryCount-1][0];
		var text = document.getElementById('placeholderText');
		text.innerHTML = GalleryImages[GalleryCount-1][1];
    document.getElementById('galleryCounter').innerHTML = GalleryCount;
    document.getElementById('galleryPrevLink').style.display = (GalleryCount==1) ? "none" : "inline";
    document.getElementById('galleryNextLink').style.display = (GalleryCount==GalleryTotal) ? "none" : "inline";
		return false;
	}
	else
	{
		return true;
	}
}
var GalleryImages, GalleryCount, GalleryTotal;
function GallerySetup(imgs) {
	if(document.getElementById)
	{
    GalleryImages = imgs;
    GalleryCount = 1;
    GalleryTotal = GalleryImages.length-1;
    document.getElementById('galleryTotal').innerHTML = GalleryTotal;
    GalleryShowPic();
  }
}
function GalleryPrev() {
  if (document.getElementById && GalleryCount>1) {
    GalleryCount--;
    GalleryShowPic();
  }
}
function GalleryNext() {
  if (document.getElementById && GalleryCount<GalleryTotal) {
    GalleryCount++;
    GalleryShowPic();
  }
}
function showTab(tabOn, tabOff) {
	if(document.getElementById)
	{
    document.getElementById(tabOn).style.display = "block";
    document.getElementById(tabOff).style.display = "none";
    document.getElementById(tabOn+"Link").className  = "tabOn";
    document.getElementById(tabOff+"Link").className  = "tabOff";
	}
}