// JavaScript Document

function Hilite(obj, mode, id)
{
	//obj.style.backgroundImage= mode?'url(/images/menu_bg_over.gif)':'url(/images/menu_bg.gif)' ; 
	obj.style.color=mode?'#ffffff':'#000000';
	obj.style.backgroundImage= mode?'url(/images/menu_bg_over.gif)':'url(/images/menu_bg.gif)' ; 
	obj.style.cursor='pointer';
	if (document.getElementById(id) != null)
		document.getElementById(id).style.color=mode?'white':'black';
}

function Update(name)
{
		var obj = document.getElementById(name);
		if(obj==null)return;
		if(obj.style.display=='none')
				obj.style.display= 'block';
		else
			obj.style.display = 'none';
}

function CAsyncLoader(funcCallbackReqChange, data)
{
    this.req = window.XMLHttpRequest ? new XMLHttpRequest():(window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null); 
	var content = this.req;
	this.req.onreadystatechange = function ()
	{
			try
			{
				if(content.readyState == 4)
				{
					if(content.status == 200)
					{
						if(funcCallbackReqChange)funcCallbackReqChange(data, content.responseText);
					}
				}	
			}
			catch(e)
			{
				alert('ajax error' + e);
				content = null;
				return;
			}
	}	   
	
	this.StartLoad = function (url)
	{
		content.open("POST", url, true);
		content.send(null);
	}
}
