function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function galaf(linkLoc) {
 if(linkLoc !="") { window.location.href=linkLoc;}
}

function gothic(){
  if(document.sal1.option1.selectedIndex == ""){
    alert("用紙タイプを選択してください。");
	document.sal1.option1.focus();
    return false;
  }
  if(document.sal1.option2.selectedIndex == ""){
    alert("紙の厚さを選択してください。");
	document.sal1.option2.focus();
    return false;
  }
}

//無線綴じ
function gothic2(){
  if(document.sal1.option1.selectedIndex == ""){
    alert("表紙：用紙タイプを選択してください。");
	document.sal1.option1.focus();
    return false;
  }
  if(document.sal1.option2.selectedIndex == ""){
    alert("本文：用紙タイプを選択してください。");
	document.sal1.option2.focus();
    return false;
  }
  if(document.sal1.option3.selectedIndex == ""){
    alert("本文：用紙の厚さを選択してください。");
	document.sal1.option3.focus();
    return false;
  }
}

//ポケットホルダー
function gothic3(){
  if(document.sal1.option1.selectedIndex == ""){
    alert("ポケットタイプを選択してください。");
	document.sal1.option1.focus();
    return false;
  }
}

//封筒刷り込み
function gothic4(){
	if(document.sal1.option2.selectedIndex == ""){
		alert("封筒の色を選択してください。");
		document.sal1.option2.focus();
		return false;
	}else if(document.sal1.option3[0].checked == false && document.sal1.option3[1].checked == false){
		alert("刷り色を指定してください。");
		return false;
	}else if(document.sal1.option3[1].checked == true && document.sal1.DicNo1.value == ""){
		alert("DIC No.を指定してください。");
		document.sal1.DicNo1.focus();
		return false;
	}else if(document.sal1.option1[0].checked == false && document.sal1.option1[1].checked == false){
		alert("郵便番号枠の有無を指定してください。");
		return false;
	}
}

//3折・4折パンフレット
function gothic5(){
	if(document.sal1.option1.selectedIndex == ""){
		alert("用紙タイプを選択してください。");
		document.sal1.option1.focus();
		return false;
	}else if(document.sal1.option2.selectedIndex == ""){
		alert("折タイプを選択してください。");
		document.sal1.option2.focus();
		return false;
	}
}
  
function getRenryo(x){
	ind = document.sal1.option1.selectedIndex;
	if(x=="1"){
		opt = 2;}else if(x=="2"){opt = 1;}
	if(ind=="1"){
		document.sal1.option2.options[opt].value="73kg";document.sal1.option2.options[opt].text="73kg";
	}else if(ind=="2"||ind=="3"){
		document.sal1.option2.options[opt].value="70kg";document.sal1.option2.options[opt].text="70kg";
	}
	
}  
function getRenryo_A2B3(){
	ind = document.sal1.option1.selectedIndex;
	if(ind=="1"||ind=="3"){
		document.sal1.option2.options[2].value="73kg";document.sal1.option2.options[2].text="73kg";
	}else if(ind=="2"||ind=="4"){
		document.sal1.option2.options[2].value="70kg";document.sal1.option2.options[2].text="70kg";
	}
}
function getRenryo2(){
	ind = document.sal1.option2.selectedIndex;
	if(ind=="1"){
		document.sal1.option3.options[1].value="73kg";document.sal1.option3.options[1].text="73kg";
	}else if(ind=="2"||ind=="3"){
		document.sal1.option3.options[1].value="70kg";document.sal1.option3.options[1].text="70kg";
	}
	
}
function getRenryo_nakaA4B5(){
	ind = document.sal1.option1.selectedIndex;
	if(ind=="1"||ind=="4"){
		document.sal1.option2.options[1].value="73kg";document.sal1.option2.options[1].text="73kg";
	}else if(ind=="2"||ind=="3"||ind=="5"||ind=="6"){
		document.sal1.option2.options[1].value="70kg";document.sal1.option2.options[1].text="70kg";
	}
	
}

function getCoverOpt(){
	ind = document.sal1.option1.selectedIndex;
	if(ind=="1"||ind=="2"){
		document.sal1.option2.options[1].value="135kg";document.sal1.option2.options[1].text="135kg";
		document.sal1.option2.options[2].value="180kg";document.sal1.option2.options[2].text="180kg";
		document.sal1.option2.options[3].value="220kg";document.sal1.option2.options[3].text="220kg";
		document.sal1.option2.options[4].value="";document.sal1.option2.options[4].text="";
	}else if(ind=="3"){
		document.sal1.option2.options[1].value="160kg";document.sal1.option2.options[1].text="160kg";
		document.sal1.option2.options[2].value="180kg";document.sal1.option2.options[2].text="180kg";
		document.sal1.option2.options[3].value="200kg";document.sal1.option2.options[3].text="200kg";
		document.sal1.option2.options[4].value="220kg";document.sal1.option2.options[4].text="220kg";
	}else if(ind=="4"||ind=="6"){
		document.sal1.option2.options[1].value="220kg";document.sal1.option2.options[1].text="220kg";
		document.sal1.option2.options[2].value="";document.sal1.option2.options[2].text="";
		document.sal1.option2.options[3].value="";document.sal1.option2.options[3].text="";
		document.sal1.option2.options[4].value="";document.sal1.option2.options[4].text="";
		document.sal1.option2.options[1].selected=true;
	}else if(ind=="5"){
		document.sal1.option2.options[1].value="160kg";document.sal1.option2.options[1].text="160kg";
		document.sal1.option2.options[2].value="";document.sal1.option2.options[2].text="";
		document.sal1.option2.options[3].value="";document.sal1.option2.options[3].text="";
		document.sal1.option2.options[4].value="";document.sal1.option2.options[4].text="";
		document.sal1.option2.options[1].selected=true;
	}else if(ind=="7"){
		document.sal1.option2.options[1].value="135kg";document.sal1.option2.options[1].text="135kg";
		document.sal1.option2.options[2].value="180kg";document.sal1.option2.options[2].text="180kg";
		document.sal1.option2.options[3].value="";document.sal1.option2.options[3].text="";
		document.sal1.option2.options[4].value="";document.sal1.option2.options[4].text="";
	}
}

function getOp(xo){
	if(xo=="1"){
		if(document.sal1.option3[0].checked == true){
			document.sal1.option3.value ="刷:黒";
		}else if(document.sal1.option3[1].checked == true){
			document.getElementById("dic1").value ="刷:DIC"+document.sal1.DicNo1.value;
		}
	}else if(xo=="2"){
		if(document.sal1.option3[0].checked == true){
			document.getElementById("dic1").value = "刷:黒/DIC" + document.sal1.DicNo1.value;
		}else if(document.sal1.option3[1].checked == true){
			document.getElementById("dic2").value = "刷:DIC" + document.sal1.DicNo1.value + "," + document.sal1.DicNo2.value;
		}
	}
}
function getColor(xc){
	if(xc=="1"){
		if(document.sal1.option3[0].checked == true){
			document.sal1.option3[0].value ="刷:黒";
			document.getElementById("dicNo1").style.visibility = "hidden";
			document.sal1.DicNo1.value = "";
		}else if(document.sal1.option3[1].checked == true){
			document.sal1.option3[1].value ="刷:DIC";
			document.getElementById("dicNo1").style.visibility = "visible";
			document.sal1.DicNo1.value = "";
			document.sal1.DicNo1.focus();
		}
	}else if(xc=="2"){
		if(document.sal1.option3[0].checked == true){
			document.sal1.option3[0].value ="刷:黒/DIC";
			document.getElementById("dicNo1").style.visibility="visible";
			document.getElementById("dicNo2").style.visibility="hidden";
			document.sal1.DicNo1.focus();
			document.sal1.DicNo1.value = "";
		}else if(document.sal1.option3[1].checked == true){
			document.sal1.option3[1].value ="刷:DIC";
			document.getElementById("dicNo1").style.visibility="visible";
			document.getElementById("dicNo2").style.visibility="visible";
			document.sal1.DicNo1.value = "";
			document.sal1.DicNo2.value = "";
			document.sal1.DicNo1.focus();
		}
	}
}
function getcity(){
	if(document.sal1.option2.value == "アクア"){
		document.getElementById("hddn1").style.visibility = "hidden";
		document.getElementById("hddn1").style.position = "absolute";
		document.getElementById("hddn2").style.visibility = "visible";
		document.getElementById("hddn2").style.position = "relative";
		document.sal1.option1[0].checked = true;
		document.sal1.option1[1].disabled = true;
	}else{
		document.getElementById("hddn1").style.visibility = "visible";
		document.getElementById("hddn1").style.position = "relative";
		document.getElementById("hddn2").style.visibility = "hidden";
		document.getElementById("hddn2").style.position = "absolute";
		document.sal1.option1[0].checked = false;
		document.sal1.option1[1].disabled = false;
	}
}