//ブラウザ判別スタイルシート

ua = new Array();
ua[0] = '';
ua[1] = navigator.appName;
ua[2] = navigator.appVersion;
ua[3] = navigator.appVersion.charAt(0);
if (ua[2].indexOf("MSIE") > -1){
	ua[0] = 'IE';
}
else if (ua[2].indexOf("Apple") > -1){
	ua[0] = 'safari';
}
else if ((ua[3].indexOf("5") > -1) && (ua[1].indexOf("Netscape") > -1)){
	ua[0] = 'NN6';
}
else if ((ua[3].indexOf("4") > -1) && (ua[1].indexOf("Netscape") > -1)){
	ua[0] = 'NN4';
}
else if (ua[1].indexOf("Opera") > -1){
	ua[0] = 'Opera';
}
else {
	ua[0] = 'other';
}


switch(ua[0]){
case 'safari':
		document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/mac_safari.css">');
	break;
case 'IE':
	if (ua[2].indexOf('Win') > -1){
		document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/win_ie.css">');
	}
	else {
		document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/mac_ie.css">');
	}
	break;
case 'NN6':
	if (ua[2].indexOf('Win') > -1){
		document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/win_gecko.css">');
	}
	else {
		document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/mac_gecko.css">');
	}
	break;
case 'NN4':
	if (ua[2].indexOf('Win') > -1){
		document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/win_nn4_1.css">');
	}
	else {
		document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/mac_nn4_1.css">');
	}
	break;
case 'Opera':
	if (ua[2].indexOf('Win') > -1){
		document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/win_opera.css">');
	}
	else {
		document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/mac_opera.css">');
	}
	break;
default:
	document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/win_ie.css>');
	break;
}

if(navigator.userAgent.indexOf('Mac') != -1){
 document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/Mac.css">')
}

if(navigator.userAgent.indexOf('Win') != -1){
if(navigator.appName.charAt(0)=="M"){
 document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/Win_MSIE6.css">')
}else{
if(navigator.appVersion.charAt(0) == 4){
 document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/Win_NN4.css">')
}else{
 document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/common/css/Win_NN6.css">')
}
}
}

//検索用

function newpage1(){
	var f=document.form1;
		f.target="_top";
        f.action="http://search.panasonic-denko.co.jp/search/cgi/main_search.cgi";
		f.elements[0].name="query";
		f.kubun.value="";
        f.bunsha.value="";
        f.jyoken.value="";
		f.max.value="20";
		f.format.value="long";
		f.sort.value="later";
		f.whence.value="0";
		f.submit();
}
function newpage2(){
	w = window.open("","window1","WIDTH=700,HEIGHT=600,SCROLLBARS=1,RESIZABLE=1,MENUBAR=1");
    var f=document.form1;
		f.target="window1";
        f.action="http://panasonic-denko.co.jp/hinban/search.cgi";
		f.elements[0].name="search";
		f.kubun.value="1";
		f.bunsha.value="00";
		f.jyoken.value="3";
		f.max.value="";
		f.format.value="";
		f.sort.value="";
		f.whence.value="";
        f.submit();
    w.focus();
}

function newpage1E(){
	var f=document.form1;
		f.target="_top";
        f.action="http://search.panasonic-denko.co.jp/search/cgi/e/main_search.cgi";
		f.elements[0].name="query";
		f.kubun.value="";
        f.bunsha.value="";
        f.jyoken.value="";
		f.max.value="20";
		f.format.value="long";
		f.sort.value="later";
		f.whence.value="0";
		f.submit();
}

function setvalue(id,sw){
	if (sw == 'on'){
		if (id.value.indexOf('サイト内検索') > -1) {
			id.value='';
		}
	} else {
		if (id.value == '') {
			id.value = '> サイト内検索';
		}
	}
}

//旧スクリプト（エラー対応）


function DK_swapImgRestore() { //v3.0
  var i,x,a=document.DK_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 DK_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=DK_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function DK_swapImage() { //v3.0
  var i,j=0,x,a=DK_swapImage.arguments; document.DK_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=DK_findObj(a[i]))!=null){document.DK_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function DK_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.DK_pgW=innerWidth; document.DK_pgH=innerHeight; onresize=DK_reloadPage; }}
  else if (innerWidth!=document.DK_pgW || innerHeight!=document.DK_pgH) location.reload();
}

function DK_showHideLayers() { //v3.0
  var i,p,v,obj,args=DK_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=DK_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

DK_reloadPage(true);