//-------------------------------------------------------------------
// メンテナンスポップアップ
//-------------------------------------------------------------------


var d = document;
var ie=d.all;





var Bname;
function bCheck() {
if(navigator.appName=='Netscape') {
    Bname = 'NN';
}
if(navigator.appName=='Microsoft Internet Explorer') {
    Bname = 'IE';
}

}



function MenteOpen(name) {
    var w;
        if(!ie) w = window.open(name,"Mente","width=620,height=550,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"Mente","width=620,height=500,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}
function jiji_winOpen(name) {
    var w;
        if(!ie) w = window.open(name,"JIJI","width=684,height=615,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"JIJI","width=684,height=600,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}
function cc_winOpen(name) {
    if(!ie) window.open(name,"NW","width=740,height=615,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    else    window.open(name,"NW","width=740,height=600,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
}
function cc_winOpen2(name) {
    if(!ie) window.open(name,"NW","width=625,height=615,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    else    window.open(name,"NW","width=625,height=600,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
}
function OpenCam(name) {
    if(!ie) window.open(name,"Cam","width=650,height=515,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    else    window.open(name,"Cam","width=650,height=465,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
}
function kinriOpen(name) {
    var w;
        if(!ie) w = window.open(name,"Kinri","width=680,height=550,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"Kinri","width=680,height=500,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}
function questionOpen(name) {
    if(!ie) window.open(name,"question","width=590,height=515,left=10,top=10,directories=no,location=no,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");
    else    window.open(name,"question","width=590,height=540,left=10,top=10,directories=no,location=no,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");
}

function attentionOpen(name) {
    if(!ie) window.open(name,"Attention","width=350,height=350,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no");
    else    window.open(name,"Attention","width=350,height=350,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no");
}


function open800(name) {
    var w;
        if(!ie) w = window.open(name,"800","width=820,height=600,left=10,top=10,directories=no,location=yes,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"800","width=820,height=550,left=10,top=10,directories=no,location=yes,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}




function open780(name) {
    var w;
        if(!ie) w = window.open(name,"780","width=780,height=600,left=10,top=10,directories=no,location=yes,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"780","width=780,height=550,left=10,top=10,directories=no,location=yes,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}





function open660(name) {
    var w;
        if(!ie) w = window.open(name,"660","width=680,height=600,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"660","width=680,height=550,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}
function open650(name) {
    var w;
        if(!ie) w = window.open(name,"650","width=650,height=600,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"650","width=650,height=550,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}
function open500(name) {
    var w;
        if(!ie) w = window.open(name,"500","width=500,height=600,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"500","width=500,height=550,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}
function printOpen(name) {
    var w;
        if(!ie) w = window.open(name,"print","width=820,height=580,left=10,top=10,directories=no,location=no,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");
        else    w = window.open(name,"print","width=820,height=580,left=10,top=10,directories=no,location=no,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");
    w.focus();
}
function q_Open(name){
    var w;
    w = window.open(name,"q","width=480,height=360,left=300,top=50,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}
function link(name){
location.href=name;
}
function link_b(name) {
    var w;
        if(!ie) w = window.open(name,"blank","");
        else    w = window.open(name,"blank","");
    w.focus();
}

function di(id,name) {
    if (document.images) {
        document.images[id].src=eval(name+".src");
    }
}

var screenHeight = 0.83*(screen.height); 
var screenWidth = (screen.availWidth) -15; 

function shinseiOpen(){
window.open("http://redesign.shinseibank.com/index_jpn.htm","SHINSEI", "toolbar=no,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + screenWidth + ",height=" + screenHeight + ",top=0,left=0");
}
function shinseiOpen2(){
window.open("http://redesign.shinseibank.com/index_jpn.htm","SHINSEI", "toolbar=no,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + screenWidth + ",height=" + screenHeight + ",top=0,left=0");
}




function popOpen700(name) {    var w;
        if(!ie) w = window.open(name,"_blank","width=760,height=650,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"_blank","width=760,height=600,left=10,top=10,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}


function hlsimOpen(name) {
    var w;
        if(!ie) w = window.open(name,"hlsim","width=820,height=700,left=10,top=10,directories=no,location=yes,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
        else    w = window.open(name,"hlsim","width=820,height=650,left=10,top=10,directories=no,location=yes,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes");
    w.focus();
}







var HOST = getHostName(location.href);  // get from location.href
var SEARCH_HOST = 'www.shinseibank.com';
if(HOST.indexOf("fresheye.com")>0)  HOST = SEARCH_HOST;

var DEF_PROTOCOL = getProtocol(location.href)+"://";
var DEF_HOSTNAME = HOST+"/sr";

var DEF_URL_KOJIN     = "http://"+HOST+"/index.html";
var DEF_URL_HOUJIN    = "http://"+HOST+"/institutional/index.html";
var DEF_URL_SMALL     = "http://"+HOST+"/nonbank/index.html";
var DEF_URL_ABOUT     = "http://"+HOST+"/investors/about/index.html";
var DEF_URL_TOUSHIKA  = "http://"+HOST+"/investors/ir/index.html";
var DEF_URL_SAIYOU    = "http://"+HOST+"/recruit/saiyo.html";
var DEF_URL_CALL      = "http://"+HOST+"/sonota/index.html"
var DEF_URL_TEMPO     = "http://"+HOST+"/atm/tempo_list.html#005"

var DEF_URL_HOME     = "http://"+HOST+"/index.html";
var DEF_URL_KOUZA    = "http://"+HOST+"/directlogin_j.html";
var DEF_URL_HAJIMETE = "http://"+HOST+"/powerflex/cam/index.html";
var DEF_URL_ENGLISH  = "http://"+HOST+"/english/index.html";
var DEF_URL_AM = "http://"+HOST+"/sonota/asset_management.html";

var DEF_URL_TORIHIKI = "http://"+HOST+"/directlogin_j.html";
var DEF_URL_KAISETSU = "# onclick=\"open800('http://"+HOST+"/powerflex/powerflex_oao.html')\"";
var DEF_URL_KAISETSU2= "# onclick=\"open800('http://"+HOST+"/powerflex/powerflex_oao.html')\"";
var DEF_URL_LOGIN    = "# onclick=\"shinseiOpen()\"";
var DEF_URL_LOGIN1ST = "# onclick=\"MenteOpen('http://"+HOST+"/direct/setting_guide.html')\"";
var DEF_URL_MENTE    = "# onclick=\"MenteOpen('http://"+HOST+"/news/news22.html')\"";
var DEF_URL_FAQ      = "# onclick=\"cc_winOpen('http://"+HOST+"/direct/faq.html')\"";
var DEF_URL_SAFE      = "http://"+HOST+"/direct/safe_dealings.html";
var DEF_URL_HL       = "http://"+HOST+"/powerflex/housing/easy_check.html?nv";

var DEF_URL_EM_REG   = "http://"+HOST+"/email/index.html";
var DEF_URL_EM_CHG   = "http://"+HOST+"/email/index.html"

var DEF_URL_WMD      = "http://"+HOST+"/wealth/index.html target=_blank"
var DEF_URL_PLT      = "http://"+HOST+"/platinum/index.html"

var DEF_URL_CAMP    = "http://"+HOST+"/powerflex/month_cam_pop.html target=_blank";
var DEF_URL_QUICK_US = "# onclick=\"cc_winOpen('http://www.quick.co.jp/qsearch.exe?F=users/shinsei-style/market')\"";
var DEF_URL_QUICK   = "# onclick=\"cc_winOpen('http://www.quick.co.jp/qsearch.exe?F=users/shinsei-style/market')\"";


var d = document;
var ie=d.all;
var n4=d.layers&&!d.getElementById;
var n6=!d.all&&d.getElementById;
var thisurl;
var nv = 0;
var cs = 3;
var snstr = '';
var snstr2 = '';
var phmargin = 10;
var img = DEF_PROTOCOL + DEF_HOSTNAME + '/imgs/navi/';
var PNOELEMENTS = 9;
var pFlags = new Array(1,1,1,1,1);
var fsize_now = 2;

var MYPAGE = document.URL;

var loc_href = location.href;
var anc="";
var locurl;
if(window['MENU_URL'] != null)  {
  var params;
  if(MENU_URL.indexOf("HOST")>0) params = MENU_URL.split("HOST");
  if(MENU_URL.indexOf("www.shinseibank.com")>0) params = MENU_URL.split("www.shinseibank.com");
  if(loc_href.indexOf('?')>0){
    var params2 = loc_href.split("?");
    loc_href = params[0]+HOST+params[1]+"?"+params2[1];
  } else {
    loc_href = params[0]+HOST+params[1];
  }
}

if(loc_href.indexOf('?')>0){
  var params = loc_href.split("?");
  var data = params[1].split("&");
  for(var i=0;i < data.length;i++){
    var param = data[i].split("=");
    if(param[0] == '_nv')  nv = param[1];
  }
  loc_href = params[0];
}
if(loc_href.indexOf('#')>0){
  var params = loc_href.split('#');
  loc_href = params[0];
  anc = '#'+params[1];
}
thisurl = loc_href;

//------------------------------------------------------------
//  getFilename(url)
//------------------------------------------------------------
function getFilename(url){
  if(url.indexOf('/')>0){
    var parts = url.split('/');
    return parts[parts.length-1];
  }
  return '';
}

function getProtocol(url){
  if(url.indexOf('://')>0){
    var path = url.split('://');
    return path[0];
  }
  return '';
}


//------------------------------------------------------------
//  getHostName(url)
//------------------------------------------------------------
function getHostName(url){
  if(url.indexOf('://')>0){
    var path = url.split('://');
    if(path[1].indexOf('/')<0)  return path[1];
    var parts = path[1].split('/');
    return parts[0];
  }
  return '';
}


currentLoc = new String(window.location);
if (currentLoc.search(/shinseibank.dga/i) != -1) {
  document.write('<script src="http://www.shinseibank.com/sr/js/env.js"></script>');
}else {
  document.write('<script src="/sr/js/env.js"></script>');
}

