// JavaScript Document

// サブウィンドウ　

function MM_openBrWindow(theURL,winName,features) { //v2.0
  newWin = window.open(theURL,winName,features);
  newWin.moveTo(0,0);
  newWin.resizeTo(700, window.screen.availHeight);
 }

// 資料請求サイトへの遷移のためのurl指定　added by matsui 2009/3/15

function shiryosite(){
  newWin = MM_openBrWindow("static/click/count01.html","nwin","scrollbars=yes,resizable=yes,width=700,height=600");
}
function setsuzei(){
  newWin = MM_openBrWindow("http://ad401k.sbisec.co.jp/kojin/simulation/401k_sim/et_taxsim_input_ind.asp","nwin","scrollbars=yes,resizable=yes,width=700,height=600");
}
function oyakudachiyogo(){
  newWin = MM_openBrWindow("http://ad401k.sbisec.co.jp/glossary/index.html","nwin","scrollbars=yes,resizable=yes,width=700,height=600");
}

// URLの引数をget  added by matsui  2009/3/10

function getRequest(){
  if(location.search.length > 1) {
    var get = new Object();
    var ret = location.search.substr(1).split("&");
    for(var i = 0; i < ret.length; i++) {
      var r = ret[i].split("=");
      get[r[0]] = r[1];
    }
    return get;
  } else {
    return false;
  }
}

// Cookie 取得関数  added by matsui 2009/3/10
function getCookie(name){
  var search = name + '=';
  if (document.cookie.length>0) {
    offset = document.cookie.indexOf(search);
    if (offset != -1){
      offset += search.length;
      end     = document.cookie.indexOf(';',offset);
      if(end == -1)
        end = document.cookie.length;
      return unescape(document.cookie.substring(offset,end));
    }
  }
  return null;
}

// cookieのkeyがpidのvalueをO_REFURLの値にしてURLの引数に付加  added by matsui 2009/3/12

function urlpc(theurl){
  var get = getCookie("pid");
  if (get != null) {
    var r_str = theurl + '?' + "O_REFURL" + '=' + get;
    return r_str;
 }
  return theurl;
}