/*function showHide(show,hide){
	//alert(show+","+hide);
	document.getElementById(hide).style.display = 'none';
	document.getElementById(show).style.display = 'block';
}*/

//chk if an object is an array or not.
function isArray(obj)
{
  //returns true is it is an array
  if (obj.constructor.toString().indexOf("Array") == -1)
  {
    return false;
  }
  else
  {
    return true;
  }
}

var showthis = "";
var hidethis = "";
var prev = false;
function showHide(showthis, hidethis)
{
  //alert(showthis +"|"+ hidethis);
  if(showthis!='')
  {
    if(isArray(showthis))
    {
      for(s in showthis)
      {
        document.getElementById(showthis[s]).style.display = 'block';
      }
    }
    else
    {
      document.getElementById(showthis).style.display = 'block';
    }
  }
  if(hidethis!='')
  {
    if(isArray(hidethis))
    {
      for(i in hidethis)
      {
        document.getElementById(hidethis[i]).style.display = 'none';
      }
    }
    else
    {
      document.getElementById(hidethis).style.display = 'none';
    }
  }
  else if(prev != false)
  {
    //alert("prev="+prev);
    if(prev != showthis)
    {
      if(isArray(prev))
      {
        for(p in prev)
        {
          document.getElementById(prev[p]).style.display = 'none';
        }
      }
      else
      {
        document.getElementById(prev).style.display = 'none';
      }
        prev = showthis;
    }
  }
  else
  {
    //alert("prev 1st time="+prev);
    prev = showthis;
  }
}

function setTabs(current,other)
{
	var setThis;
	currentTab = "tab_" + current;
	currentInfo = "tab_info_" + current;
	for(t in other)
	{
		setThisTab = "tab_" + other[t];
		setThisInfo = "tab_info_" + other[t];
		document.getElementById(setThisTab).className = "";
		document.getElementById(setThisInfo).style.display = "none";
	}
	document.getElementById(currentTab).className = "current";
	document.getElementById(currentInfo).style.display = "block";
}

function getURL(url){
	window.location = url;
}
