
//別ウィンドウオープン
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//年報注文　合計処理
function sum(){
	var sumAll;
	var yasai = document.nenpou_orderForm.order_yasai.value;
	var kajitu = document.nenpou_orderForm.order_kajitu.value;

	if(isDigit(yasai) && isDigit(kajitu)){
		sumAll = (Number(yasai) + Number(kajitu)) * 3200;
		document.nenpou_orderForm.sumArea.value = sumAll;
	  } else {
	  alert("ご注文の数量は半角数字で入力してください");
	  document.nenpou_orderForm.sumArea.value = "エラー";
	  }
}

// 数字かどうかチェック
function isDigit( str ){
    for( i = 0 ; i < str.length ; i ++ ){
        var c = str.charAt( i );
		//alert(c);
        if( "0" <= c && c <= "9"){
			continue;
        }else{
            return false;
        }
    }
    return true;
}


//NEWアイコンの表示期限
//旬報：４日間
//月報：１０日間
//概要：
//年報：３０日間
function chk_DateForNewIcon(update_year,update_month,update_day,time,category){
//for IE
	var nowDate = new Date();
	var updateDate = new Date(update_year,update_month-1,update_day);
	var chkDate = nowDate - updateDate;
	var difference = chkDate/(1000*60*60*24);
	
	if(difference < time){
		//alert("期限内");
		document.write('<img src="images/icon-new.gif" alt="NEW" name="'+ category + '" width="35" height="14" id="'+ category +'">');
		//document.getElementById(category).style.display = "inline";
	}else{
		//document.getElementById(category).style.display = "none";
		//alert("期限切れ");
	}
		
}