
function fnValidateForm(frm){		
	<!--- require search price when MLNUM or Address are not provided ----->
	
	
	if ((frm.LISTING_PRICE_MIN.value != '') && (frm.LISTING_PRICE_MAX.value != ''))
	{
		if (fnCompareRangeValues(frm.LISTING_PRICE_MIN, frm.LISTING_PRICE_MAX, 'Minimum Price', 'Maximum Price') == false)
		{
			return false;
		}
	}
	
	if ((frm.SQURE_FEET_MIN.value != '') && (frm.SQURE_FEET_MAX.value != ''))
	{
		if (fnCompareRangeValues(frm.SQURE_FEET_MIN, frm.SQURE_FEET_MAX, 'Minimum Square Feet', 'Maximum Square Feet') == false)
		{
			return false;
		}
	}

	<!-- prevent special char for input text field -->
	for (i=0; i<frm.elements.length; i++){
		if (frm.elements[i].type=="text"){
			if(!validChar(frm.elements[i].value)){
				alert("please don't put special character in " + frm.elements[i].name +  " field");
				return false;
			}
		}
	}
	
	
	
	
	return true;	
}

function cForm(){
		var checkSelected = false;
		var checkCounter = 0;
		for (i = 0;  i < document.compareForm.listMLNUM.length;  i++){
			if (document.compareForm.listMLNUM[i].checked){
				checkSelected = true;
				checkCounter = checkCounter + 1;
				}
		}
		if (!checkSelected)	{
			alert("Please select at least one of the listings.");
			
		}
		if (checkCounter > 5){
			alert("You are only allowed to select up to 5 lisitng.\n Please uncheck one or some of your selection in order to select more.");
			
		}
}///end func
//function compfrmreturn(form, buttonName, enhanced){
//// require that at least one checkbox be checked
//		var checkSelected = false;
//		var checkCounter = 0;
//		for (i = 0;  i < document.compareForm.listMLNUM.length;  i++){
//			if (document.compareForm.listMLNUM[i].checked){
//				checkSelected = true;
//				checkCounter = checkCounter + 1;
//				}
//		}
//		if (!checkSelected)	{
//			alert("Please select at least one of the listings.");
//			
//		}
//		if (checkCounter > 5){
//			alert("You are only allowed to select up to 5 lisitng.\n Please uncheck one or some of your selection in order to select more.");
//			
//		}
//		if(checkSelected && checkCounter <= 5 ){
//			
//			if(buttonName =='Compare'){
//				 win=window.open('','myWin','width=850,height=900,scrollbars=yes,resizable=yes,left:0px, top:0px'); 
//				 form.target='myWin';
//				 form.action='http://search.har.com/engine/dispSetMycartTransit.cfm'
//		
//			 }else if (buttonName == 'Map'){
//				form.target = '';
//				form.action='dispSearch.cfm?listSRND=yes';
//			 }
//		}
//	
//}
	function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}
