var xmlHttp
function showtext()
{ 
 xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
	if ($("#location").val() == 200 || ($("#location").val() == 201) || $("#location").val() == 202 || $("#location").val() == 210 || $("#location").val() == 52){
		$("#umittype_single").attr("selected", "selected");
		$("#umittype_condo").attr("disabled", "disabled");
		$("#umittype_highrise").attr("disabled", "disabled");
		$("#smaller").show().children().attr("name", "pricerange");
		$("#mid").hide().children().attr("name", "something");
		$("#larger").hide().children().attr("name", "something");
		$("#bay-house").hide().children().attr("name", "something");
		$("#high").hide();
		$("#house-condo").show();
		$("#unittype").removeAttr('disabled');
		$(".style").removeAttr('disabled');
		$("#additionalstyles").removeAttr('disabled');
		$("#action").val('select');
	}else if($("#location").val() == 211){
		$("#unittype").attr("disabled", "disabled");
		$(".style").attr("disabled", "disabled");
		$("#additionalstyles").attr("disabled", "disabled");
		$("#action").val('coming_soon');
	} else {
		$("#umittype_condo").attr("disabled", "");
		$("#umittype_highrise").attr("disabled", "");
		$("#smaller").hide().children().attr("name", "something");
		$("#unittype").removeAttr('disabled');
		$(".style").removeAttr('disabled');
		$("#additionalstyles").removeAttr('disabled');
		$("#action").val('select');
		if ($("#unittype").val() == 203){
			$("#mid").show().children().attr("name", "pricerange");
			$("#larger").hide().children().attr("name", "something");
			$("#bay-house").hide().children().attr("name", "something");
			$("#high").show();
			$("#house-condo").hide();
		} else {
			$("#high").hide();
			$("#house-condo").show();
			$("#mid").hide().children().attr("name", "something");
			if ($("#unittype").val() == 29){
				$("#bay-house").hide().children().attr("name", "something");
				$("#larger").show().children().attr("name", "pricerange");
			} else {
				$("#bay-house").show().children().attr("name", "pricerange");
				$("#larger").hide().children().attr("name", "something");
			}
		}
	}
	var mod = Array();
	mod[203] = 2;
	mod[199] = 1;
	mod[29] = 0;
	if ($("#ctom_"+$("#location").val()+"_"+mod[$("#unittype").val()]).size() > 0){
		$(".ctom_link").hide();
		$("#ctom_"+$("#location").val()+"_"+mod[$("#unittype").val()]).show();
	} else {
		$(".ctom_link").hide();
		$(".ctom_link_default_"+mod[$("#unittype").val()]).show();
	}
var url="php/content.php";
url=url+"?id="+$("#location").val();
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true);
xmlHttp.send(null)
}

function stateChanged() 
{ 
 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("txt").innerHTML=xmlHttp.responseText 

 } 
}
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)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
