function loadSuggest()
{
	var options = {
		script: "/nyc/coop-condo-directory/ajax/suggestBuildings.php?",
		varname: "q",
		json: true,
		maxresults: 25,
		callback: submit_condo_coop_search
	};
	
	var as = new AutoSuggest('building-search', options);
}

sfHover = function() {
	var sfEls = document.getElementById("nav_left").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
					this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
					this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

function swapImage(imgName,newImg) {
	if (document[imgName]) document[imgName].src = newImg;
}
	
function toggle(obj)
{
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}

function submit_condo_coop_search()
{
	jQuery('#the-form').submit();
}
