

<!--

/******************************************************
ポップアップウィンドウの設定モジュール
******************************************************/


var iwidthwk1 = 650;	//幅を指定
var iheightwk1 = 530;	//高さを指定
var iheightwk2 = 380;	//高さを指定
var key,popup_url,winname,winname2 ;
var agent = navigator.userAgent;
var iwidth,iheight,iwidthwk ;
var os_ver ;
var ie_width ;
var ie_height ;
var linkwk ;
var glaphw = 700 ;	//アリコジャパンレグルスから開くグラフ
var glaphh = 600 ;	//アリコジャパンレグルスから開くグラフ
var shisan_url = "http://www2.orix.co.jp/ins/direct/shisan/inputfrm/" ;   //試算入力フォームページが格納されているサーバー本番
//var shisan_url = "http://webdb1.orix.co.jp/ins/direct/shisan/inputfrm/" ;   //試算入力フォームページが格納されているサーバー確認
var live_url = "http://www.orix.co.jp/";//http://www.orix.co.jp
//var live_url = "http://wwwst.orix.co.jp/";

var shisan_chk = 0 ;

//OS判別/////////////////////
if ( agent.indexOf('Win') > -1 ) os_ver = "Win" ;
else if ( agent.indexOf('Mac') > -1 ) os_ver = "Mac" ;
else os_ver = "Other" ;
////////////////////////////



/********************pipコンテンツ用設定モジュール開始(060111)***********************************/
function openWindowWide(urls, wname){
 var lefts  = ( screen.availWidth  - 870 ) / 2 ; // WindowのＸ座標
 var tops = ( screen.availHeight - 540 ) / 2 ; // WindowのＹ座標

 var features ='status=no,scrollbars=0,toolbar=0,location=1,menubar=0,resizeble=0,width=870,height=540,directories=0,favorites=0,top=' + tops + ',left=' + lefts;
 window.open(urls, wname, features);
}
/********************pipコンテンツ用設定モジュール終了***********************************/





function openWin(url,wname,w,h,resizable,toolbar,scrollbars,location,status){
		
		if (h >= (screen.height-30)){
			wh = screen.height-100;
			w += 18;
			scrollbars = 1;
			location = 1;
			status = 1;
		}else wh = h;
		
		win_set = 'width=' + w;
		win_set += ',height=' + wh;
		win_set += ',resizable=' + resizable;
		win_set += ',toolbar=' + toolbar;
		win_set += ',location=' + location;
		win_set += ',status=' + status;
		win_set += ',scrollbars=' + scrollbars;
		win_set += ',fullscreen=no';
		
		swin = window.open(url,wname,win_set);
		swin.focus();
}





//ポップアップウィンドウからそれを開いた親ウィンドウへのリンクの制御//
function parent_link(linkwk){

     if ( window.opener == null || window.opener == false || window.opener == "" ||  (typeof window.opener.document == 'object') == false || window.opener.closed ) {
      	   winname2 = window.open(linkwk,"ORIX_DIRECT2","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes") ;
               winname2.focus() ;
     }
     else {
      	   window.opener.focus() ; 	
      	   window.opener.parent.location.href = linkwk ;
     }

}

//ポップアップウィンドウを開く制御
function popup_window(key) {


      if ( key == "campaign" ) { //キャンペーン
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            //popup_url = "http://wwwst.orix.co.jp/ins/direct/product/campaign.htm" ;
            popup_url = live_url + "ins/direct/product/campaign.htm" ;
            //popup_url = "product/campaign_040115.htm" ;
      }
      else if ( key == "hitsuyogaku" ) { //必要保障額シュミレーション
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            //popup_url = "http://wwwst.orix.co.jp/ins/direct/product/hitsuyogaku.htm" ;
            popup_url = live_url + "ins/direct/product/hitsuyogaku.htm" ;
            //popup_url = "product/hitsuyogaku.htm" ;
      }
      else if ( key == "goriyou" ) { //ご利用にあたってのご注意
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/goriyou.htm" ;
            //popup_url = "/misc/goriyou.htm" ;
      }




      else if ( key == "policy" ) { //ポリシー
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/policy.htm" ;
            //popup_url = "/ins/direct/misc/policy.htm" ;
      }
 
 
      else if ( key == "shiharai" ) { //支払査定時照会制度について
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/koho/shiharai.htm" ;
            //popup_url = "http://www.orix.co.jp/ins/koho/shiharai.htm" ;
      }


      else if ( key == "shinjuku" ) { //新宿
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/koho/mapshinjuku.htm" ;
            //popup_url = "/ins/koho/mapshinjuku.htm" ;
      }

      else if ( key == "osaka" ) { //大阪
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/koho/maposaka.htm" ;
            //popup_url = "/ins/koho/maposaka.htm" ;
      }

      else if ( key == "tachikawa" ) { //立川
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/koho/maptachikawa.htm" ;
            //popup_url = "/ins/koho/maptachikawa.htm" ;
      }

      else if ( key == "campaign" ) { //キャンペーン
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/product/campaign.htm" ;
            //popup_url = "/ins/koho/maptachikawa.htm" ;
      }



      else if ( key == "kojin" ) { //個人情報の取り扱いについて
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/kojin.htm" ;
            //popup_url = "/misc/kojin.htm" ;
      }
      
      else if ( key == "kanyu" ) { //勧誘方針
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/kanyu.htm" ;
            //popup_url = "/misc/kanyu.htm" ;
      }
      else if ( key == "yougo" ) { //保険用語のご説明
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/yougo.htm" ;
            //popup_url = "/misc/yougo.htm" ;
      }
      else if ( key == "yougo_1" ) { //保険用語のご説明
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/yougo.htm#ka_1" ;
            //popup_url = "/misc/yougo.htm#ka_1" ;
      }
      else if ( key == "yougo_2" ) { //保険用語のご説明
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/yougo.htm#ka_2" ;
            //popup_url = "/misc/yougo.htm#ka_2" ;
      }
      else if ( key == "yougo_3" ) { //保険用語のご説明
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/yougo.htm#sa_1" ;
            //popup_url = "/misc/yougo.htm#sa_1" ;
      }
      else if ( key == "yougo_4" ) { //保険用語のご説明
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/yougo.htm#ha" ;
            //popup_url = "/misc/yougo.htm#ha" ;
      }
      else if ( key == "yougo_5" ) { //保険用語のご説明
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/yougo.htm#ha_1" ;
            //popup_url = "/misc/yougo.htm#ha_1" ;
      }
      else if ( key == "yougo_6" ) { //保険用語のご説明
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/yougo.htm#ha_2" ;
            //popup_url = "/misc/yougo.htm#ha_2" ;
      }
      else if ( key == "yougo_7" ) { //保険用語のご説明
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/misc/yougo.htm#ma" ;
            //popup_url = "/misc/yougo.htm#ma" ;
      }
      else if ( key == "yokuaru" ) { //よくあるご質問
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/toiawase/yokuaru.htm" ;
            //popup_url = "/toiawase/yokuaru.htm" ;
      }
      else if ( key == "syouhin" ) { //商品に関するご質問
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/toiawase/yo_tori.htm" ;
            //popup_url = "/toiawase/yo_tori.htm" ;
      }
      else if ( key == "keiyaku" ) { //契約手続きに関するご質問
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/toiawase/yo_tetsu.htm" ;
            //popup_url = "/toiawase/yo_tetsu.htm" ;
      }
      else if ( key == "keiyakugo" ) { //契約後に関するご質問
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/toiawase/yo_keiyaku.htm" ;
            //popup_url = "/toiawase/yo_keiyaku.htm" ;
      }
      else if ( key == "reglus2" ) { //レグルス
            iheightwk = glaphh ;
            iwidthwk = glaphw ;
            popup_url = live_url + "ins/direct/product/reglus2/keiyaku.htm" ;
            //popup_url = "/product/sirius/keiyaku.htm" ;
      }

//2005.05
      else if ( key == "hosyo2_ki" || key == "hosyo2_to") { //fit:給付金詳細
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/product/syu_iryo/" + key + ".htm" ;
      }

      else if ( key == "hosyo_ki" || key == "hosyo_to") { //fit w:給付金詳細
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/product/syu_iryo_fw/" + key + ".htm" ;
      }

      else if ( key == "hosyone_ki" || key == "hosyone_to") { //needs:給付金詳細
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/product/syu_iryo_ne/" + key + ".htm" ;
      }

      else if ( key == "hosyocu_ki" || key == "hosyocu_to") { //cure:給付金詳細
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/product/cure/" + key + ".htm" ;
      }

      else if ( key == "hosyocul_ki" || key == "hosyocul_to") { //cure lady:給付金詳細
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/product/cure-l/" + key + ".htm" ;
      }

      else if ( key == "juyou" || key == "te_kei" || key == "syu_kei" || key == "iryo_kei" || key == "fit_kei" || key == "fitw_kei" || key == "ne_kei" || key == "gan_kei" || key == "dz_kei" || key == "cu_kei" ) {   //契約のしおり・重要事項
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            popup_url = live_url + "ins/direct/yoyaku/" + key + ".htm" ;
            //popup_url = "/yoyaku/" + key + ".htm" ;
      }
      else if ( key == "yougo1" || key == "yougo3" || key == "yougo5" || key == "yougo6" ) {  //契約のしおり・用語説明（小さいサイズのウィンドウ）
            iheightwk = iheightwk2 ;
            iwidthwk = iwidthwk1 ;
            //開発中///////////////////////////////////
            popup_url = "yoyaku/" + key + ".htm" ;
      }
      else if ( key == "yougo2" || key == "yougo4" || key == "yougo7" ) {  //契約のしおり・用語説明（大きいサイズのウィンドウ）
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            //開発中///////////////////////////////////
            popup_url = "yoyaku/" + key + ".htm" ;
      }
      else if (  key == "do_iry" ||  key == "chi_shi" || key == "chi_iry" || key == "mo_shi" || key == "mo_iry" ||
            key == "chi_ko_shi" || key == "chi_ko_iry" || key == "mo_ko_shi" || key == "mo_ko_iry" || key == "ko_do_iry" ||
            key == "ko_do_shi"  || key == "ko_do_iry"  || key == "rougo_shi" || key == "rougo_iry" || key == "kouteki" ) {  //医療保障・死亡保障
            iheightwk = iheightwk1 ;
            iwidthwk = iwidthwk1 ;
            //popup_url = "http://wwwst.orix.co.jp/ins/direct/hokenerabi/lifestage/" + key + ".htm" ;
            popup_url = live_url + "ins/direct/hokenerabi/lifestage/" + key + ".htm" ;
            //popup_url = "/hokenerabi/lifestage/" + key + ".htm" ;
      }
      else if ( key == "shisan_teiki" || key == "shisan_syushin" || key == "shisan_syu_iryo" || key == "shisan_fit" || key == "shisan_fitw" || key == "shisan_needs" || key == "shisan_ganblock" || key == "shisan_d_syushin_1" || key == "shisan_d_syushin_2" || key == "shisan_cure" || key == "shisan_fs" || key == "shisan_cure-l" ) {
            iheightwk = iheightwk1 ;

            if (agent.indexOf("MSIE") > -1 ) {
                 iwidthwk = iwidthwk1 - 25 ;      //IE対策
            }


//本番用//
            if ( key == "shisan_teiki" ) { key = "d351frm.asp" ; }
            else if ( key == "shisan_syushin" ) { key = "d131frm.asp" ; }
            else if ( key == "shisan_syu_iryo" ) { key = "d1A1frm.asp" ; }
            else if ( key == "shisan_fit" ) { key = "D1G1frm.asp" ; }
            else if ( key == "shisan_fitw" ) { key = "D1K1frm.asp" ; }
            else if ( key == "shisan_needs" ) { key = "D1L1frm.asp" ; }
            //else if ( key == "shisan_10_iryo" ) { key = "d191frm.asp" ; }
            else if ( key == "shisan_ganblock" ) { key = "d1E1frm.asp" ; }
            else if ( key == "shisan_d_syushin_1" ) { key = "d141Pfrm.asp" ; }
            else if ( key == "shisan_d_syushin_2" ) { key = "d141frm.asp" ; }
            else if ( key == "shisan_cure" ) { key = "d1T1frm.asp" ; }
            else if ( key == "shisan_fs" ) { key = "d371frm.asp" ; }
            else if ( key == "shisan_cure-l" ) { key = "d1R1frm.asp" ; }
            popup_url = shisan_url + key ;
//本番用//





            shisan_chk = 1 ;


      }

/*
     if ( shisan_chk != 1 ) {
           popup_url = path + popup_url ;
     }
 */

     ie_width = iwidthwk ;
     ie_height = iheightwk ;


      //NS系の処理//////////
            if (agent.indexOf("MSIE") == -1) {

                if ( key == "reglus" ) {
                      iheightwk = glaphh  ;
                }
                else {

                      if ( shisan_chk == 1 ) {
                            iwidthwk = iwidthwk1 - 55 ;
                      }
                      else {
                            iwidthwk = iwidthwk1 - 30 ;
                      }

                }

            }

      winname = window.open(popup_url,"ORIX_DIRECT","toolbar=no,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width="  +  iwidthwk  +  ",height="  +  iheightwk +  ",left=30,top=30") ;
      winname.focus() ;

      //IE系の処理//////////
               if (agent.indexOf("MSIE") > -1 ) {

                     if ( key == "reglus" ) {
                             if ( os_ver == "Win" ) {
                                  //winname.resizeTo(glaphw+35,ie_height+30);
                             }
                             else {
                                  //winname.resizeTo(glaphw,ie_height);
                             }
                     }
                     else {
                             if ( os_ver == "Win" ) {
                                    if ( shisan_chk != 1 ) {
                                          //winname.resizeTo(ie_width,ie_height+30);
                                    }
                             }
                             else {
                                  //winname.resizeTo(ie_width-30,ie_height);
                             }
                     }

               }

shisan_chk = 0 ;

 }
//-->

