
// 各パーツの読み込み
// @param  string     ajaxUrl
// @param  inputType  ハガキ名入れタイプ(1=挨拶状, 2=年賀状, 3=喪中・寒中)
function loadParts(ajaxUrl, inputType){
	// サイトメンテナンス案内
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=MaintenanceInfo",
		cache: true,
		success: function(html){
			$("#MaintenanceInfoAjax").replaceWith(html);
		}
	});
	// ログイン情報
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=LoginMemberInfo",
		cache: true,
		success: function(html){
			$("#LoginMemberInfoAjax").replaceWith(html);
		}
	});
	// カートボタン
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=CartButtons",
		cache: true,
		success: function(html){
			$("#CartButtonsAjax").replaceWith(html);
		}
	});
	// お届け日
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=DeliveryDate",
		cache: true,
		success: function(html){
			$("#DeliveryDateAjax").replaceWith(html);
		}
	});
	// マイセレクト
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=MySelectList",
		cache: true,
		success: function(html){
			$("#MySelectListAjax").replaceWith(html);
		}
	});
	// お知らせ
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=NoticeList",
		cache: true,
		success: function(html){
			$("#NoticeListAjax").replaceWith(html);
		}
	});
	//	// おすすめ商品
//	$.ajax({
//		type: "GET",
//		url: ajaxUrl,
//		data: "name=RecommendGoodsList&inputtype="+ inputType,
//		cache: true,
//		success: function(html){
//			$("#RecommendGoodsListAjax").replaceWith(html);
//		}
//	});
//	// 商品カテゴリ
//	$.ajax({
//		type: "GET",
//		url: ajaxUrl,
//		data: "name=CategoryList&inputtype="+ inputType,
//		cache: true,
//		success: function(html){
//			$("#CategoryListAjax").replaceWith(html);
//		}
//	});
//	// おすすめ商品カテゴリ
//	$.ajax({
//		type: "GET",
//		url: ajaxUrl,
//		data: "name=RecommendCategoryList&inputtype="+ inputType,
//		cache: true,
//		success: function(html){
//			$("#RecommendCategoryListAjax").replaceWith(html);
//		}
//	});
//	// ブログ
//	$.ajax({
//		type: "GET",
//		url: "../php/getRssAjax.php",
//		data: "",
//		cache: true,
//		success: function(html){
//			$("#BlogRssAjax").replaceWith(html);
//		}
//	});
}

// 各パーツの読み込み(ご利用ガイド用)
// @param  string     ajaxUrl
function loadPartsGuide(ajaxUrl){
	// サイトメンテナンス案内
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=MaintenanceInfo",
		cache: true,
		success: function(html){
			$("#MaintenanceInfoAjax").replaceWith(html);
		}
	});
	// ログイン情報
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=LoginMemberInfo",
		cache: true,
		success: function(html){
			$("#LoginMemberInfoAjax").replaceWith(html);
		}
	});
	// カートボタン
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=CartButtons",
		cache: true,
		success: function(html){
			$("#CartButtonsAjax").replaceWith(html);
		}
	});
}

// 料金表の読み込み
// @param  string     ajaxUrl
// @param  dvprice	  料金区分(1=印刷, 2=ダウンロード)
function loadFareTable(ajaxUrl, dvprice){
	// おすすめ商品カテゴリ
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "name=FareTable&dvprice="+ dvprice,
		cache: true,
		success: function(html){
			$("#FareTableAjax").replaceWith(html);
		}
	});
}

// Twitter読み込み
// @param  string     ajaxUrl
function loadTwitter(ajaxUrl){
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "",
		cache: true,
		success: function(html){
			$("#TwitterAjax").replaceWith(html);
		}
	});
}

// ブログの読み込み
// @param  string     ajaxUrl
function loadBlog(ajaxUrl){
	$.ajax({
		type: "GET",
		url: ajaxUrl,
		data: "",
		cache: true,
		success: function(html){
			$("#BlogAjax").replaceWith(html);
		}
	});
}

// ワード検索
// @param	formObj		フォームオブジェクト
function doWordSearch(formObj) {
	document.charset = 'euc-jp';
//	formObj.action = window.location.href.replace('http','https') +'../main/goodslist/';
	formObj.submit();
}

// IE-history.back時の文字コード対策
var isMSIE = /*@cc_on!@*/false;
if (isMSIE){
	var charset = document.charset;
	if (charset != 'utf-8' && charset != 'UTF-8' && charset != 'utf8' && charset != 'UTF8'){
		document.charset = 'utf-8';
		window.location.reload();
	}
}


