
function show(timestamp)
{
	visible(timestamp,1);
}


function hide(timestamp)
{
	visible(timestamp,0);
}


function visible(timestamp,vis)
{
	var article	=document.getElementById('a' +timestamp);
//	var title	=document.getElementById('title'+timestamp);

	article.style.display=vis ? 'block' : 'none';
//	title.style.display	 =vis ? 'none'  : 'block';

	if (article.innerHTML=='')
	{
		article.innerHTML='getting article...';
		loadXMLDoc(timestamp);
	}
}


function toggle(timestamp)
{
	var article=document.getElementById('a' +timestamp);
	article.style.display=(article.style.display=='none' ? 'block' : 'none');

	if (article.style.display=='block' && article.innerHTML=='')
	{
		article.innerHTML='getting article...';
		loadXMLDoc(timestamp);
	}
}


function loadXMLDoc(timestamp)
{
	var req=false;

	if (window.XMLHttpRequest)							// branch for native XMLHttpRequest object
	{
		try
		{
			req=new XMLHttpRequest();
		} catch (e)
		{
			req=false;
		}
	}
	else if (window.ActiveXObject)						// branch for IE/Windows ActiveX version
	{
		try
		{
			req=new ActiveXObject('Msxml2.XMLHTTP');
		} catch (e)
		{
			try
			{
				req=new ActiveXObject('Microsoft.XMLHTTP');
			} catch (e)
			{
				req=false;
			}
		}
	}

	if (req)
	{
		req.open('GET','http://ozreport.com/blog.php?get='+timestamp,false);
		req.send('');

		if (req.readyState==4 && req.status==200)				// only if "OK"
			document.getElementById('a'+timestamp).innerHTML=req.responseText;
		else
			alert('Error: '+req.statusText);
	}
	else
		alert("Sorry, your browser's JavaScript can't do XMLHttpRequest() or create an ActiveXObject('Msxml2.XMLHTTP') or ActiveXObject('Microsoft.XMLHTTP').");
}

