var contentPasteAt = "";
function show(id)
{
   contentPasteAt="id";
   
   url = "contact_availability.php?type="+id;
   var i = 0;
     for(i = 1; i<=10; i++)
   {

	   if(document.getElementById("div_"+i).style.display == "none")
	   {
		   document.getElementById("div_"+i).style.display = "block";
		   break;
		}
	}
   
//   loadXMLDocTranscriptForm(url);
   //test(id);
}

function loadXMLDocTranscriptForm(url)
{
	// branch for native XMLHttpRequest object
	//alert(1);
	if (window.XMLHttpRequest)
	{
		req = new XMLHttpRequest();
		req.onreadystatechange = processReqChangeTranscriptForm;
		req.open("GET", url, true);
		req.send(null);
		// branch for IE/Windows ActiveX version
	}
	else if (window.ActiveXObject)
	{
		req = new ActiveXObject("Microsoft.XMLHTTP"); 
		if (req)
		{
			req.onreadystatechange = processReqChangeTranscriptForm;
			req.open("GET", url, true);
			req.send();
		}
	}
}

function processReqChangeTranscriptForm()
{
	// only if req shows "complete"
	if (req.readyState == 4)
	{
		
		// only if "OK"
		if (req.status == 200)
		{
			response = req.responseXML.documentElement;
			var urlpath='';
			for(var x = 0; response.getElementsByTagName('urlpath')[0].childNodes[x]; x++ )
			urlpath = urlpath.concat(response.getElementsByTagName('urlpath')[0].childNodes[x].data);			
			document.getElementById('org_id').innerHTML = urlpath;	
		
		}
		else
		{
			alert("There was a problem retrieving the XML data:\n" + req.statusText);
		}
	}
}

