var smaller = 0; // 0=> not set ; 1=>initially smaller ; 2=>initially larger
  
function setFooter()
{
  if ( smaller==1 )
    document.getElementById('pageHolder').style.height = 'auto';
  
  if (document.all && document.getElementById)
  {
	var totheight = parseInt(document.body.offsetHeight); //W3C standard (window.)innerWidth ?
	var pageheight = parseInt(document.getElementById('pageHolder').offsetHeight);
  }
  else
  {
	var totheight = parseInt(window.innerHeight); //W3C standard (window.)innerWidth ?
	var pageheight = parseInt(document.getElementById('pageHolder').offsetHeight);
  }
  
  if ( (totheight - pageheight)>0 && (smaller==0 || smaller==1) )
  {
    smaller = 1;
    document.getElementById('pageHolder').style.height = totheight + 'px';
  }
  else if ( smaller==0 )
  {
    smaller = 2;
  }
}

onresize = function() {setFooter();}
  
function goTo( url ) 
{
	document.location.href=url;
}

function change_menu_class(id)
{
	el = document.getElementById(id);
	if( el==null )
		return;
		
	if ( el.className.slice(-2)=='_a' )
		el.className = el.className.slice(0,el.className.length-2);
	else
		el.className = el.className + '_a';
}
