// This javascript module requires the dab_common.js module

var imagesTabList = new Array();
imagesTabList[imagesTabList.length] = "imagesTab::DigitalImages";
imagesTabList[imagesTabList.length] = "imagesTab::Slideshows";
imagesTabList[imagesTabList.length] = "imagesTab::Size";
imagesTabList[imagesTabList.length] = "imagesTab::License";

function enableImagesTab (tabId, resetHash)
{
  for ( var i=0; i < imagesTabList.length; i++ )
  {
	switchTabs( tabId, imagesTabList[i] );
  }
  if (resetHash)
  {
  	setHash( tabId );
  }
}


function setHash (tabId)
{
	var hash = tabId.substr(tabId.lastIndexOf(":")+1);
	if (typeof hash != "undefined" && hash != "")
	{
		if (hash == "DigitalImages")
		{
			location.hash = "";
		}
		else
		{
			location.hash = hash;
		}
	}
}


function selectInitialTab()
{
	var hash = location.hash;
	if (typeof hash != "undefined" && hash != "")
	{
		if (hash == "#Slideshows")
		{
			enableImagesTab( "imagesTab::Slideshows", false );
		}
		else if (hash == "#Size")
		{
			enableImagesTab( "imagesTab::Size", false );
		}
		else if (hash == "#License")
		{
			enableImagesTab( "imagesTab::License", false );
		}
	}
}

