function getDir(){  // ディレクトリ階層の取得  url = "kyoto-saga.ac.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 CheckBrowser(){  this.win=(navigator.userAgent.indexOf("Win") >= 0)?1:0;  this.ver=navigator.appVersion;  this.dom=document.getElementById?1:0;   this.ie5=(this.ver.indexOf("MSIE")>-1 && this.dom)?1:0;   this.ie4=(document.all && !this.dom)?1:0;  this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;  this.ns4=(document.layers && !this.dom)?1:0;  this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5);  return this;}function GetDivObject(obj,cont){  cont=(!cont) ? '':'document.'+cont+'.';  this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(cont+'document.'+obj):0;  this.doc=bw.ns5?document:bw.dom?document.getElementById(obj).document:bw.ie4?document.all[obj].document:bw.ns4?eval(cont+'document.'+obj+'.document'):0;  this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(cont+'document.'+obj):0;  this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight;  this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight;  this.ChangeDiv = ChangeDiv;  this.x;  this.y;   this.obj = obj + "Object";  eval(this.obj + "=this");  return this;}function ChangeDiv(msg_){  var msg=msg_;  if(bw.ns4){    this.el.document.open("text/html");    this.el.document.write(msg);    this.el.document.close();  }else{    this.el.innerHTML = msg;  }}function changeImg(imgname,imgurl) {  if(bw.ie5 || bw.ie4) {    document.all[imgname].src = imgurl;  }  else if(bw.ns4) {    return false;  }  else{    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 wopen1(link){ var newwin = window.open(link,"NewWindow", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,location=no,resizable=no,width=426,height=500"); }function wopen2(link){ var newwin = window.open(link,"NewWindow2", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,location=no,resizable=yes,width=614,height=530");  }function wopen3(link){ var newwin = window.open(link,"NewWindow3", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,location=no,resizable=yes,width=747,height=309");  }function wopenf(link, wnum, hnum){    var NewWindow = window.open(link,"NewWin",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+wnum+',height='+hnum);}function wopen(link,wname,wnum,hnum){    var NewWindow = window.open(link,wname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+wnum+',height='+hnum);}function stwinOpen(stname){    var NewWindow = window.open('/university/teaching_staff/staff_win.php3?id='+stname+'','staffWin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=496,height=372');}function worksOpen(works_no){    var NewWindow = window.open('/worksdb/works_win.php3?no='+works_no+'','worksWin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=356');}
