var w0 = window;

function ynctl ( w ) {
 if ( w == 1 ) { return 'yes' ; } else { return 'no' }
}

function macctrl(h) {
 if(navigator.appVersion.indexOf("Mac") != -1){ //Macの時
  if((navigator.appName == "Microsoft Internet Explorer") &&  (parseInt(navigator.appVersion.substring(22,26)) >= 4.0) &&  (parseInt(navigator.appVersion.substring(22,26)) < 5.0 )){ //MacでIE4.0以上5.0未満の時
      h = h + 2; } }
 return h ;
}

function WinPop(ADR,w_name,w,h,t,l,d,st,m,sc,r) {

if (navigator.appVersion.indexOf("MSIE 7") != -1 && h <= 550){ //IE 7で縦550px以下の場合は、40px足す（google toolbar対策）
h = h + 40;
}

if (ADR.indexOf("ot51.qweb.ne.jp",0) < 0 && ADR.indexOf("autologout/logout_off.htm",0) < 0 && ADR.indexOf("qt6.qweb.ne.jp/nikkob/st03",0) < 0 ){

		if ((navigator.userAgent.indexOf('Safari') != -1 )&&( l==0 || st==0 )){ //Safariの時
			if ( l==0 && st==0 ){ h = h + 50; } else { h = h + 35; }
			if ( sc==0 ){ r = 1 ; } //スクロールバー非表示時はリサイズ可能に
		}

		l = 1 ;  //アドレスバーは常に表示
		st = 1 ; //ステータスバーは常に表示
}

parm = "width=" + w + ",height=" + macctrl(h) + ",toolbar=" + ynctl(t) + ",location=" + ynctl(l) + ",directories=" + ynctl(d) + ",status=" + ynctl(st) + ",menubar=" + ynctl(m) + ",scrollbars=" + ynctl(sc) + ",resizable=" + ynctl(r)  ;

if ((w0 == window) || w0.closed) {
w0 = window.open(ADR,w_name,parm);
} else {
if ((navigator.appVersion.indexOf("Windows") != -1) && (navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.indexOf("MSIE 4") != -1) ){w0.location.href = ADR ;}
else {
w0.focus();
w0.location.href = ADR ;
}
}
}

