// JavaScript Document

function createXMLHttpRequest() 
{
   try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
   try { return new XMLHttpRequest(); } catch(e) {}
   alert("XMLHttpRequest not supported");
   return null;
 }

function show_log ( date, type )
{
	var http_request = createXMLHttpRequest();

	http_request.onreadystatechange = function ( )
	{
		if ( http_request.readyState == 4 )
		{
			if ( http_request.status == 200 )
			{
				document.getElementById('logs').innerHTML = http_request.responseText ;
			}
		}
	}
	http_request.open ( 'POST' , 'http://'+window.location.hostname+'/admin/proc.print_log.php' , true ) ;
	http_request.setRequestHeader ( 'Content-Type' , 'application/x-www-form-urlencoded' ) ;
	http_request.send ( 'date=' + date + '&type= ' + type ) ;
}


function update_eventOLD ( )
{
	var http_request = createXMLHttpRequest();

	http_request.onreadystatechange = function ( )
	{
		if ( http_request.readyState == 4 )
		{
			if ( http_request.status == 200 )
			{
				if ( http_request.responseXML != '' )
				{
					var root_node = http_request.responseXML.getElementsByTagName('root');
					
					alert(root_node);
					
					//document.getElementById( 'event_next' ).innerHTML =  root_node.item(0).childNodes.item(1).firstChild.data ;
					
					
					//document.getElementById( 'event_rest' ).innerHTML = root_node.item(0).childNodes.item(3).firstChild.data ;
					
				}
			}
		}
	}
	http_request.open ( 'POST' , 'http://'+window.location.hostname+'/proc.event_nav_update.php' , true ) ;
	http_request.setRequestHeader ( 'Content-Type' , 'application/x-www-form-urlencoded' ) ;
	http_request.send ( 'date=true' ) ;
	
}
