function JavaPostSend(parameters, Frame)
	{
	var Frame = document.getElementById(Frame);
	
	Frame.innerHTML = "<img src=\"/images/load.gif\" />";
	
	xmlHttp = GetXmlHttpObject();
	if (xmlHttp==null)
		{
		alert ("Your browser does not support AJAX!");
		return;
		}

	var url = "/bin/Active-X.php";

	if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) 
		{
		xmlHttp.open("POST",url,true);
		xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		xmlHttp.onreadystatechange = function()
			{
			if (xmlHttp.readyState == 4)
				{
				Frame.innerHTML = xmlHttp.responseText;
				}
			}
		
		xmlHttp.send(parameters);
		}	
	}

function openView(ID)
	{
	var Frame = document.getElementById('ViewIt');
	
	document.getElementById('ViewIt').innerHTML = "<img src=\"/images/load.gif\" />";
	
	xmlHttp = GetXmlHttpObject();
	if (xmlHttp==null)
		{
		alert ("Your browser does not support AJAX!");
		return;
		}

	var url = "/bin/Active-X.php?Switch=Viewer&ID="+ ID;

	xmlHttp.onreadystatechange = stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}

function stateChanged()
	{
	if (xmlHttp.readyState==4)
		{
		document.getElementById("ViewIt").innerHTML = xmlHttp.responseText;
		}
	}

function GetXmlHttpObject()
	{
	var xmlHttp=null;
	try
		{
		xmlHttp=new XMLHttpRequest();
		}
	catch (e)
		{
		try
			{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
		catch (e)
			{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
	return xmlHttp;
	}