﻿	function showCartInDialog(){
		//カートインダイアログ
		showPicDialog('','','dialog_cart_in',1);
	}

	function showCartDeleteDialog(){
		//カートから削除ダイアログ
		showPicDialog('','','dialog_cart_delete',1);
	}

	function showStockShortageDialog(){
		//在庫不足ダイアログ
		showPicDialog('','','dialog_stock_shortage',1);
	}

	function showWarningDialog(message){
		showDialog('ぱーそなるたのめーる',message,'warning',1);
	}

	function showErrorDialog(message){
		showDialog('ぱーそなるたのめーる',message,'error');
	}

	function showSuccessDialog(message){
		showDialog('ぱーそなるたのめーる',message,'success',1);
	}

	//酒類対応 START ------
	function showDrinkDialog(nextPage){
		showHtmlDialog('/common/js/dialog/drink/drink_dialog.html', 0, true);
		var href_yes='javascript:pushBtnYes("' + nextPage + '");';
		$('#drink_dialog_btn_yes').attr('href',href_yes);
		$('#drink_dialog_btn_no').attr('href','javascript:pushBtnNo();');
	}

	function pushBtnYes(nextPage){
		createCookie("OVER20CHK","true");
		location.href=nextPage;
	}
	function pushBtnNo(){
		createCookie("OVER20CHK","false");
		$('#err_over20chk').remove();
		$('#err_msg_area').append('<p class="red" id="err_over20chk">20歳未満の方にはご購入いただけない商品が含まれています。</p>');
		hideHtmlDialog();
	}
	function createCookie(name,value,days) {
		if (days) {
	    		var date = new Date();
	    		date.setTime(date.getTime()+(days*24*60*60*1000));
	    		var expires = "; expires="+date.toGMTString();
		} else {
			expires = "";
		}
		document.cookie = name+"="+value+expires+"; path=/";
	}
	//酒類対応 END ------



