// JavaScript Document
function updateCallback(xmlHttp, parm) {
	var txt = xmlHttp.responseText;
	var xml = xmlHttp.responseXML;
	var elm = document.getElementById( parm );
	if( !elm )
		return;
	elm.innerHTML = txt;
}


function NewAjaxObject()
{
	var xmlHttp;
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	} catch (e) {    // Internet Explorer
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("Your browser does not support AJAX!");
				return null;
			}
		}
	}
	return xmlHttp;
}

function AjaxRequestData( func, parm, async, req_get, req_post )
{
	var xmlHttp = NewAjaxObject();
	if( !xmlHttp )
	    return false;
	    
	xmlHttp.onreadystatechange = function() {
	    if( xmlHttp.readyState == 4 && xmlHttp.status == 200 ) {
		     func( xmlHttp, parm );
	    }
	};
	
	if( !req_post )
	{
		xmlHttp.open("GET", req_get, async);
		xmlHttp.send(null);
	} else {
		xmlHttp.open("POST", req_get, async);
		xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlHttp.setRequestHeader("Content-length", req_post.length);
		xmlHttp.setRequestHeader("Connection", "close");
		xmlHttp.send(req_post);
	}
	return true;
}

function change(id, value){
	
	var o = document.getElementById( id );
	if (o && value) o.innerHTML = value;
	
}

function register(){
	
	return false;

}

function chbg(id){
	
	var o = document.getElementById( id );
	if ( o ) {
		if ( !o.style.backgroundColor )
			o.style.backgroundColor = '#f8f8fe';
				else o.style.backgroundColor = '';
	}
}

function _foc(){
	
	var n = document.getElementById("name");
	if  (n) n.focus();
	
	var o = document.forms[0];
	if ( o )  { 
		oo = o.elements[0];
		if  ( oo ) oo.focus();
	}
	

}