/*********************************************
 * GetXMLHttpObject(handler)
 * 
 * Returns AJAX object 
 *
 *********************************************/


function GetXmlHttpObject(handler)
{ 
   var objXMLHttp=null
   if (window.XMLHttpRequest)
   {
	   objXMLHttp=new XMLHttpRequest()
   }
   else if (window.ActiveXObject)
   {
	  objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
   }
   return objXMLHttp
}


function GetElementByID(id)
{
	var elem;  
	if( document.getElementById ) // this is the way the standards work
		elem = document.getElementById( id );  
	else if( document.all ) // this is the way old msie versions work      
	elem = document.all[id];  
	else if( document.layers ) // this is the way nn4 works    
	elem = document.layers[id];  
	return elem;
}


function ShowElementByID( id )
{  
	var element = GetElementByID(id);
	ShowElement(element);
}

function ShowElement(element)
{
	vis = element.style;  // if the style.display value is blank we try to figure it out here
	vis.display = 'block';
}

function HideElementByID( id )
{  
	var element = GetElementByID(id);
	HideElement(element);
}

function HideElement(element)
{
	vis = element.style;  // if the style.display value is blank we try to figure it out here
	vis.display = 'none';
}


function GetNodeValue(obj,tag)
{
	return obj.getElementsByTagName(tag)[0].firstChild.nodeValue;
}
