function myajax()
{
	this.toString = function() { return "myajax"; }
	this.makeRequest = function(_method, _url, _callbackMethod)
	{
	this.request = (window.XMLHttpRequest)? new XMLHttpRequest(): new ActiveXObject("MSXML2.XMLHTTP");
	this.request.onreadystatechange = _callbackMethod;
	if (this.request.overrideMimeType)
	{
		// set type accordingly to anticipated content type
		//http_request.overrideMimeType('text/xml');
		this.request.overrideMimeType('text/html');
	}
	this.request.open(_method, _url, true);
	this.request.send(_url);	
	}
}
function getElemRefs(id)
{
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}
function getidobj(idobj)
{
	var textobj = null ;
	
	textobj = getElemRefs(idobj) ;
	if (textobj != null) return (textobj) ;
	try
	{
		textobj = document.getElementById(idobj) ;
	}
	catch (e)
	{
		return null ;
	}
	return textobj ;
}
function setidtext(id,parm)
{
	var textobj = false ;
	try
	{
		textobj = getidobj(id) ;
	}
	catch (e) { return; }
	textobj.innerHTML = parm ;
}
function showLayer(id) 
{
		var lyr = getElemRefs(id);
		if (lyr && lyr.css) 
		{
			lyr.css.display = "block";
		}
}
function hideLayer(id)
{
		var lyr = getElemRefs(id);
		if (lyr && lyr.css)
		{
			lyr.css.display = "none";
		}
}
function getchilddiv(obj,id)
{
	var cnt = 0 ;
	var pass = 0 ;  
	var childnode = null ;
	
	if (obj == null) return null ;
	for (cnt = 0; cnt < obj.childNodes.length; cnt++)
	{
		childnode = obj.childNodes[cnt] ;
		if (childnode == null) break ;
		if (childnode.nodeType != 1) continue ;   	
		if (childnode.id != id) continue ;   
		return (childnode) ;  
	}
	return null ;
}
function setnavbar(parm1,parm2,parm3)
{
	var cnt = 0 ;
	var pass = 0 ;  
	var mainnode = null ;
	var divnode = null ; 
	var lastnode = null ;
	
	mainnode = getidobj(parm1) ;
	if (mainnode == null) return false ;
	divnode = getchilddiv(mainnode,parm2) ;
	if (divnode == null) return false ; 
	//IE 6 requires this loop, cannot do getchilddiv(obj,parm3)
	
	for( var x = 0; divnode.childNodes[x]; x++ )
	{
		lastnode = divnode.childNodes[x] ;
		//window.alert("setnavbarC2:"+x) ;     
		if (!lastnode.nodeType) 
		{
			continue ;
		}
		if( lastnode.nodeType != 1) 
		{
			continue ;
		}
		if(!lastnode.id) 
		{
			continue ;  
		}
		lastnode.id = parm3 ;
		return true ;
	} 
	return false ;
}
