var req=null;

function GetXmlHttpObject()
{
	try
	{
	req = new XMLHttpRequest();
	}
	catch(e)
	{
		try
		{
		req = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
		req = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
}
function preview(pg,type)
{
GetXmlHttpObject();
if(type == "page")
var url = "content/" + pg;
else if(type == "article")
var url = "articles/pages/" + pg;
else
return;
req.onreadystatechange = stateChange;
req.open("GET",url);
req.send(null);
}

function stateChange()
{
	if(req.readyState == 4)
	{
	document.getElementById("content").innerHTML = req.responseText;	
	}
}

function linkover(id)
{
	document.getElementById(id).style.visibility = "visible"; 
}
function linkout(id)
{
	document.getElementById(id).style.visibility = "hidden";
}
