// プレビュー
function previewWindow(url){
	window.open(url, "preview", "width=800, height=600, toolbars=no, statusbars=no, scrollbars=yes");
}

// サンプル
function sampleWindow(url){
	window.open(url, "preview", "width=1024, height=700, toolbars=no, statusbars=no, scrollbars=yes");
}

function my_catalog_close(myname,s,n){
	document.getElementById(myname + '_close').style.display = "block";
	document.getElementById(myname + '_open').style.display = "none";
	if(s==undefined && n==undefined){
		document.getElementById(myname).style.display = "none";
	}else{
		for(var i=s;i<=n;i++){
			document.getElementById(myname + i).style.display = "none";
		}
	}
}
function my_catalog_open(myname,s,n){
	document.getElementById(myname + '_close').style.display = "none";
	document.getElementById(myname + '_open').style.display = "block";
	if(s==undefined && n==undefined){
		document.getElementById(myname).style.display = "block";
	}else{
		for(var i=s;i<=n;i++){
			document.getElementById(myname + i).style.display = "block";
		}
	}
}

// 商品選択
function changeShohin(){
	var select_shohin       = document.form.select_shohin[document.form.select_shohin.selectedIndex].value;
	var select_shohin_array = select_shohin.split("_");
	var shohin_kanri_nendo  = select_shohin_array[0];
	var shohin_cd           = select_shohin_array[1];
	document.form.shohin_kanri_nendo.value = shohin_kanri_nendo;
	document.form.shohin_cd.value = shohin_cd;
	document.form.method = "get";
	document.form.action = "";
	document.form.submit();
}
