var locnid='none';

function location_is(locnid_is){
	var df='';
	var nextlocation;
	if (location.href.indexOf("form-action") > 0){
			df=location.href.indexOf("form-action");
			df=df-1;
			nextlocation=location.href.substring(0,df);
			nextlocation=nextlocation+'?switch_navig=50&locnid_is='+locnid_is;
			location=nextlocation;
	}
}

function hiddenall(){
	jQuery('div.alhomesshow').hide();
	return false;
} 

function town_homes_and_condos(){
	jQuery('select#property_type option[value=Condo 1st Floor]').attr("selected", "yes");
	jQuery('tr#property_type_tr').hide();
	jQuery('strong#allhomes').hide();
	jQuery('strong#foreclouse').hide();
	jQuery('strong#newconstruction').hide();
	jQuery('strong#luxproperty').hide();
	jQuery('strong#town').show();
	jQuery('tr#property_type_tr1 td.nopadding input[type=checkbox]').attr("checked","true");
	jQuery('tr#property_type_tr1').show();
	jQuery('tr#foreclosure').show();
	jQuery('tr#price').show();
	jQuery('tr#newconstruction').show();
	jQuery('li#'+locnid+' a').css( "color", "white" );
	locnid='townandcondors';
	jQuery('li#'+locnid+' a').css( "color", "yellow" );
//	location_is(locnid);
	return false;
} 

function foreclosure(){
	jQuery('tr#foreclosure td.nopadding input[type=checkbox]').attr("checked","true");
	jQuery('tr#foreclosure').hide();
	jQuery('tr#property_type_tr').hide();
	jQuery('strong#allhomes').hide();
	jQuery('tr#property_type_tr1').hide();
	jQuery('strong#newconstruction').hide();
	jQuery('strong#luxproperty').hide();
	jQuery('strong#town').hide();
	jQuery('strong#foreclouse').show();
	jQuery('select#property_type option').attr("selected", "");
	jQuery('select#priceselect option[value=]').attr("selected", "selected");
	jQuery('tr#property_type_tr').show();
	jQuery('tr#price').show();
	jQuery('tr#newconstruction').show();
	jQuery('li#'+locnid+' a').css( "color", "white" );
	locnid='forecl';
	jQuery('li#'+locnid+' a').css( "color", "yellow" );
//	location_is(locnid);
	return false;
}
function shortsale(){
	jQuery('tr#shorts td.nopadding input[type=checkbox]').attr("checked","true");
	jQuery('tr#foreclosure').show();
	jQuery('tr#shorts').hide();
	jQuery('tr#property_type_tr').hide();
	jQuery('strong#allhomes').hide();
	jQuery('strong#newconstruction').hide();
	jQuery('strong#luxproperty').hide();
	jQuery('tr#property_type_tr1').hide();
	jQuery('strong#town').hide();
	jQuery('strong#foreclouse').hide();
	jQuery('strong#shortsales').show();
	jQuery('select#property_type option').attr("selected", "");
	jQuery('select#priceselect option[value=]').attr("selected", "selected");
	jQuery('tr#property_type_tr').show();
	jQuery('tr#price').show();
	jQuery('tr#newconstruction').show();
	jQuery('li#'+locnid+' a').css( "color", "white" );
	locnid='forecl';
	jQuery('li#'+locnid+' a').css( "color", "yellow" );
//	location_is(locnid);
	return false;
}

function lux(){
//	jQuery(document).ready(function() {
		jQuery('option#pricemin').show();
		jQuery('select#priceselect option[value=800000]').attr("selected", "selected");
		jQuery('tr#price').hide();
		jQuery('strong#allhomes').hide();
		jQuery('strong#newconstruction').hide();
		jQuery('strong#town').hide();
		jQuery('strong#foreclouse').hide();
		jQuery('tr#property_type_tr1').hide();
		jQuery('strong#luxproperty').show();
		jQuery('select#property_type option').attr("selected", "");
		jQuery('tr#property_type_tr').show();
		jQuery('tr#foreclosure').show();
		jQuery('tr#newconstruction').show();
		jQuery('li#'+locnid+' a').css( "color", "white" );
		locnid='luxproperties';
		jQuery('li#'+locnid+' a').css( "color", "yellow" );
//		location_is(locnid);
//	});
	return false;
}

function nuwconstruction(){
	jQuery('tr#newconstruction td.nopadding input[type=checkbox]').attr("checked","true");
	jQuery('tr#newconstruction').hide();
	jQuery('strong#allhomes').hide();
	jQuery('strong#town').hide();
	jQuery('strong#foreclouse').hide();
	jQuery('strong#luxproperty').hide();
	jQuery('tr#property_type_tr1').hide();
	jQuery('strong#newconstruction').show();
	jQuery('select#property_type option').attr("selected", "");
	jQuery('select#priceselect option[value=]').attr("selected", "selected");
	jQuery('tr#property_type_tr').show();
	jQuery('tr#foreclosure').show();
	jQuery('tr#price').show();
	jQuery('li#'+locnid+' a').css( "color", "white" );
	locnid='onlynew';
	jQuery('li#'+locnid+' a').css( "color", "yellow" );
//	location_is(locnid);
	return false;
}

