
// ブラウザの幅・高さ取得
function getBrowserWidth() {
    if (window.innerWidth) {
        return window.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth != 0) {
        return document.documentElement.clientWidth;
    }
    else if (document.body) {
        return document.body.clientWidth;
    }
    return 0;
}

function getBrowserHeight() {
    if (window.innerHeight) {
        return window.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight != 0) {
        var ret = document.documentElement.clientHeight;
        /*
        var userAgent = navigator.userAgent.toLowerCase();
         if (userAgent.indexOf("msie") != -1) {
             ret -= 20;
         }
         */
        return ret;
    }
    else if (document.body) {
        return document.body.clientHeight;
    }
    return 0;
}


// マウスの X,Y 位置取得
function getMouseXpos(event)
{
    var ret = '';

    if (document.all) {
        ret = document.body.scrollLeft + window.event.clientX;
    }
    else if (document.layers || document.getElementById) {
        ret = event.pageX;
    }
    return ret;
}
function getMouseYpos(event)
{
    var ret = '';

    if (document.all) {
        ret = document.body.scrollTop + window.event.clientY;
    }
    else if (document.layers || document.getElementById) {
        ret = event.pageY;
    }
    return ret;
}


// フローウィンドウ表示
var g_flowWnd;

function openFloatWnd(in_title, in_width, in_height, goUrl)
{
    g_flowWnd = new Window({className: "dialog", width: in_width, height: in_height, zIndex: 100, url: goUrl, title: in_title, showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff});
    g_flowWnd.showCenter();
    // g_flowWnd.show();
}


function myEscape(str)
{
    str = String(str);

//  str    = escape(str);
    str    = str.gsub('&', '[＆gh7zhb5}');
    str    = str.gsub('#', '[＃ghbj8guz5}');
    str    = str.gsub('%', '[％ghbj8guz5}');
    str    = str.replace(/\?/g, '[？ghbj8guz5}');

    return str;
}
