function sRegShopBase() {
	setFormDefaultTarget2('viewForm');
	callForm3("/shop.php/op/regShopBase", "viewForm");
}

function rRegShopBase(result) {
	alert(result);
}

function doClassShopPager(startCount) {
	var objForm = $('viewForm');
	setFormDefaultTarget(objForm);
	setHiddenValue('hidStartCount', startCount);
	objForm.action="/shop.php/op/getSearchBarShops";
	objForm.submit();
}

function sShowShopPage(shopId, pageKey) {
	var objForm = $('viewForm');
	setFormDefaultTarget(objForm);

	setHiddenValue('hidShopId', shopId);
	setHiddenValue('hidPageKey', pageKey);

	objForm.method = 'post';
	objForm.action = '/shop.php/op/showShopPage';
	objForm.submit();
}

function sShowReplyMouthPage(shopId, pageKey, mouthId) {
	
	setHiddenValue('hidReplyMouthId', mouthId);
	var objForm = $('viewForm');
	setFormDefaultTarget(objForm);

	setHiddenValue('hidShopId', shopId);
	setHiddenValue('hidPageKey', pageKey);

	objForm.method = 'post';
	objForm.action = '/shop.php/op/showShopPage';
	objForm.submit();
}

function sWirteMouth(shopId) {
	try {
		clearError();
		var data = new Array();

		var objTitle = $('txtTitle');
		var objComment = $('txtComment');
		
		// 必須入力チェック
		isNotBlank(objTitle, 'タイトル', data);
		isNotBlank(objComment, 'コメント', data);
		
		if (data.length > 0) {
	        showWarning(data);
	        return false;
        }
        
		setHiddenValue('hidShopId', shopId);
		
		setFormDefaultTarget2('viewForm');
		callForm3('/shop.php/op/wirteMouthMsg', 'viewForm');
	}
	catch(ex) {
		myDebug("sWirteMouth : msg : " + ex.description);
	}
}

function rWirteMouth(result) {
	try {
		if (result[0]) {
			setMsg(MSG_SUCCESS);
			window.location = '/shop.php/op/showShopPage/sid/' + result[1][0] + '/pkey/' + result[1][1];
		}
		else {
			setMsg(MSG_UNSUCCESS);
		}
	}
	catch(ex) {
		myDebug("rWirteMouth : msg : " + ex.description);
	}
}