﻿$(document).ready(function(){
			
	//adds validation
/*	$("#calForm").validate({
		rules: {
			// no custom rules
		},
		errorPlacement: function(error, element) {
			if(element.attr("class") == 'code'){
				error.appendTo(element.next("span"));
			}else{ 
				error.appendTo(element.parent());
			}
			
		},
		onfocusout: false
	});		*/
	
	//add masking
	/*
	$(".zip").mask("99999");
	$(".phone").mask("(999)999-9999");
	$(".date").mask("99/99/9999");
	$(".time").mask("99:99 aa");
	$(".code").mask("****");
	*/

	
  });

/*	validation function		*/
function validate_listform(frm) {
		with (frm) {			
			if (subcatID.selectedIndex == 0 && listing_keyword.value.length == 0 && regionID.selectedIndex == 0) {
				$.prompt('Please enter a type, area or keyword to search.');
				return false;		
			}

		}
		return true;
	}
	

