//Company
function Display_com(no){
 if(no == "no1"){
  document.getElementById("com-sw1").style.display = "block";
  document.getElementById("com-sw2").style.display = "none";
  document.getElementById("com-sw3").style.display = "none";
  document.getElementById("pan_com_name").innerHTML= "会社概要";
 }else if(no == "no2"){
  document.getElementById("com-sw1").style.display = "none";
  document.getElementById("com-sw2").style.display = "block";
  document.getElementById("com-sw3").style.display = "none";
  document.getElementById("pan_com_name").innerHTML= "代表挨拶";
 }else if(no == "no3"){
  document.getElementById("com-sw1").style.display = "none";
  document.getElementById("com-sw2").style.display = "none";
  document.getElementById("com-sw3").style.display = "block";
  document.getElementById("pan_com_name").innerHTML= "アクセスマップ";
 }
}

//contact
function Display_con(no){
 if(no == "no1"){
  document.getElementById("con-sw1").style.display = "block";
  document.getElementById("con-sw2").style.display = "none";
  document.getElementById("con-sw3").style.display = "none";
  document.getElementById("pan_con_name").innerHTML= "一般的なお問い合わせ";
 }else if(no == "no2"){
  document.getElementById("con-sw1").style.display = "none";
  document.getElementById("con-sw2").style.display = "block";
  document.getElementById("con-sw3").style.display = "none";
  document.getElementById("pan_con_name").innerHTML= "ビジネスパートナー募集";
 }else if(no == "no3"){
  document.getElementById("con-sw1").style.display = "none";
  document.getElementById("con-sw2").style.display = "none";
  document.getElementById("con-sw3").style.display = "block";
  document.getElementById("pan_con_name").innerHTML= "人材募集";
 }
}

//contact_thanks
function Thanks_con(no){
 if(no == "no1"){
  document.getElementById("con-sw1").style.display = "block";
  document.getElementById("con-sw2").style.display = "none";
  document.getElementById("pan_con_name").innerHTML= "一般的なお問い合わせ";
 }else if(no == "no2"){
  document.getElementById("con-sw1").style.display = "none";
  document.getElementById("con-sw2").style.display = "block";
  document.getElementById("pan_con_name").innerHTML= "ビジネスパートナー募集";
 }
}

/* 数字のみに統一 */
function chkCode(id) {
  work='';
  for (lp=0;lp<id.value.length;lp++) {
    unicode=id.value.charCodeAt(lp);
    if ((0xff0f<unicode) && (unicode<0xff1a)) {
      work+=String.fromCharCode(unicode-0xfee0);
    } else if ((0xff20<unicode) && (unicode<0xff3b)) {
      work+=String.fromCharCode(unicode-0xfee0);
    } else if ((0xff40<unicode) && (unicode<0xff5b)) {
      work+=String.fromCharCode(unicode-0xfee0);
    } else {
      work+=String.fromCharCode(unicode);
    }
  }
  id.value=work; /* 半角処理のみ */
  //id.value=work.toUpperCase(); /* 大文字に統一する場合に使用 */
  //id.value=work.toLowerCase(); /* 小文字に統一する場合に使用 */
}

function check_data(){
 var text="";
 var b_color=	"#FCACAC";
 var user = document.q1.user_st.selectedIndex;

//会社名・屋号未入力
 if(document.q1.user_st.options[user].value==1 && document.q1.com.value=="")
 {
  text = text + '・会社名が未入力です。\n';
  document.q1.com.style.backgroundColor = b_color;
 }

//名前未入力
 if(document.q1.name.value=="")
 {
  text = text + '・お名前が未入力です。\n';
  document.q1.name.style.backgroundColor = b_color;
 }
//メールアドレス未入力
 if(document.q1.email.value=="")
 {
  text = text + '・メールアドレスが未入力です。\n';
  document.q1.email.style.backgroundColor = b_color;
 }
//確認用メールアドレス未入力
 if(document.q1.r_email.value=="")
 {
  text = text + '・確認用メールアドレスが未入力です。\n';
  document.q1.r_email.style.backgroundColor = b_color;
 }
//お問い合わせ内容未入力
 if(document.q1.body.value=="")
 {
  text = text + '・お問い合わせ内容が未入力です。\n';
  document.q1.body.style.backgroundColor = b_color;
 }
//メールアドレスの相違
 if(document.q1.email.value!=document.q1.r_email.value)
 {
  text = text + '・メールアドレスが一致しません。\n';
  document.q1.email.style.backgroundColor = b_color;
  document.q1.r_email.style.backgroundColor = b_color;
 }

 if(text=='')
 { document.q1.submit(); }
 else
 {
  window.alert(text);
  return false;
 }
}


function check_data_bi(){
 var text="";
 var b_color=	"#FCACAC";
 var user = document.q1.user_st.selectedIndex;

//会社名・屋号未入力
 if(document.q2.com.value=="")
 {
  text = text + '・会社名・屋号が未入力です。\n';
  document.q2.com.style.backgroundColor = b_color;
 }
//名前未入力
 if(document.q2.name.value=="")
 {
  text = text + '・お名前が未入力です。\n';
  document.q2.name.style.backgroundColor = b_color;
 }
//電話番号未入力
 if(document.q2.tel.value=="")
 {
  text = text + '・お電話番号が未入力です。\n';
  document.q2.tel.style.backgroundColor = b_color;
 }
//メールアドレス未入力
 if(document.q2.email.value=="")
 {
  text = text + '・メールアドレスが未入力です。\n';
  document.q2.email.style.backgroundColor = b_color;
 }
//確認用メールアドレス未入力
 if(document.q2.r_email.value=="")
 {
  text = text + '・確認用メールアドレスが未入力です。\n';
  document.q2.r_email.style.backgroundColor = b_color;
 }

//メールアドレスの相違
 if(document.q2.email.value!=document.q2.r_email.value)
 {
  text = text + '・メールアドレスが一致しません。\n';
  document.q2.email.style.backgroundColor = b_color;
  document.q2.r_email.style.backgroundColor = b_color;
 }

 if(text=='')
 { document.q2.submit(); }
 else
 {
  window.alert(text);
  return false;
 }
}


function check_data_es(){
 var text="";
 var b_color=	"#FCACAC";
 var user = document.e1.user_st.selectedIndex;
 var make = document.e1.make_st.selectedIndex;


//会社名・屋号未入力
 if(document.e1.user_st.options[user].value==1 && document.e1.com.value=="")
 {
	text = text + '・会社名が未入力です。\n';
	document.e1.com.style.backgroundColor = b_color;
}

//名前未入力
 if(document.e1.name.value=="")
 {
	text = text + '・お名前が未入力です。\n';
	document.e1.name.style.backgroundColor = b_color;
 }

//メールアドレス未入力
 if(document.e1.email.value=="")
 {
	text = text + '・メールアドレスが未入力です。\n';
	document.e1.email.style.backgroundColor = b_color;
 }

//確認用メールアドレス未入力
 if(document.e1.r_email.value=="")
 {
 	text = text + '・確認用メールアドレスが未入力です。\n';
	document.e1.r_email.style.backgroundColor = b_color;
 }

//リニューアル時のサイトURL未入力
 if(document.e1.make_st.options[make].value==2 && document.e1.t_url.value=="")
 {
 	text = text + '・リニューアル先のURLが未入力です。\n';
	document.e1.t_url.style.backgroundColor = b_color;
 }

//予算有時の予算未入力
 if(document.e1.b_chk_st[0].checked==true && document.e1.budget.value=="")
 {
 	text = text + '・ご予算が未入力です。\n';
	document.e1.budget.style.backgroundColor = b_color;
 }

//納期有時の納期未入力
 if(document.e1.d_chk_st[0].checked==true && document.e1.d_date.value=="")
 {
 	text = text + '・納期が未入力です。\n';
	document.e1.d_date.style.backgroundColor = b_color;
 }

//メールアドレスの相違
 if(document.e1.email.value!=document.e1.r_email.value)
 {
 	text = text + '・メールアドレスが一致しません。\n';
	document.e1.email.style.backgroundColor = b_color;
	document.e1.r_email.style.backgroundColor = b_color;
 }

 if(text=='')
 {  document.e1.submit();  }
 else
 {
  window.alert(text);
  return false;
 }
}


function check_data_mo(){
 var text="";
 var b_color=	"#FCACAC";
 var user = document.e1.user_st.selectedIndex;
 var make = document.e1.make_st.selectedIndex;


//会社名・屋号未入力
 if(document.e1.user_st.options[user].value==1 && document.e1.com.value=="")
 {
	text = text + '・会社名が未入力です。\n';
	document.e1.com.style.backgroundColor = b_color;
}

//名前未入力
 if(document.e1.name.value=="")
 {
	text = text + '・お名前が未入力です。\n';
	document.e1.name.style.backgroundColor = b_color;
 }

//メールアドレス未入力
 if(document.e1.email.value=="")
 {
	text = text + '・メールアドレスが未入力です。\n';
	document.e1.email.style.backgroundColor = b_color;
 }

//確認用メールアドレス未入力
 if(document.e1.r_email.value=="")
 {
 	text = text + '・確認用メールアドレスが未入力です。\n';
	document.e1.r_email.style.backgroundColor = b_color;
 }

//予算有時の予算未入力
 if(document.e1.b_chk_st[0].checked==true && document.e1.budget.value=="")
 {
 	text = text + '・ご予算が未入力です。\n';
	document.e1.budget.style.backgroundColor = b_color;
 }

//納期有時の納期未入力
 if(document.e1.d_chk_st[0].checked==true && document.e1.d_date.value=="")
 {
 	text = text + '・納期が未入力です。\n';
	document.e1.d_date.style.backgroundColor = b_color;
 }

//ボリュームや内容
 if(document.e1.design.value=="")
 {
 	text = text + '・ボリュームや内容が未入力です。\n';
	document.e1.design.style.backgroundColor = b_color;
 }

//メールアドレスの相違
 if(document.e1.email.value!=document.e1.r_email.value)
 {
 	text = text + '・メールアドレスが一致しません。\n';
	document.e1.email.style.backgroundColor = b_color;
	document.e1.r_email.style.backgroundColor = b_color;
 }

 if(text=='')
 {  document.e1.submit();  }
 else
 {
  window.alert(text);
  return false;
 }
}