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_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_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 MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
dispArea01Flg="0";
dispArea02Flg="0";
dispArea03Flg="0";
dispArea04Flg="0";
dispArea05Flg="0";
dispArea06Flg="0";
dispArea07Flg="0";
dispArea08Flg="0";
dispArea09Flg="0";
dispArea10Flg="0";
dispArea11Flg="0";
dispArea12Flg="0";
dispArea13Flg="0";
dispArea14Flg="0";
dispArea15Flg="0";
dispArea16Flg="0";

function dispArea01() { document.getElementById('Area01').style.display = "block";}
function dispArea02() { document.getElementById('Area02').style.display = "block";}
function dispArea03() { document.getElementById('Area03').style.display = "block";}
function dispArea04() { document.getElementById('Area04').style.display = "block";}
function dispArea05() { document.getElementById('Area05').style.display = "block";}
function dispArea06() { document.getElementById('Area06').style.display = "block";}
function dispArea07() { document.getElementById('Area07').style.display = "block";}
function dispArea08() { document.getElementById('Area08').style.display = "block";}
function dispArea09() { document.getElementById('Area09').style.display = "block";}
function dispArea10() { document.getElementById('Area10').style.display = "block";}
function dispArea11() { document.getElementById('Area11').style.display = "block";}
function dispArea12() { document.getElementById('Area12').style.display = "block";}
function dispArea13() { document.getElementById('Area13').style.display = "block";}
function dispArea14() { document.getElementById('Area14').style.display = "block";}
function dispArea15() { document.getElementById('Area15').style.display = "block";}
function dispArea16() { document.getElementById('Area16').style.display = "block";}

function catalog_chk(){
	var msg="";
	var msg2="";
	
	
	if((document.form1.catalog01.checked==false)&&(document.form1.catalog02.checked==false)&&(document.form1.catalog04.checked==false)&&(document.form1.catalog05.checked==false)){
		msg +="カタログまたは情報誌\n";
	}
	if(document.form1.name_com.value ==""){
		msg +="会社名\n";
	}
	if(document.form1.busho.value ==""){
		msg +="部課名\n";
	}
	if(document.form1.name.value ==""){
		msg +="氏名\n";
	}
	if(document.form1.gyoushu.value ==""){
		msg +="業種\n";
	}
	if(document.form1.gyoutai.value ==""){
		msg +="業態\n";
	}
	if(document.form1.shoukushu.value ==""){
		msg +="職種\n";
	}
	if(document.form1.field.value ==""){
		msg +="担当分野\n";
	}
	if((document.form1.zip_01.value=="") || (document.form1.zip_02.value=="")){
			msg +="郵便番号\n";
	}else{
		flag1 = 0;
		flag2 = 0;
		if(document.form1.zip_01.value.match(/[^0-9]+/)){ 
			flag1 = 1; 
		}
		if(document.form1.zip_01.value.length!=3){
			flag1 = 1;
		}
		if(document.form1.zip_02.value.match(/[^0-9]+/)){ 
			flag2 = 1; 
		}
		if(document.form1.zip_02.value.length!=4){
			flag2 = 1;
		}
		if((flag1==1) || (flag2==1)){
			msg +="郵便番号は半角数字3桁＋4桁で正しく入力してください\n";
		}
	}
	if(document.form1.ken.value ==""){
		msg +="都道府県\n";
	}
	if(document.form1.add.value ==""){
		msg +="住所\n";
	}
	if(document.form1.tel.value ==""){
		msg +="TEL\n";
	}
	if(document.form1.fax.value ==""){
		msg +="FAX\n";
	}
	if(document.form1.email.value ==""){
		msg +="E-mail\n";
	}
		

	if(msg!=""){
		if(msg2!=""){
			alert("下記の項目を入力してください\n\n"+msg+"\n"+msg2);
			return;
		}else{
			alert("下記の項目を入力してください\n\n"+msg);
			return;
		}
	}else{
		if(msg2!=""){
			alert(msg2);
			return;
		}else{
					document.form1.submit();
		}
	}
}
function contact_chk(){
	var msg="";
	var msg2="";
	
	if((document.form1.naiyou[0].checked ==false)&&(document.form1.naiyou[1].checked ==false)&&(document.form1.naiyou[2].checked ==false)&&(document.form1.naiyou[3].checked ==false)){
		msg +="お問い合わせ内容\n";
	}
	
	if(document.form1.name_com.value ==""){
		msg +="会社名\n";
	}
	if(document.form1.busho.value ==""){
		msg +="部課名\n";
	}
	if(document.form1.name.value ==""){
		msg +="氏名\n";
	}
	if(document.form1.gyoushu.value ==""){
		msg +="業種\n";
	}
	if(document.form1.gyoutai.value ==""){
		msg +="業態\n";
	}
	if(document.form1.shoukushu.value ==""){
		msg +="職種\n";
	}
	if((document.form1.zip_01.value=="") || (document.form1.zip_02.value=="")){
			msg +="郵便番号\n";
	}else{
		flag1 = 0;
		flag2 = 0;
		if(document.form1.zip_01.value.match(/[^0-9]+/)){ 
			flag1 = 1; 
		}
		if(document.form1.zip_01.value.length!=3){
			flag1 = 1;
		}
		if(document.form1.zip_02.value.match(/[^0-9]+/)){ 
			flag2 = 1; 
		}
		if(document.form1.zip_02.value.length!=4){
			flag2 = 1;
		}
		if((flag1==1) || (flag2==1)){
			msg +="郵便番号は半角数字3桁＋4桁で正しく入力してください\n";
		}
	}
	if(document.form1.ken.value ==""){
		msg +="都道府県\n";
	}
	if(document.form1.add.value ==""){
		msg +="住所\n";
	}
	if(document.form1.tel.value ==""){
		msg +="TEL\n";
	}
	if(document.form1.fax.value ==""){
		msg +="FAX\n";
	}
	if(document.form1.email.value ==""){
		msg +="E-mail\n";
	}
		

	if(msg!=""){
		if(msg2!=""){
			alert("下記の項目を入力してください\n\n"+msg+"\n"+msg2);
			return;
		}else{
			alert("下記の項目を入力してください\n\n"+msg);
			return;
		}
	}else{
		if(msg2!=""){
			alert(msg2);
			return;
		}else{
					document.form1.submit();
		}
	}
}
function plus_chk(){
	var msg="";
	var msg2="";
	
	if(document.form1.name_com.value ==""){
		msg +="会社名\n";
	}
	if(document.form1.busho.value ==""){
		msg +="部課名\n";
	}
	if(document.form1.name.value ==""){
		msg +="氏名\n";
	}
	if(document.form1.gyoushu.value ==""){
		msg +="業種\n";
	}
	if(document.form1.gyoutai.value ==""){
		msg +="業態\n";
	}
	if(document.form1.shoukushu.value ==""){
		msg +="職種\n";
	}
	if((document.form1.zip_01.value=="") || (document.form1.zip_02.value=="")){
			msg +="郵便番号\n";
	}else{
		flag1 = 0;
		flag2 = 0;
		if(document.form1.zip_01.value.match(/[^0-9]+/)){ 
			flag1 = 1; 
		}
		if(document.form1.zip_01.value.length!=3){
			flag1 = 1;
		}
		if(document.form1.zip_02.value.match(/[^0-9]+/)){ 
			flag2 = 1; 
		}
		if(document.form1.zip_02.value.length!=4){
			flag2 = 1;
		}
		if((flag1==1) || (flag2==1)){
			msg +="郵便番号は半角数字3桁＋4桁で正しく入力してください\n";
		}
	}
	if(document.form1.ken.value ==""){
		msg +="都道府県\n";
	}
	if(document.form1.add.value ==""){
		msg +="住所\n";
	}
	if(document.form1.tel.value ==""){
		msg +="TEL\n";
	}
	if(document.form1.fax.value ==""){
		msg +="FAX\n";
	}
		

	if(msg!=""){
		if(msg2!=""){
			alert("下記の項目を入力してください\n\n"+msg+"\n"+msg2);
			return;
		}else{
			alert("下記の項目を入力してください\n\n"+msg);
			return;
		}
	}else{
		if(msg2!=""){
			alert(msg2);
			return;
		}else{
					document.form1.submit();
		}
	}
}
function entry_chk(){
	var msg="";
	var msg2="";
	
	if(document.form1.name.value ==""){
		msg +="氏名\n";
	}
	

	if(msg!=""){
		if(msg2!=""){
			alert("下記の項目を入力してください\n\n"+msg+"\n"+msg2);
			return;
		}else{
			alert("下記の項目を入力してください\n\n"+msg);
			return;
		}
	}else{
		if(msg2!=""){
			alert(msg2);
			return;
		}else{
					document.form1.submit();
		}
	}
}
function outside_chk(){
	var msg="";
	var msg2="";
	
	
	
	if(document.form1.name_com.value ==""){
		msg +="会社名\n";
	}
	if(document.form1.busho.value ==""){
		msg +="部課名\n";
	}
	if(document.form1.name.value ==""){
		msg +="氏名\n";
	}
	
	/*if((document.form1.zip_01.value=="") || (document.form1.zip_02.value=="")){
			msg +="郵便番号\n";
	}else{
		flag1 = 0;
		flag2 = 0;
		if(document.form1.zip_01.value.match(/[^0-9]+/)){ 
			flag1 = 1; 
		}
		if(document.form1.zip_01.value.length!=3){
			flag1 = 1;
		}
		if(document.form1.zip_02.value.match(/[^0-9]+/)){ 
			flag2 = 1; 
		}
		if(document.form1.zip_02.value.length!=4){
			flag2 = 1;
		}
		if((flag1==1) || (flag2==1)){
			msg +="郵便番号は半角数字3桁＋4桁で正しく入力してください\n";
		}
	}*/
	if(document.form1.ken.value ==""){
		msg +="都道府県\n";
	}
	if(document.form1.add.value ==""){
		msg +="住所\n";
	}
	if(document.form1.tel.value ==""){
		msg +="TEL\n";
	}
	if(document.form1.fax.value ==""){
		msg +="FAX\n";
	}
	var i=0;
	var j=0;
	var i_flg="0";
	var j_flg="0";
	for(i=0;document.form1.kind1.length>i;i++){
			if(document.form1.kind1[i].checked==true){
				i_flg="1";
			}
	}
	if(i_flg=="0"){
		msg +="貴社の主な部品種別\n";
	}
	for(j=0;document.form1.kind2.length>j;j++){
			if(document.form1.kind2[j].checked==true){
				j_flg="1";
			}
	}
	if(j_flg=="0"){
		msg +="貴社の主な加工種別\n";
	}
		

	if(msg!=""){
		if(msg2!=""){
			alert("下記の項目を入力してください\n\n"+msg+"\n"+msg2);
			return;
		}else{
			alert("下記の項目を入力してください\n\n"+msg);
			return;
		}
	}else{
		if(msg2!=""){
			alert(msg2);
			return;
		}else{
					document.form1.submit();
		}
	}
}

function chk_catalog_01(){
	if(document.form1.catalog01.checked==false){
		document.form1.catalog01.checked=true;
	}else{
		document.form1.catalog01.checked=false;
	}
}
function chk_catalog_02(){
	if(document.form1.catalog02.checked==false){
		document.form1.catalog02.checked=true;
	}else{
		document.form1.catalog02.checked=false;
	}
}
function chk_catalog_03(){
	if(document.form1.catalog03.checked==false){
		document.form1.catalog03.checked=true;
	}else{
		document.form1.catalog03.checked=false;
	}
}
function chk_catalog_04(){
	if(document.form1.catalog04.checked==false){
		document.form1.catalog04.checked=true;
	}else{
		document.form1.catalog04.checked=false;
	}
}
function chk_catalog_05(){
	if(document.form1.catalog05.checked==false){
		document.form1.catalog05.checked=true;
	}else{
		document.form1.catalog05.checked=false;
	}
}
function chk_catalog_06(){
	if(document.form1.catalog06.checked==false){
		document.form1.catalog06.checked=true;
	}else{
		document.form1.catalog06.checked=false;
	}
}
function chk_catalog_07(){
	if(document.form1.catalog07.checked==false){
		document.form1.catalog07.checked=true;
	}else{
		document.form1.catalog07.checked=false;
	}
}
function chk_catalog_08(){
	if(document.form1.catalog08.checked==false){
		document.form1.catalog08.checked=true;
	}else{
		document.form1.catalog08.checked=false;
	}
}

var nagomiWin;
function nagomi(no){
	no = no.toString();
	var openHTML = "m_"+no+".html";
	if(nagomiWin){
		nagomiWin.close();
	}
	nagomiWin = window.open(openHTML,'NagomiMusic','scrollbars=yes,width=600,height=480');
}
var r=Math.floor(Math.random()*4);
function imgChg(){
	
	atImg_01=new Array();
	
	atImg_01[0] ='<a href="environment/index.html"><img src="image/top/pr.jpg" alt="パンチ工業は環境のことを考えます。　パンチ工業は2006年7月から全ての商品でグリーン商品100%対応します。" width="180" height="140" border="0"></a>';
	atImg_01[1] ='<a href="business/fa/pr/03.html"><img src="image/top/pr_fa2.jpg" alt="高精度・コンパクト・自由度　ミニチュアスライドガイド登場" width="180" height="140" border="0"></a>';
	atImg_01[2] ='<a href="business/mold/pr/03.html"><img src="image/top/pr_pra.jpg" alt="2007 新商品！！　パンチ工業のプラスチック金型用部品は、金型から成型加工まで、お客様をトータルにサポートします。" width="180" height="140" border="0"></a>';
	atImg_01[3] ='<a href="business/press/pr/index.html"><img src="image/top/pr_pre.jpg" alt="プレス金型技術情報 Vol.02 プレス打抜き加工におけるパンチとボタンダイのクリアランス選定について事例を挙げて紹介します。" width="180" height="140" border="0"></a>';
	document.write(atImg_01[r]);
	
}
function uniton(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_01_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background　= "url(../../image/shared/product_bk_01_o.gif)";
}
}
function unitoff(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_01.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(../../image/shared/product_bk_01.gif)";
}
}
function unitclick(link){
location.href = link;
//=============================================
}
function uniton1(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../image/shared/product_bk_01_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background　= "url(../image/shared/product_bk_01_o.gif)";
}
}
function unitoff1(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../image/shared/product_bk_01.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(../image/shared/product_bk_01.gif)";
}
}
//=============================================
function uniton2(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_02_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background　= "url(../../image/shared/product_bk_02_o.gif)";
}
}
function unitoff2(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_02.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(../../image/shared/product_bk_02.gif)";
}
}
//=============================================
function uniton3(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_03_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background　= "url(../../image/shared/product_bk_03_o.gif)";
}
}
function unitoff3(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_03.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(../../image/shared/product_bk_03.gif)";
}
}
//=============================================
function uniton4(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_04_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background　= "url(../../image/shared/product_bk_04_o.gif)";
}
}
function unitoff4(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_04.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(../../image/shared/product_bk_04.gif)";
}
}
//=============================================
function uniton5(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_05_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background= "url(../../image/shared/product_bk_05_o.gif)";
}
}
function unitoff5(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../../image/shared/product_bk_05.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(../../image/shared/product_bk_05.gif)";
}
}
//=============================================
function uniton6(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../image/shared/product_bk_05_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background= "url(../image/shared/product_bk_05_o.gif)";
}
}
function unitoff6(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(../image/shared/product_bk_06.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(../image/shared/product_bk_06.gif)";
}
}
//=============================================
function unitonpra_01(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/tokutyu/product_01_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background= "url(image/tokutyu/product_01_o.gif)";
}
}
function unitoffpra_01(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/tokutyu/product_01.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(image/tokutyu/product_01.gif)";
}
}
//=============================================
function unitonpre_01(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/tokutyu/product_02_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background= "url(image/tokutyu/product_02_o.gif)";
}
}
function unitoffpre_01(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/tokutyu/product_02.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(image/tokutyu/product_02.gif)";
}
}
//=============================================
function unitonfa_01(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/tokutyu/product_03_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background= "url(image/tokutyu/product_03_o.gif)";
}
}
function unitofffa_01(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/tokutyu/product_03.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(image/tokutyu/product_03.gif)";
}
}

//=============================================
//外注加工先
function unitonpra_02(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/top/product_pra_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background= "url(image/top/product_pra_o.gif)";
}
}
function unitoffpra_02(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/top/product_pra.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(image/top/product_pra.gif)";
}
}
//=============================================
function unitonpre_02(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/top/product_pre_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background= "url(image/top/product_pre_o.gif)";
}
}
function unitoffpre_02(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/top/product_pre.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(image/top/product_pre.gif)";
}
}
//=============================================
function unitonfa_02(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/top/product_fa_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background= "url(image/top/product_fa_o.gif)";
}
}
function unitofffa_02(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/top/product_fa.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(image/top/product_fa.gif)";
}
}

//カタログ請求画面で前画面のデータを取得
function catalog_chk_onload(){
if(location.search){
		var data = location.search.substring(1, location.search.length);
		//アラートで?以降の文字を表示する
		data = data.toString();
		if(data == "01"){
			document.form1.catalog01.checked=true;
		}else if(data == "02"){
			document.form1.catalog02.checked=true;
		}else if(data == "03"){
			document.form1.catalog03.checked=true;
		}else if(data == "04"){
			document.form1.catalog04.checked=true;
		}else if(data == "05"){
			document.form1.catalog05.checked=true;
		}else if(data == "06"){
			document.form1.catalog06.checked=true;
		}else if(data == "07"){
			document.form1.catalog07.checked=true;
		}else if(data == "08"){
			document.form1.catalog08.checked=true;
		}
	}
}

//キャリアエントリー画面で前画面のデータを取得
function career_chk_onload(){
if(location.search){
		var data = location.search.substring(1, location.search.length);
		//アラートで?以降の文字を表示する
		data = data.toString();
		if(data == "01"){
			document.form1.career[0].checked=true;
		}else if(data == "02"){
			document.form1.career[1].checked=true;
		}
	}
}