// JavaScript Document
<!--


function toggleDivVis( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}


function setDivVis( whichLayer,val )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  vis.display = val;
}



function getElementsByAttribute(attr,val,container)
{
	container = container||document
	var all = container.all || container.getElementsByTagName("*")
	var arr = []
	
	for(var k=0;k<all.length;k++)
	{
		if(all[k].getAttribute(attr) == val)
		{
			arr[arr.length] = all[k];
		}
	}
	return arr
}



function getElementsByCondition(condition,container)
{
	container = container || document
	var all = container.all || container.getElementsByTagName("*")
	var arr = []
	for(var k=0;k<all.length;k++)
	{
		var elm = all[k]
		if(condition(elm,k))
		{
			arr[arr.length] = elm
		}
	}
	return arr
} 


function toggleElements(elem)
{
	for(var k=0;k<elem.length;k++)
	{
		vis = elem[k].style;

		if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
		vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
		vis.display = (vis.display==''||vis.display=='block')?'none':'block';
		
		//if(elem[k].style.display='none';	
	}
}


function replaceText( id, newText )
{
  //document.getElementById(id).textContent=(newText); 
  document.getElementById(id).childNodes[0].nodeValue=(newText);
}

//function getText( id )
//{
	//return( document.getElementById(id).childNodes[0] );
//}




	
	
//-->

