var scrj = 1;
function pageTop() {
   if(navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat") {
      var scdist = document.body.parentNode.scrollTop;
   } else {
      var scdist = document.body.scrollTop;
   }
   if(scrj<50 && scdist) {
      scdist = (scdist>2) ? Math.ceil(scdist*.2) : 1;
      scrj++;
      scrollBy(0,-scdist);
      setTimeout("pageTop()",20);
   } else {
      scrollTo(0,0);
      scrj = 1;
   }
}



function openWin( w, h ){
       wo=window.open("","ref","scrollbars=yes,resizable=no,toolbar=no,location=no,status=yes,menubar=no,width="+w+",height="+h);
wo.resizeTo(w,h);
wo.focus();}

function openWinWithName( w, h,name ){
       wo=window.open("",name,"scrollbars=yes,resizable=no,toolbar=no,location=no,status=yes,menubar=no,width="+w+",height="+h);
wo.resizeTo(w,h);
wo.focus();}


function openVoice( w, h ){
       wo=window.open("","voice","scrollbars=no,resizable=no,toolbar=no,location=no,status=yes,menubar=no,width="+w+",height="+h);
wo.resizeTo(w,h);
wo.focus();}


function openDic( w, h ){
       wo=window.open("","dic","scrollbars=no,resizable=no,toolbar=no,location=no,status=yes,menubar=no,width="+w+",height="+h);
wo.resizeTo(w,h);
wo.focus();}


function openTop( w, h ){
       wo=window.open("","topic","scrollbars=yes,resizable=no,toolbar=yes,location=no,status=yes,menubar=yes,width="+w+",height="+h);
wo.resizeTo(w,h);
wo.focus();}


function openCam( w, h ){
       wo=window.open("","cam","scrollbars=no,resizable=no,toolbar=no,location=no,status=yes,menubar=yes,width="+w+",height="+h);
wo.resizeTo(w,h);
wo.focus();}



/*//////////// スクリ−ン有効高get用指定用関数   
========================================================
 Win  n4 n6 moz e4 e5 e6,
 Mac  n4 n6 moz e4.5 e5,
 Linux n4 n6 moz         
========================================================
=======================================================*/


  function getScreenAvailHEIGHT(){
    if(!!window.screen)
      return screen.availHeight  //N4,N6,Moz,IE,共用
    else
      return null                //上記以外
  }

/*//////////// スクリ−ン有効高get用指定用関数ここまで */



//左端に半分のサイズで開く
function openWindow1(){

  var winsizeH  = getScreenAvailHEIGHT()//スクリ−ンサイズ
  var winsizeH2 = winsizeH-100            //有効サイズから-100サイズで開く

  window.open('https://www.seiko-watch.co.jp/form/credor/form_credor_agree.html',''
   ,'scrollbars=yes,toolbar=no,location=no,status=yes,menubar=no,left=0,top=0,width=680,height='+winsizeH2+',resizable')
}

function openWindow2(){

  var winsizeH  = getScreenAvailHEIGHT()//スクリ−ンサイズ
  var winsizeH2 = winsizeH-100            //有効サイズから-100サイズで開く


  window.open('https://www.seiko-watch.co.jp/form/credor/form_credor_agree.html',''
   ,'scrollbars=yes,toolbar=no,location=no,status=yes,menubar=no,left=0,top=0,width=680,height='+winsizeH2+',resizable')
}



function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_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; }
}
