function getDir(){  // ディレクトリ階層の取得  url = "ha-haapartment.jp";  // トップフォルダ名  path = location.pathname;  ulen = url.length;  unum = path.indexOf(url);  if(unum < 0){  // WEB用    path = path.substr(1);    path = path.split("/");    dnum = path.length - 1;  }else{  // ディスクトップ用    if(path.indexOf("\\") < 0){      path = path.substr(unum + ulen + 1);      path = path.split("/");      dnum = path.length - 1;    }else{      path = path.substr(unum + ulen + 1);      path = path.split("\\");      dnum = path.length - 1;    }  }  dir = "";  for(i=0; i<dnum; i++){    dir += "../";  }  return dir;}function GetObject(obj){  this.el = document.getElementById(obj);  this.doc = document.getElementById(obj).document;  this.css = document.getElementById(obj).style;  this.x = this.el.offsetLeft;  this.y = this.el.offsetTop;  this.h = this.el.offsetHeight;  this.w = this.el.offsetWidth;  this.ChangeDiv = ChangeObject;  return this;}function ChangeObject(msg){  this.el.innerHTML = msg;}function changeImg(imgname,imgurl) {  document.images[imgname].src = imgurl;}function overMouse(imgname,imgsrc){  imgsrc = imgsrc.replace("_off","_on");  changeImg(imgname,imgsrc);}function outMouse(imgname,imgsrc){  imgsrc = imgsrc.replace("_on","_off");  changeImg(imgname,imgsrc);}function wopen(link,name,wsize,hsize){    var NewWindow = window.open(link,name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+wsize+',height='+hsize);}function wopen_noframe(link,name,wsize,hsize){    var NewWindow = window.open(link,name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+wsize+',height='+hsize);}var scrollSpeed = 6;var scrollInterval = 250;var timer;function scrollUp(obj1_name,obj2_name){  if(timer){ clearInterval(timer);}  timer = setInterval('scrollUpMove("'+obj1_name+'","'+obj2_name+'",'+scrollSpeed+')',scrollInterval);}function scrollDown(obj1_name,obj2_name){  if(timer){ clearInterval(timer);}  timer = setInterval('scrollDownMove("'+obj1_name+'","'+obj2_name+'",'+scrollSpeed+')',scrollInterval);}function scrollLeft(obj1_name,obj2_name){  if(timer){ clearInterval(timer);}  timer = setInterval('scrollLeftMove("'+obj1_name+'","'+obj2_name+'",'+scrollSpeed+')',scrollInterval);}function scrollRight(obj1_name,obj2_name){  if(timer){ clearInterval(timer);}  timer = setInterval('scrollRightMove("'+obj1_name+'","'+obj2_name+'",'+scrollSpeed+')',scrollInterval);}function scrollStop(){ clearInterval(timer);}function scrollUpMove(obj1_name,obj2_name,speed){  obj1 = new GetObject(obj1_name);  obj2 = new GetObject(obj2_name);  max = obj1.h - obj2.h;  if(max >=0 || obj2.y < max){    clearInterval(timer);  }else{    obj2.css.top = obj2.y - speed;  }}function scrollDownMove(obj1_name,obj2_name,speed){  obj1 = new GetObject(obj1_name);  obj2 = new GetObject(obj2_name);  max = obj2.h - obj1.h;  if(max <=0 || obj2.y >= 0){    clearInterval(timer);  }else{    obj2.css.top = obj2.y + speed;  }}function scrollLeftMove(obj1_name,obj2_name,speed){  obj1 = new GetObject(obj1_name);  obj2 = new GetObject(obj2_name);  max = obj1.w - obj2.w;  if(max >=0 || obj2.x < max){    clearInterval(timer);  }else{    obj2.css.left = obj2.x - speed;  }}function scrollRightMove(obj1_name,obj2_name,speed){  obj1 = new GetObject(obj1_name);  obj2 = new GetObject(obj2_name);  max = obj2.w - obj1.w;  if(max <=0 || obj2.x >= 0){    clearInterval(timer);  }else{    obj2.css.top = obj2.x + speed;  }}function windowResize(){  if(screen.width>=1024 && screen.height>=768){      var bwW = document.body.clientWidth;      var bwH = document.body.clientHeight;      var chW = 976 - bwW;      var chH = 598 - bwH;      window.resizeBy(chW,chH);  }else{      window.moveTo(0,0);      window.resizeTo(screen.availWidth,screen.availHeight);  }}function wopen_info(){    var NewWindow = window.open('http://www.ha-haapartment.jp/clothes/info/index.html','info','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=428,height=598');    NewWindow.focus();}function wopen_order(){    var NewWindow = window.open('http://www.ha-haapartment.jp/clothes/info/index.html#order','info','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=428,height=598');    NewWindow.focus();}