// start - bottom nav tab highlighting
var W3CDOM = (document.createElement && document.getElementsByTagName);

function showTab_temp(_tab)
{
	closeAllTabs_temp();
	var tabLeft = $('tabbar').getLeft() ; //39
  var tabTop = $('tabbar').getTop() -355;//- 393

	if( document.getElementById )
	{
		var _activeTab = document.getElementById(_tab);
	}
	else if( document.all )
	{
			var _activeTab = document.all[_tab];
	}
	if( navigator.appName == "Microsoft Internet Explorer" )
	{
		_activeTab.style.display="block";
		_activeTab.style.left = tabLeft;
  	_activeTab.style.top = tabTop;
	}
	else
	{
		_activeTab.setStyle('display','block');
		_activeTab.setStyle('top',tabTop);
		_activeTab.setStyle('left',tabLeft);
	}
}
function closeAllTabs_temp()
{
	for( var i = 1; i < 5; i++ )
	{
		var _currentTab = "tabs_tab"+i+"_subpage";
		if( document.getElementById && document.getElementById(_currentTab) )
		{
			document.getElementById(_currentTab).style.display='none';
		}
		else if(document.all && document.all[_currentTab])
		{
			document.all[_currentTab].style.display='none';
		}
	}
}

/*
var ids=new Array('podtab1_div','podtab2_div','podtab3_div');
function switchid(divId){
	hideallids();
	showdiv(divId);
    highlightTab(divId.substring(0, divId.length-4))
}
function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById && document.getElementById(id)) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers && document.id) { // Netscape 4
			document.id.display = 'none';
		}
		else if(document.all && document.all.id) { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id

	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}
*/
//end - showing and hiding divs


//choosing random pod image - start
/*
function displayRandom() {
  // uses the ids array from above
  var randIndex=Math.floor(Math.random()* ids.length);
  var divId = ids[randIndex];
  switchid(divId);
}
*/

/*
function highlightTab(targetBtnId) {
    var btnIds = new Array("1", "2", "3");

    for (var i = 0; i < btnIds.length; i++) {
      var id = btnIds[i];
      var btnId = "podtab" + id;
      var btnEl = document.getElementById(btnId);

      if (btnId == targetBtnId) {
        // target btn, so turn it on
        btnEl.className="podtabOn";

      } else {
        // other btns, so turn them off
        if(btnEl)
            btnEl.className="podtabOff";
      }
    }
  }
*/
//  window.addEvent('load', displayRandom);
  /*
  function displaySearchDiv() {
    var searchDivEl = $('searchDiv');
    setSearchDropDown(searchDivEl);
    searchDivEl.style.display="block";
  }

  function hideSearchDiv() {
    var searchDivEl = $('searchDiv');
    searchDivEl.style.display="none";
  }

  function debug(e) {
    var keycode=e.keyCode? e.keyCode : e.charCode
    alert(String.fromCharCode(keycode));
  }
*/
/*
  window.onload=function() {
    var searchInputEl = $('searchInput');
    searchInputEl.onfocus=displaySearchDiv;
    searchInputEl.onkeydown=hideSearchDiv;
    //searchInputEl.onkeydown=debug;

    var searchDivCloseEl = $('searchDivClose');
    searchDivCloseEl.onclick=hideSearchDiv;
  }
*/
