$(document).ready(function() {
	$('#btnSave').click(function(){
		if($.trim( $('#txtName').val()) == '')
		{alert('商家名称必填！');return false;}
		if($.trim($('#txtPassword').val())!=$.trim($('#txtPassword2').val())){
	    alert('两次输入的密码不相同');return false;
		}
		if($.trim( $('#txtAddress').val()) == '')
		{alert('地址必填！');return false;}
		if($.trim( $('#txtPhone').val()) == '')
		{alert('电话必填！');return false;}
		if($.trim( $('#txtContacter').val()) == '')
		{alert('联系人必填！');return false;}
		if($.trim($('#ddlCategoryNo').val())=='0')
		{ alert('请选择所属分类');return false}
	});
	$("#txtExpireTime").datepicker().click(function(){$(this).blur()});
	
});



function getQueryStringRegExp(name)
{
    var reg = new RegExp("(^|\\?|&)" + name.toLowerCase() + "=([^&]*)(\\s|&|$)", "i");
    if (reg.test(location.href.toLowerCase()))
    return unescape(RegExp.$2.replace(/\+/g, " "));
    return "";
}