function GetXmlHttpObject()
{
	var xmlHttp = null;
	
	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 false;
			}
		}
	}
	
	return xmlHttp;
		
}

function LoadChildAjaxPage(id,prmurl)
{
	xmlHttp = GetXmlHttpObject()
	if (xmlHttp == null)
	{
		alert ("Browser does not support HTTP Request")
		return false;
	}
	var url = prmurl+"rug-content.php";
	url = url+"?id="+id+"&section=child";
   
	xmlHttp.onreadystatechange = stateChanged 
	xmlHttp.open("GET", url, true)
	xmlHttp.send(null)
}
function stateChanged() 
{ 
    
	if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")
	{
            document.getElementById("picholder").innerHTML='';       
            document.getElementById("picholder").innerHTML = xmlHttp.responseText
	} 
}
function LoadParentAjaxPage(id,prmurl)
{
    	xmlHttp = GetXmlHttpObject()
	if (xmlHttp == null)
	{
		alert ("Browser does not support HTTP Request")
		return false;
	}
	var url = prmurl+"rug-content.php";
	url = url+"?id="+id+"&section=parent";
	xmlHttp.onreadystatechange = stateChanged1 
	xmlHttp.open("GET", url, true)
	xmlHttp.send(null)

}
function stateChanged1() 
{ 
    
	if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")
	{
            document.getElementById("displayarea").innerHTML='';       
            document.getElementById("displayarea").innerHTML = xmlHttp.responseText
	} 
}