var LastKeyPress = '';

function GetElementHeight (elm_id)
{
  if (!elm)
    return 0;
	
	var elm = document.getElementById(elm_id);

  if (document.layers)
  {
    if (!elm.height)
      elm.height = elm.clip.height;
    return elm.height;
  }
  else if (typeof(elm.style && elm.style.height) == 'number')
  {
    return elm.style.height;
  }
  else if (typeof(elm.style && elm.style.height) == 'string' && !isNaN(parseInt(elm.style.height)))
  {
    return parseInt(elm.style.height);
  }
  else if (elm.offsetHeight)
  {
    return elm.offsetHeight;
  }
  else if (typeof(elm.style && elm.style.pixelHeight) == 'number')
  {
    return elm.style.pixelHeight;
  }
  else if (elm.clientHeight)
  {
    return elm.clientHeight;
  }

  return 0;
}

function swap(container_show, container_hide, linkobject)
{
	//alert(container_show + "\n" + container_hide);
	document.getElementById(container_show).style.display = 'inline';
	document.getElementById(container_hide).style.display = 'none';
	
	var links = document.getElementById('fahrzeugschein').getElementsByTagName('A');
	
	for(var i=0;i < links.length; i++)
	{
		links[i].style.textDecoration='none';
	}
	//linkobject.style.textDecoration='underline';
}

function HideContainer(container_hide)
{
	document.getElementById(container_hide).style.display = 'none;';
}

function KeySubmit(event)
{
	event = event || window.event;
	LastKeyPress = event.keyCode;
	//alert(event.keyCode);
}

function SubmitFahrzeugscheinOnEnter()
{
	if(LastKeyPress==13)
	{
		getFsList();return false;
	}
}