document.writeln("
");
document.writeln("
買い物メニュー
");
document.writeln(" ");
document.writeln(" ");
document.writeln(" ");
document.writeln(" ");
document.writeln(" ");
document.writeln(" ");
document.writeln("
");
function selectColor(colorCode, colorName){
document.getElementById('colorImg0000').className = 'select_off';
document.getElementById('sizeTable0000').style.display = 'none';
document.getElementById('tblSize0000910').className = 'tbl_size_off';
document.getElementById('tblStock0000910').className = 'tbl_stock_off';
document.getElementById('colorImg' + colorCode).className = 'select_on';
document.getElementById('sizeTable' + colorCode).style.display = 'block';
document.itemPageForm.selectColorCode.value = colorCode;
document.itemPageForm.selectSizeCode.value = '';
document.getElementById('colorNameLabel').innerText = colorName;
document.getElementById('colorNameLabel').textContent = colorName;
document.itemPageForm.selectColorName.value = '';
document.itemPageForm.selectSizeName.value = '';
imageChange(colorCode);
for(var key in sizeStockHash){
if(key.substring(0,4) == colorCode){
if(sizeStockHash[key]>=1){
document.getElementById('tblSize'+key).className = 'tbl_size_on';
document.getElementById('tblStock'+key).className = 'tbl_stock_on';
document.itemPageForm.selectSizeCode.value = key.substring(4,7);
document.itemPageForm.selectSizeName.value = sizeNameHash[key];
break;
}
}
}
}
function selectSize(colorCode, sizeCode, sizeName){
document.getElementById('tblSize0000910').className = 'tbl_size_off';
document.getElementById('tblStock0000910').className = 'tbl_stock_off';
document.getElementById('tblSize' + colorCode + sizeCode).className = 'tbl_size_on';
document.getElementById('tblStock' + colorCode + sizeCode).className = 'tbl_stock_on';
document.itemPageForm.selectSizeCode.value = sizeCode;
document.itemPageForm.selectSizeName.value = sizeName;
}
function buy(){
cCode = document.itemPageForm.selectColorCode.value;
sCode = document.itemPageForm.selectSizeCode.value;
vol = document.itemPageForm.volume.value;
if(cCode == '' || sCode == ''){
alert('カラー、サイズを選択してください');
} else if(vol == '' || vol < 0){
alert('数量を正しく入力してください');
} else {
document.shoppingCartForm.action.value='addItem';
document.shoppingCartForm.shopId.value=document.itemPageForm.shopId.value;
document.shoppingCartForm.dtlItemCode.value=document.itemPageForm.itemCode.value + cCode + sCode;
document.shoppingCartForm.volume.value=vol;
document.shoppingCartForm.imgDirPath.value='/images/item/000000/81000/81329';
document.shoppingCartForm.submit();
}
}
var imgArray = new Array();
imgArray["i0000"] = new Array('https://runnet.jp/images/item/000000/81000/813290000m.jpg','https://runnet.jp/images/item/dammy270150.gif');
function imageChange(colorCode){
var imgMain = new Image();
var imgBack = new Image();
imgMain.src = imgArray['i' + colorCode][0];
imgBack.src = imgArray['i' + colorCode][1];
document.getElementById('mainImage').src = imgMain.src;
document.getElementById('backImage').src = imgBack.src;
}
imageChange('0000');