
var  oldheight = 0;
  
  function setTarget(obj)
  {
    for(a = 0; a < document.links.length; a++)
    {
      if(document.links[a].name == obj.name)
        document.links[a].target = '_blank';
    }
  }
  
  function setSearchfield(obj)
  {
  	obj.value = '';
	obj.style.fontweight = 'normal';
  }
  
  function changeMenuLength()
  {
  	contentlength = document.getElementById("content").offsetHeight;
	menulength = document.getElementById("menu").offsetHeight;
	
	if(oldheight == 0)
	{
		oldheight = menulength;
	}
	
	//for hiding the margin in the content;
	contentlength = contentlength+10;
	
	if(menulength < contentlength)
	{
		document.getElementById("menu").style.height = contentlength+'px';
	}
	else
	{
		if(oldheight < contentlength)
		{
			document.getElementById("menu").style.height = contentlength+'px';
		}
		else
		{
			document.getElementById("menu").style.height = oldheight+'px';
		}
	}
  }
  
  /*function showSubmenu(headName, subName)
  {
  		headmenudiv = document.getElementById(headName);
		headmenudiv.style.backgroundColor = '#F5EBB0';
				
		submenudiv = document.getElementById(subName);
		submenudiv.style.position = 'absolute';
		submenudiv.style.marginLeft = '153px';
		submenudiv.style.marginTop = '-21px';
		
		submenudiv.style.display = 'block';
		submenudiv.style.borderTop = '1px solid #000000';
		submenudiv.style.borderRight = '1px solid #000000';
		submenudiv.style.borderLeft = '1px solid #000000';
		submenudiv.style.zIndex = 1000;
  }
  
  function hideSubmenu(headName, subName)
  {
  		headmenudiv = document.getElementById(headName);
		headmenudiv.style.backgroundColor = '#f3cc6d';
		
		submenudiv = document.getElementById(subName);
		submenudiv.style.display = 'none';
  }*/
