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 MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}






function JS_ImageChange(mform)
{
    var ImageNo;
    ImageNo = document.forms[mform].HIDDEN.value;
    switch(ImageNo)
    {
        case "0":
        document.Image2.src = "images/head_01.gif";
        document.Image2.alt = "\u4F01\u696D\u30FB\u5E97\u8217\u60C5\u5831\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3010\u30B7\u30FC\u30D1\u3011";
        document.Image2.width = "362";
        document.Image2.height = "42";
        document.title = "\u3010\u0053\u0065\u0065\u0070\u0061\u0020\u30B7\u30FC\u30D1\u3011\u4F01\u696D\u30FB\u5E97\u8217\u60C5\u5831\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9";
        break;
        case "1":
        document.Image2.src = "images/head_02.gif";
        document.Image2.alt = "\u4F01\u696D\u30FB\u5E97\u8217\u60C5\u5831\uFF08\u0042\u0074\u006F\u0042\uFF09\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3010\u30B7\u30FC\u30D1\u3011";
        document.Image2.width = "439";
        document.Image2.height = "42";
        document.title = "\u3010\u0053\u0065\u0065\u0070\u0061\u0020\u30B7\u30FC\u30D1\u3011\u4F01\u696D\u30FB\u5E97\u8217\u60C5\u5831\uFF08\u0042\u0074\u006F\u0042\uFF09\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9";
        break;
        case "2":
        document.Image2.src = "images/head_03.gif";
        document.Image2.alt = "\u6C42\u4EBA\u60C5\u5831\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3010\u30B7\u30FC\u30D1\u3011";
        document.Image2.width = "298";
        document.Image2.height = "42";
        document.title = "\u3010\u0053\u0065\u0065\u0070\u0061\u0020\u30B7\u30FC\u30D1\u3011\u6C42\u4EBA\u60C5\u5831\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9";
        break;
        case "3":
        document.Image2.src = "images/head_04.gif";
        document.Image2.alt = "\u4F01\u696D\u30FB\u5E97\u8217\u60C5\u5831\uFF0F\u6C42\u4EBA\u60C5\u5831\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3010\u30B7\u30FC\u30D1\u3011";
        document.Image2.width = "460";
        document.Image2.height = "42";
        document.title = "\u3010\u0053\u0065\u0065\u0070\u0061\u0020\u30B7\u30FC\u30D1\u3011\u4F01\u696D\u30FB\u5E97\u8217\u60C5\u5831\uFF0F\u6C42\u4EBA\u60C5\u5831\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9";
        break;
        default:
        document.Image2.src = "images/head_01.gif";
        document.Image2.alt = "\u4F01\u696D\u30FB\u5E97\u8217\u60C5\u5831\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3010\u30B7\u30FC\u30D1\u3011";
        document.Image2.width = "362";
        document.Image2.height = "42";
        document.title = "\u3010\u0053\u0065\u0065\u0070\u0061\u0020\u30B7\u30FC\u30D1\u3011\u4F01\u696D\u30FB\u5E97\u8217\u60C5\u5831\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9";
        break;
    }
}

function JS_ButtonClick(mform,url,page)
{
   document.forms[mform].HIDDEN_2.value = 0;
   document.forms[mform].HIDDEN.value = page;
   document.forms[mform].action = url;
   document.forms[mform].submit();
}

function JS_ControlChange(mform,url,page)
{
   document.forms[mform].HIDDEN.value = page;
   document.forms[mform].action = url;
   document.forms[mform].submit();
}

function JS_MovePage(url,page)
{
    var strurl;
    strurl = url + "?page=" + page;
    location.href = strurl;
}

function JS_Check()
{
    var strTemp = new String();
	var strArg = new String();
	var nLength;
	strTemp = location.search;
	nLength = strTemp.length;
	strArg = strTemp.substring(1, nLength);
}

function JS_TitleChange(str)
{
    document.title = str;
}

function JS_BookMark()
{
    var str;5
    var url;
    str = document.title;
    url = document.URL;
    window.external.AddFavorite(url,str);
}

function JS_WhindowOpen(UserID,ManagedNo,Division)
{
    var url,title;
    if(Division == 0) url = "u/a.aspx?id=" + UserID + "_" + ManagedNo;
    if(Division == 1) url = "u/c.aspx?id=" + UserID + "_" + ManagedNo;
    title = document.title; 
    window.open(url,title);
}

function fnc_submit(NaviNo)
{
    var strurl;
    //if(NaviNo.substring(7,0) == '00') return false; 
    //alert('navi番号' + NaviNo)
    if(NaviNo / 100000000 > 1 && NaviNo / 100000000 < 2)
    {
        strurl = "NB.Client.Navi.aspx?no="+ NaviNo;
    }
    else if(NaviNo / 100000000 > 2 && NaviNo / 100000000 < 3)
    {
        strurl = "NB.Client.Navi.aspx?no="+ NaviNo;
    }
    else
    {
        strurl = "NB.Client.Navi.Work.aspx?no="+ NaviNo;
    }
    location.href = strurl;
}

function js_submit1(MenuName)
{
    var strArg;
    strArg = document.forms["aspnetForm"].elements[MenuName].value;
    // @@@@@ AddStart 2007/05/21 K.NEGISHI ナビの区分コードが「00（Top）」選択時は、処理を行わない。
    if (strArg.substring(strArg.length - 2, strArg.length) == '00') return false; 
    // @@@@@ AddEnd
    if(strArg / 100000000 > 3)
    {
        location.href = "NB.Client.Navi.Work.aspx?no=" + strArg;
    }
    else
    {
        location.href = "NB.Client.Navi.aspx?no=" + strArg;
    }
}

function JS_ToDouHuKen_input(selectNo,selectName)
{
    switch(selectNo)
    {
        case 0:
            document.forms["aspnetForm"].ToDouHuKen_01.value = document.forms["aspnetForm"].elements[selectName].value;
            document.forms["aspnetForm"].kenbtn.value = 0;
            document.forms["aspnetForm"].action = location.href;
            document.forms["aspnetForm"].submit();
            break;
        case 1:
            document.forms["aspnetForm"].ToDouHuKen_02.value = document.forms["aspnetForm"].elements[selectName].value;
            document.forms["aspnetForm"].kenbtn.value = 1;
            document.forms["aspnetForm"].action = location.href;
            document.forms["aspnetForm"].submit();
            break;
        case 2:
            document.forms["aspnetForm"].ToDouHuKen_03.value = document.forms["aspnetForm"].elements[selectName].value;
            document.forms["aspnetForm"].kenbtn.value = 2;
            document.forms["aspnetForm"].action = location.href;
            document.forms["aspnetForm"].submit();
            break;
        case 3:
            document.forms["aspnetForm"].ToDouHuKen_04.value = document.forms["aspnetForm"].elements[selectName].value;
            document.forms["aspnetForm"].kenbtn.value = 3;
            document.forms["aspnetForm"].action = location.href;
            document.forms["aspnetForm"].submit();
            break;  
       case 4:
            document.forms["aspnetForm"].ToDouHuKen_01.value = document.forms["aspnetForm"].elements[selectName].value;
            document.forms["aspnetForm"].kenbtn.value = 4;
            document.forms["aspnetForm"].action = location.href;
            document.forms["aspnetForm"].submit();
            break;  
       case 5:
            document.forms["aspnetForm"].ToDouHuKen_02.value = document.forms["aspnetForm"].elements[selectName].value;
            document.forms["aspnetForm"].kenbtn.value = 5;
            document.forms["aspnetForm"].action = location.href;
            document.forms["aspnetForm"].submit();
            break;  
    }  
}

function fnc_nextProc(nextAspx, width, height, numSho)
{
   var param = 'toolbar=no, location=no, menbar=no, status=no, scrollbars=no, width=' + width + ',height=' + height;
   var win1=window.open(nextAspx,'OpenWindow',param);
   return false;
}

function fnc_nextProcA(nextAspx, width, height)
{ 
   var param = 'toolbar=no, location=no, menbar=no, status=no, scrollbars=yes, width=' + width + ',height=' + height;
   var win1=window.open(nextAspx,'OpenWindow');
   return false;
}
/*
function fnc_nextProcA(nextAspx, width, height)
{
   var param = 'toolbar=no, location=no, menbar=no, status=no, scrollbars=yes, width=' + width + ',height=' + height;
   var win1=window.open(nextAspx,'OpenWindow',param);
   return false;
}
*/

function fnc_cookieSet(url, cookie)
{
   document.forms["aspnetForm"].cookie.value = cookie;
   document.forms["aspnetForm"].action = url;
   document.forms["aspnetForm"].submit(); 
   return true;   
}

function fnc_cookieDelete(url, cookie)
{
   document.forms["aspnetForm"].cookiedelete.value = cookie;
   document.forms["aspnetForm"].action = url;
   document.forms["aspnetForm"].submit(); 
   return true;   
}

function fnc_cookieSendMail(url)
{
   document.forms["aspnetForm"].senMail.value = 'send';
   document.forms["aspnetForm"].action = url;
   /*document.forms["aspnetForm"].submit();*/ 
   return true;   
}
