////////////////////////////////////////////////////////////////////////////////
//
// 印鑑の匠作成のjavascriptはbase.js利用
// 
// ・ヘルプ検索へのリンク機能
// ・フォントサイズ変更スクリプト
// ・「配送日時のご指定」内の営業日カレンダー
// ・商品配送日テーブルを表示
//
// Designed On 2011.04.6 By oba
// Update On 2011/4/6 Ver1.1.0
//
////////////////////////////////////////////////////////////////////////////////

/* ▼▼▼ javascriptコード ▼▼▼ */
// /seach/index.phpに飛ばして検索を作動させる
function link_search(word) {
  window.location.href = '/search/index.php?w=' + encodeURI(word);
}
/* ▲▲▲ javascriptコード ▲▲▲ */

/* ▼▼▼ ヘルプ検索へのリンク機能(oba) ここから ▼▼▼ */
// 例) あたり[<a href="javascript:void(0)" onclick="search_word('あたり')">?</a>]
function search_word(word) {
  word = encodeURI(word);
  var w = window.open('http://www.inkan-takumi.com/help/search.php?w=' + word, '', 'width=720,height=600,scrollbars=yes');
}
/* ▲▲▲ ヘルプ検索へのリンク機能 ここまで ▲▲▲ */

/* ▼▼▼ フォントサイズ変更スクリプト(oba) ここから ▼▼▼ */

function class_cookielib(){ 
  this.getCookie = getCookie; 
  this.setCookie = setCookie; 
  this.removeCookie = removeCookie; 

  var expireDate = new Date(); 
  expireDate.setFullYear(expireDate.getFullYear()+1); 
  expireStr = "expires=" + expireDate.toUTCString(); 

  function getCookie(name){ 
    var gc=name+"="; 
    var Cookie=document.cookie; 
    if (Cookie.length>0) { 
      var start=Cookie.indexOf(gc); 
      if (start!=-1) { 
        start+=gc.length; 
        terminus=Cookie.indexOf(";",start); 
        if (terminus==-1) terminus=Cookie.length; 
        return unescape(Cookie.substring(start,terminus)); 
      } 
    } 
    return ''; 
  } 
  
  function setCookie() { 
    var key = arguments[0]; 
    var val = arguments[1]; 
    var path = (typeof(arguments[2]) != 'undefined' ? arguments[2] : '/'); 
    var exp = (typeof(arguments[3]) != 'undefined' ? arguments[3] : expireStr); 
    var sc = key + "=" + escape(val) + "; path=" + path + "; " + exp; 
    document.cookie = sc; 
  } 

  function removeCookie(key,path) { 
    if(!path){ 
    path = '/'; 
    } 
    var rc = key + "=; path=" + path + "; expires=Thu, 1 Jan 1970 00:00:00 UTC"; 
    document.cookie = rc; 
  } 
} 

var cookieObj = new class_cookielib(); 

function onresize_handler(){ 
  if(document.layers){ 
    window.location.reload(); 
  } 
} 

window.onresize = onresize_handler; 

var txtsize_val = 2; 
var txtsize_css_size = new Array(); 
txtsize_css_size[0] = '70%'; 
txtsize_css_size[1] = '75%'; 
txtsize_css_size[2] = '80%'; 
txtsize_css_size[3] = '85%'; 
txtsize_css_size[4] = '95%'; 
txtsize_css_size[5] = '100%'; 


function setTextSize(){ 
  if(cookieObj.getCookie('txtsize') != ''){ 
    txtsize_val = 1 * cookieObj.getCookie('txtsize'); 
  } 
  document.write('<style type="text/css">'); 
  document.write('* body { font-size:' + txtsize_css_size[txtsize_val] + '; }'); 
  document.write('</style>'); 
} 

// 文字サイズをnumだけ変える
function changeTextSize(num){ 
  var fl_update = false; 
  var tmp_val = txtsize_val + num; 
  if(tmp_val >= 0 && tmp_val < txtsize_css_size.length){ 
    txtsize_val = tmp_val; 
    fl_update = true; 
  } 
  if(fl_update){ 
    cookieObj.setCookie('txtsize',txtsize_val,'/',''); 
    window.location.reload(); 
  } 
} 

// 文字サイズをもとに戻す
function defaultTextSize(){ 
  var fl_update = false; 
  var tmp_val = 2; 
  if(tmp_val >= 0 && tmp_val < txtsize_css_size.length){ 
    txtsize_val = tmp_val; 
    fl_update = true; 
  } 
  if(fl_update){ 
    cookieObj.setCookie('txtsize',txtsize_val,'/',''); 
    window.location.reload(); 
  } 
} 

/* ▲▲▲ フォントサイズ変更スクリプト ここまで ▲▲▲ */

/* ▼▼▼ 営業日リスト(「配送日時のご指定」内の営業日カレンダー, 商品配送日テーブルを表示 の両方で使用) ここから ▲▲▲ */

var workingDayList = Array(	"20091102", "20091104", "20091105", "20091106", "20091109", "20091110", "20091111", "20091112", "20091113", "20091116", "20091117", "20091118", "20091119", "20091120", "20091124", "20091125", "20091126", "20091127", "20091130",
							"20091201", "20091202", "20091203", "20091204", "20091207", "20091208", "20091209", "20091210", "20091211", "20091214", "20091215", "20091216", "20091217", "20091218", "20091221", "20091222", "20091224", "20091225", "20091228",
							"20100105", "20100106", "20100107", "20100108", "20100112", "20100113", "20100114", "20100115", "20100118", "20100119", "20100120", "20100121", "20100122", "20100125", "20100126", "20100127", "20100128", "20100129",
							"20100201", "20100202", "20100203", "20100204", "20100205", "20100208", "20100209", "20100210", "20100212", "20100215", "20100216", "20100217", "20100218", "20100219", "20100222", "20100223", "20100224", "20100225", "20100226",
							"20100301", "20100302", "20100303", "20100304", "20100305", "20100308", "20100309", "20100310", "20100311", "20100312", "20100315", "20100316", "20100317", "20100318", "20100319", "20100323", "20100324", "20100325", "20100326", "20100329", "20100330", "20100331",
							"20100401", "20100402", "20100405", "20100406", "20100407", "20100408", "20100409", "20100412", "20100413", "20100414", "20100415", "20100416", "20100419", "20100420", "20100421", "20100422", "20100423", "20100426", "20100427", "20100428", "20100430",
							"20100506", "20100507", "20100510", "20100511", "20100512", "20100513", "20100514", "20100517", "20100518", "20100519", "20100520", "20100521", "20100524", "20100525", "20100526", "20100527", "20100528", "20100531",
							"20100601", "20100602", "20100603", "20100604", "20100607", "20100608", "20100609", "20100610", "20100611", "20100614", "20100615", "20100616", "20100617", "20100618", "20100621", "20100622", "20100623", "20100624", "20100625", "20100628", "20100629", "20100630",
							"20100701", "20100702", "20100705", "20100706", "20100707", "20100708", "20100709", "20100712", "20100713", "20100714", "20100715", "20100716", "20100720", "20100721", "20100722", "20100723", "20100726", "20100727", "20100728", "20100729", "20100730",
							"20100802", "20100803", "20100804", "20100805", "20100806", "20100809", "20100810", "20100811", "20100817", "20100818", "20100819", "20100820", "20100823", "20100824", "20100825", "20100826", "20100827", "20100830", "20100831",
							"20100901", "20100902", "20100903", "20100906", "20100907", "20100908", "20100909", "20100910", "20100913", "20100914", "20100915", "20100916", "20100917", "20100921", "20100922", "20100924", "20100927", "20100928", "20100929", "20100930",
							"20101001", "20101004", "20101005", "20101006", "20101007", "20101008", "20101012", "20101013", "20101014", "20101015", "20101018", "20101019", "20101020", "20101021", "20101022", "20101025", "20101026", "20101027", "20101028", "20101029",
							"20101101", "20101102", "20101104", "20101105", "20101108", "20101109", "20101110", "20101111", "20101112", "20101115", "20101116", "20101117", "20101118", "20101119", "20101122", "20101124", "20101125", "20101126", "20101129", "20101130",
							"20101201", "20101202", "20101203", "20101206", "20101207", "20101208", "20101209", "20101210", "20101213", "20101214", "20101215", "20101216", "20101217", "20101220", "20101221", "20101222", "20101224", "20101227", "20101228",

							"20110105", "20110106", "20110107", "20110111", "20110112", "20110113", "20110114", "20110117", "20110118", "20110119", "20110120", "20110121", "20110124", "20110125", "20110126", "20110127", "20110128", "20110131",

							"20110201", "20110202", "20110203", "20110204", "20110207", "20110208", "20110209", "20110210", "20110214", "20110215", "20110216", "20110217", "20110218", "20110221", "20110222", "20110223", "20110224", "20110225", "20110228",
							
							"20110301", "20110302", "20110303", "20110304", "20110307", "20110308", "20110309", "20110310", "20110311", "20110314", "20110315", "20110316", "20110317", "20110318", "20110322", "20110323", "20110324", "20110325", "20110328", "20110329", "20110330", "20110331",

							"20110401", "20110404", "20110405", "20110406", "20110407", "20110408", "20110411", "20110412", "20110413", "20110414", "20110415", "20110418", "20110419", "20110420", "20110421", "20110422", "20110425", "20110426", "20110427", "20110428",

							"20110502", "20110506", "20110509", "20110510", "20110511", "20110512", "20110513", "20110516", "20110517", "20110518", "20110519", "20110520", "20110523", "20110524", "20110525", "20110526", "20110527", "20110530", "20110531",

							"20110601", "20110602", "20110603", "20110606", "20110607", "20110608", "20110609", "20110610", "20110613", "20110614", "20110615", "20110616", "20110617", "20110620", "20110621", "20110622", "20110623", "20110624", "20110627", "20110628", "20110629", "20110630",

							"20110701", "20110704", "20110705", "20110706", "20110707", "20110708", "20110711", "20110712", "20110713", "20110714", "20110715", "20110719", "20110720", "20110721", "20110722", "20110725", "20110726", "20110727", "20110728", "20110729",

							"20110801", "20110802", "20110803", "20110804", "20110805", "20110808", "20110809", "20110810", "20110817", "20110818", "20110819", "20110822", "20110823", "20110824", "20110825", "20110826", "20110829", "20110830", "20110831",

							"20110901", "20110902", "20110905", "20110906", "20110907", "20110908", "20110909", "20110912", "20110913", "20110914", "20110915", "20110916", "20110920", "20110921", "20110922", "20110926", "20110927", "20110928", "20110929", "20110930",

							"20111003", "2011104", "20111005", "20111006", "20111007", "20111011", "20111012", "20111013", "20111014", "20111017", "20111018", "20111019", "20111020", "20111021", "20111024", "20111025", "20111026", "20111027", "20111028", "20111031",

							"20111101", "20111102", "20111104", "20111107", "20111108", "20111109", "20111110", "20111111", "20111114", "20111115", "20111116", "20111117", "20111118", "20111121", "20111122", "20111124", "20111125", "20111128", "20111129", "20111130",

							"20111201", "20111202", "20111205", "20111206", "20111207", "20111208", "20111209", "20111212", "20111213", "20111214", "20111215", "20111216", "20111219", "20111220", "20111221", "20111222", "20111226", "20111227", "20111228", "20111229",  "20111230",

							"20120105", "20120106", "20120110", "20120111", "20120112", "20120113", "20120116", "20120117", "20120118", "20120119", "20120120", "20120123", "20120124", "20120125", "20120126", "20120127", "20120130", "20120131",

							"20120201", "20120202", "20120203", "20120206", "20120207", "20120208", "20120209", "20120210", "20120213", "20120214", "20120215", "20120216", "20120217", "20120220", "20120221", "20120222", "20120223", "20120224", "20120227", "20120228", "20120229",

							"20120301", "20120302", "20120305", "20120306", "20120307", "20120308", "20120309", "20120312", "20120313", "20120314", "20120315", "20120316", "20120319", "20120321", "20120322", "20120323", "20120326", "20120327", "20120328", "20120329", "20120330",

							"20120402", "20120403", "20120404", "20120405", "20120406", "20120409", "20120410", "20120411", "20120412", "20120413", "20120416", "20120417", "20120418", "20120419", "20120420", "20120423", "20120424", "20120425", "20120426", "20120427",

							"20120501", "20120502", "20120507", "20120508", "20120509", "20120510", "20120511", "20120514", "20120515", "20120516", "20120517", "20120518", "20120521", "20120522", "20120523", "20120524", "20120525", "20120528", "20120529", "20120530", "20120531"


								);
var week = Array( "日", "月", "火", "水", "木", "金", "土" );

/* ▼▼▼ 営業日リスト ここまで ▲▲▲ */

/* ▼▼▼ 「配送日時のご指定」内の営業日カレンダー ここから ▼▼▼ */
function calendar( year, month, day ){
	var targetDate, uruu, mon, max, monthMax, backgroundColor, workingDay, currentDay;

	mon = Array( 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec' );
	targetDate = new Date( mon[ month - 1 ] + ' 01, ' + year + ' 00:00:00' );

	uruu = ( ( year % 4 == 0 && year % 100 != 0 ) || year % 400 == 0 ) ? 1 : 0;
	monthMax = Array( 31, 28 + uruu, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 );
	max = monthMax[ month - 1 ] + targetDate.getDay() - 1;

	html  = "<table style=\"background-color:#dddddd;font-size:13px;text-align:center\" cellspacing=\"1\">";
	html += "<tr style=\"background-color:#ccccff\"><td colspan=\"7\">" + year + "年" + month + "月" + "</td></tr>";
	html += "<tr style=\"background-color:#ffffff\">";
	html += "<td style=\"padding:3px\">日</td>";
	html += "<td style=\"padding:3px\">月</td>";
	html += "<td style=\"padding:3px\">火</td>";
	html += "<td style=\"padding:3px\">水</td>";
	html += "<td style=\"padding:3px\">木</td>";
	html += "<td style=\"padding:3px\">金</td>";
	html += "<td style=\"padding:3px\">土</td>";
	html += "</tr>";

	for( i = 0; i < max + ( 7 - ( max % 7 ) ); i++ ){

		currentDay = ( i > targetDate.getDay() - 1 && i <= max ) ? ( i - ( targetDate.getDay() - 1 ) ) : "";

		// 枠色の指定
		if( currentDay == "" ){
			// 日にち以外
			backgroundColor = "#f4f4f4";
			borderColor     = "#f4f4f4";
		}
		else if( currentDay == day ){
			// 当日
			backgroundColor = "#ffffff";
			borderColor     = "#99ff99";
		}
		else{
			// 当日以外
			backgroundColor = "#ffffff";
			borderColor     = "#ffffff";
		}

		if( i % 7 == 0 ){ html += "<tr style=\"background-color:#ffffff;text-align:right\">"; }
		html += "<td style=\"padding:0px;border:" + borderColor + " solid 2px;background-color:" + backgroundColor + ";color:#ff8888\" id=\"" + ( currentDay != "" ? year + ( month < 10 ? "0" : "" ) + month + ( currentDay < 10 ? "0" : "" ) + currentDay : "" ) + "\">" + currentDay + "<br></td>";
		if( i % 7 == 6 ){ html += "</tr>"; }
	}
	html += "</table>";

	return( html );
}

// 当月・翌月カレンダー表示
function toMonthNextMonthCalendar( topMargin ){
	var now, year, month, day, nextMonth, nextMonthYear, html, i;
	now = new Date();

	year  = now.getFullYear();
	month = now.getMonth() + 1;
	day   = now.getDate();

	nextMonth     = ( month == 12 ? 1 : parseInt( month ) + 1 );
	nextMonthYear = ( month == 12 ? parseInt( year ) + 1 : year );

	html  = "<table style=\"margin-top:" + topMargin + "px\"><tr style=\"vertical-align:top\"><td>";
	html += calendar( year, month, day );
	html += "</td><td>";
	html += calendar( nextMonthYear, nextMonth, 0 );
	html += "</td></tr></table>";

	document.write( html );

	for( i = 0; i < workingDayList.length; i++ ){
		if( workingDayList[ i ].substring( 0, 6 ) == ( year + ( month < 10 ? "0" : "" ) + month ) ||
			workingDayList[ i ].substring( 0, 6 ) == ( nextMonthYear + ( nextMonth < 10 ? "0" : "" ) + nextMonth )
		){
			document.getElementById( workingDayList[ i ] ).style.color = "#000000";
		}
	}
}

/* ▲▲▲ 「配送日時のご指定」内の営業日カレンダー ここまで ▲▲▲ */

/* ▼▼▼ 商品配送日テーブルを表示 ここから ▼▼▼ */
function deliveryGuide( limit, detailUrl ){
  var limitHour = Number(limit.split('-')[0]);
  var preparationDays = Number(limit.split('-')[1]);

	var html, htmlBuffer, i, j, now, currentDate, acceptanceDate, shipmentDate, deliveryDate, dateStatus = 0;
	now         = new Date();
	currentDate = now;

	// 受注受付日算出（時間内最短営業日、人的確認可能日） -> acceptanceDate
	acceptanceDate = now;
	// 受付時間外であれば翌日受付扱い
	if( acceptanceDate.getHours() >= limitHour ){
		acceptanceDate = new Date( acceptanceDate.valueOf() + ( 1000 * 24 * 60 * 60 ) );
	}
	// 受注日を含む最短営業日を受付日として算出
	while( arrayIndex( workingDayList, acceptanceDate.getFullYear() + ( ( acceptanceDate.getMonth() + 1 ) < 10 ? "0" : "" ) + ( acceptanceDate.getMonth() + 1 ) + ( ( acceptanceDate.getDate() ) < 10 ? "0" : "" ) + ( acceptanceDate.getDate() ) ) == -1 ){
		acceptanceDate = new Date( acceptanceDate.valueOf() + ( 1000 * 24 * 60 * 60 ) );
	}
	// 出荷可能日
	shipmentDate = acceptanceDate;	// 当該商品出荷可能日を初期化
	for( i = 0; i < preparationDays; i++ ){
		shipmentDate = new Date( shipmentDate.valueOf() + ( 1000 * 24 * 60 * 60 ) );	// 出荷までの所用日数に達するまで次の日に進める
		while( arrayIndex( workingDayList, shipmentDate.getFullYear() + ( ( shipmentDate.getMonth() + 1 ) < 10 ? "0" : "" ) + ( shipmentDate.getMonth() + 1 ) + ( ( shipmentDate.getDate() ) < 10 ? "0" : "" ) + ( shipmentDate.getDate() ) ) == -1 ){
			shipmentDate = new Date( shipmentDate.valueOf() + ( 1000 * 24 * 60 * 60 ) );	// 更に営業日以外は次の日に進める
		}
	}
	// 最短到着可能
	deliveryDate = new Date( shipmentDate.valueOf() + ( 1000 * 24 * 60 * 60 ) );

	htmlBuffer = "";
  html = "<div style=\"position:relative;width:610px;height:160px;background-repeat:no-repeat;background-image:url( ../../img/delivery_table/board.jpg );margin:0\">"
	html += "<table><tr><td>";
	html += "<div style=\"width:500px;position:absolute;top:10px;left:10px\"><img src=\"../../img/delivery_table/kochiraha.gif\" style=\"vertical-align:top\">";
	//html += "<span style=\"font-size:18px;font-weight:bold;color:#ff0000\">" + ( shipmentDate.getMonth() + 1 ) + "月" + shipmentDate.getDate() + "日</span>";
	html += "<img src=\"../../img/delivery_table/L" + parseInt( ( shipmentDate.getMonth() + 1 ) / 10 ) + ".gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/L" + ( ( shipmentDate.getMonth() + 1 ) % 10 ) + ".gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/Lmonth.gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/L" + parseInt( shipmentDate.getDate() / 10 ) + ".gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/L" + ( shipmentDate.getDate() % 10 ) + ".gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/Lday.gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/nishukka.gif\" style=\"vertical-align:top\"></div>";
	//html += "<span style=\"font-size:18px;font-weight:bold;color:#ff0000\">" + ( deliveryDate.getMonth() + 1 ) + "月" + deliveryDate.getDate() + "日</span>";
	html += "<div style=\"width:500px;position:absolute;top:35px;left:10px\"><img src=\"../../img/delivery_table/saitan.gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/L" + parseInt( ( deliveryDate.getMonth() + 1 ) / 10 ) + ".gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/L" + ( ( deliveryDate.getMonth() + 1 ) % 10 ) + ".gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/Lmonth.gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/L" + parseInt( deliveryDate.getDate() / 10 ) + ".gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/L" + ( deliveryDate.getDate() % 10 ) + ".gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/Lday.gif\" style=\"vertical-align:top\">";
	html += "<img src=\"../../img/delivery_table/tonarimasu.gif\" style=\"vertical-align:top\"></div>";
	html += "<div style=\"width:500px;position:absolute;top:60px;left:15px;font-size:0.8em;\">営業日" + limitHour + ":00までのご注文は" + ( preparationDays == 0 ? "<span style=\"color:#ff0000\">即日出荷</span>" : "<span style=\"color:#0000ff\">" + preparationDays + "営業日出荷</span>" ) + "いたします。※お届け日は最も近い配送エリアの場合<br />";
	html += "<a href=\"" + detailUrl + "\" style=\"color:#0000ff;\">詳細はこちらをクリックください。</a></div>"

	html += "<table style=\"position:absolute;top:100px;left:5px;width:590px;background-color:#000000;font-size:12px;margin:2px auto 0 5px\" cellspacing=\"1\">";
	html += "<tr style=\"background-color:#eeffff\">";
	for( i = 0; i <= 9; i++ ){
		var workDayFlag = 0, dateComment = "";
		for( j = 0; j < workingDayList.length; j++ ){
			if( workingDayList[ j ].indexOf( currentDate.getFullYear() + ( ( currentDate.getMonth() + 1 ) < 10 ? "0" : "" ) + ( currentDate.getMonth() + 1 ) + ( ( currentDate.getDate() ) < 10 ? "0" : "" ) + ( currentDate.getDate() ) ) != -1 ){
				workDayFlag = 1;
				break;
			}
		}
		html += "<td" + ( workDayFlag == 0 ? " style=\"text-align:center;padding:3px;color:#ff0000;\"" : " style=\"text-align:center;padding:3px;\"" ) + ">" + ( currentDate.getMonth() + 1 ) + "/" + currentDate.getDate() + "(" + week[ currentDate.getDay() ] + ")</td>";
		if( currentDate.getFullYear() == shipmentDate.getFullYear() && ( currentDate.getMonth() + 1 ) == ( shipmentDate.getMonth() + 1 ) && currentDate.getDate() == shipmentDate.getDate() ){
			dateComment = "<img src=\"../../img/delivery_table/syukka.gif\" style=\"vertical-align:middle\">";
			dateStatus = 2;
		}
		else if( currentDate.getFullYear() == acceptanceDate.getFullYear() && ( currentDate.getMonth() + 1 ) == ( acceptanceDate.getMonth() + 1 ) && currentDate.getDate() == acceptanceDate.getDate() ){
			dateComment = "<img src=\"../../img/delivery_table/uketsuke.gif\" style=\"vertical-align:middle\">";
			dateStatus = 1;
		}
		else if( dateStatus == 1 ){
			dateComment = "→<br>";
		}
		if( currentDate.getFullYear() == deliveryDate.getFullYear() && ( currentDate.getMonth() + 1 ) == ( deliveryDate.getMonth() + 1 ) && currentDate.getDate() == deliveryDate.getDate() ){
			dateComment = "<img src=\"../../img/delivery_table/otodoke.gif\" style=\"vertical-align:middle\">";
			dateStatus = 3;
		}
		htmlBuffer += "<td" + ( dateStatus == 0 || dateStatus == 4 ? " style=\"padding:3px;background-color:#f4f4f4\"" : " style=\"padding:3px;\"" ) + ">" + dateComment + "</td>";
		if( dateStatus == 3 ){
			dateStatus = 4;
		}
		currentDate = new Date( currentDate.valueOf() + ( 1000 * 24 * 60 * 60 ) );
	}
	html += "</tr>";
	html += "<tr style=\"text-align:center;background-color:#ffffff\">" + htmlBuffer + "</tr>";
	html += "</table>";

	html += "</td></tr></table></div>";

	document.write( html );
}
/* ▲▲▲ 商品配送日テーブルを表示 ここまで ▲▲▲ */

/*******************************************************************************
/
/   配列中に値が含まれているかどうかを返す
/   input  $data 検索する値
/        @list 値を含む可能性のある配列
/   output       含まれているかどうかを返す
/              0以上・・・含まれるインデックス
/              0未満・・・含まれない
/
/******************************************************************************/
function arrayIndex( list, value ){
	var i, index;
	index = -1;

	for( i = 0; i <= list.length; i++ ){
		if( list[ i ] == value ){
			index = i;
			break;
		}
	}
	return index;
}

/* ▼▼▼ お気に入りに追加 ここから ▼▼▼ */
function addBookMark() {
  var title = document.title;
  var url = location.href;
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} 
	else if( document.all ) {
		window.external.AddFavorite( url, title);
	}
	else if( window.opera && window.print ) {
		return true;
	}
}
/* ▲▲▲ お気に入りに追加 ここまで */



