

/* 	Shows all plots belonging to development */
function showPlots(iDevId)
{
	document.getElementById(iDevId).style.display = "block";
}

/* 	Hides the <div> which is display all plots
	for a particular development */
function hidePlots(iDevId)
{
	document.getElementById(iDevId).style.display = "none";
}

function changeDevelopmentImage(imageSrc, pId)
{
	document.getElementById("featured_image").src = imageSrc;
	document.getElementById("viewlarge_link").href = "viewlarge.asp?folder=developments&file=" + pId;
	
	var xmlDoc=null;
	
	if (window.XMLHttpRequest)
	{
		xmlDoc=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlDoc.open( "GET", "ajax/get_alt.asp?x=" + Math.random() + "&id=" + pId );

	xmlDoc.onreadystatechange=function()
	{
		if (xmlDoc.readyState==4)
		{
			document.getElementById("image_alt").innerHTML = xmlDoc.responseText;
		}
	}		
	
	xmlDoc.send( null );
}

function changePlotPhoto(imageSrc, pId)
{
	document.getElementById("featured_image").src = imageSrc;	
	document.getElementById("viewlarge_link").href = "viewlarge.asp?folder=developments&file=" + pId;

	var xmlDoc=null;
	
	if (window.XMLHttpRequest)
	{
		xmlDoc=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlDoc.open( "GET", "ajax/get_alt.asp?x=" + Math.random() + "&id=" + pId );

	xmlDoc.onreadystatechange=function()
	{
		if (xmlDoc.readyState==4)
		{
			document.getElementById("image_alt").innerHTML = xmlDoc.responseText;
		}
	}		
	
	xmlDoc.send( null );
}
