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.catalog[0].checked==false)&&(document.form1.catalog[1].checked==false)){
		msg +="Catalog \n";
	}
	if(document.form1.name_com.value ==""){
		msg +="Company Name\n";
	}
	if(document.form1.busho.value ==""){
		msg +="Department/Section\n";
	}
	if(document.form1.name.value ==""){
		msg +="Name\n";
	}
	if(document.form1.add.value ==""){
		msg +="Address\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("Please input the following item. \n\n"+msg+"\n"+msg2);
			return;
		}else{
			alert("Please input the following item. \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 +="Subject of Inquiry\n";
	}
	
	if(document.form1.name_com.value ==""){
		msg +="Company Name\n";
	}
	if(document.form1.busho.value ==""){
		msg +="Department/Section\n";
	}
	if(document.form1.name.value ==""){
		msg +="Name\n";
	}
	if(document.form1.add.value ==""){
		msg +="Address\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("Please input the following item. \n\n"+msg+"\n"+msg2);
			return;
		}else{
			alert("Please input the following item. \n\n"+msg);
			return;
		}
	}else{
		if(msg2!=""){
			alert(msg2);
			return;
		}else{
					document.form1.submit();
		}
	}
}


function chk_catalog_01(){
	if(document.form1.catalog[0].checked==false){
		document.form1.catalog[0].checked=true;
	}else{
		document.form1.catalog[0].checked=false;
	}
}
function chk_catalog_02(){
	if(document.form1.catalog[1].checked==false){
		document.form1.catalog[1].checked=true;
	}else{
		document.form1.catalog[1].checked=false;
	}
}
function chk_catalog_03(){
	if(document.form1.catalog[2].checked==false){
		document.form1.catalog[2].checked=true;
	}else{
		document.form1.catalog[2].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');
}
function imgChg(){
	var r=Math.floor(Math.random()*4);
	atImg_01=new Array();
	
	atImg_01[0] ='<a href="environment/index.html"><img src="image/top/pr.jpg" alt="Punch Industry is environmentally thoughtful. All the products of Punch Industry Co.,Ltd. will fully meet the requirements for green products in and after July 2006." width="270" height="140" border="0"></a>';
	atImg_01[1] ='<a href="business/fa/pr/index.html"><img src="image/top/pr_fa.jpg" alt="Eco-friendly FA parts　From July 2006, PUNCH INDUSTRY will market green puroducts that are 100% compliance with environmental standards." width="270" height="140" border="0"></a>';
	atImg_01[2] ='<a href="business/mold/pr/index.html"><img src="image/top/pr_pra.jpg" alt="New commodities for 2007　Punch Industrys plastic molds give full support to clients from die mold-producing to injection molding processes." width="270" height="140" border="0"></a>';
	atImg_01[3] ='<a href="business/press/pr/index.html"><img src="image/top/pr_pre.jpg" alt="New products 2006　Punch Industrys press die parts are high in durability and precision and satisfy clientsﾕ needs." width="270" 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 unitonsemi_01(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/tokutyu/product_04_o.gif)";
}else{
document.getElementById('Pro'+unitid).style.background= "url(image/tokutyu/product_04_o.gif)";
}
}
function unitoffsemi_01(unitid){
unitid=unitid.toString();
if (document.layers){
document.layers['Pro'+unitid].background = "url(image/tokutyu/product_04.gif)";
}else{
document.getElementById('Pro'+unitid).style.background = "url(image/tokutyu/product_04.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.catalog[0].checked=true;
		}else if(data == "02"){
			document.form1.catalog[1].checked=true;
		}else if(data == "03"){
			document.form1.catalog[2].checked=true;
		}
	}
}
