/* IE PNG FIX - http://www.twinhelix.com/css/iepngfix/ */
//if(document.all && document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule) {
//	document.styleSheets[0].addRule('img', 'behavior: url(/inc/js/iepngfix.htc)');
//}

var services_city_cache = '/inc/services/city_cache.php';
var services_search = '/inc/services/attorney_search.php';

function validateSearch() {
	var frm = document.forms.search;
	if(frm.search_q.value == frm.search_q.title) {
		frm.search_q.value = "";
	}
//	if(frm.search_city.value == frm.search_city.title) {
//		frm.search_city.value = "";
//	}
}
function checkInput(obj) {
	if (obj.value.substring(0,5) == "") {
		obj.value = obj.title; /* document.getElementById('search_q').getAttribute('title'); */
	}		
}

function clearInput(obj) {
	if (obj.value.substring(0,5) == "(e.g.") {
		obj.value = "";
	}
}
/* deprecated
function cacheCities(market,state) {
	cityCache = new sack();
	var url = services_city_cache + '?market='+market+'&state='+state;
	cityCache.requestFile = url;
//	cityCache.onCompletion = function(){ document.getElementById('cacheloaded').style.display = "block"; };
	cityCache.runAJAX();
}
*/
/* deprecated
function attorneySearch(qs,group,divId) {
	var group_prefix = group.toLowerCase();
//	document.getElementById(group_prefix+'_found_count').style.display = "none";
	document.getElementById(group_prefix+'_searching').style.display = "inline";
	doSearch = new sack();
	var ajaxIndex = doSearch.length;
	var url = services_search + '?' + unescape(qs) + '&g='+group;
	doSearch.requestFile = url;
	doSearch.onCompletion = function(){
//		document.getElementById(group_prefix+'_found_count').style.display = "inline";
		document.getElementById(group_prefix+'_searching').style.display = "none";
		count = doSearch.response;
		if(count > 0) {
			viewAlsoFoundValue(count,divId);
		//	document.getElementById('also_found_'+group_prefix+'_none').style.display = "none";
			document.getElementById('also_found_'+group_prefix).style.display = "inline";
		//	Effect.Pulsate('also_found_'+group_prefix);
		//	Effect.Appear('also_found_'+group_prefix);
		} else {
			document.getElementById('also_found_'+group_prefix+'_none').style.display = "inline";
		}
	};
	setTimeout(function(){doSearch.runAJAX();},1000);
}

function viewAlsoFoundValue(count,divId) {
	document.getElementById(divId).innerHTML = count;
}
*/