function userInfo(){
	var ua = navigator.userAgent;
	this.UserAgent = ua;

	//ie
	this.isIE = (navigator.appName == "Microsoft Internet Explorer");
	this.isIE4 = this.isIE && (ua.indexOf('MSIE 4') != -1);
	this.isIE5 = this.isIE && (ua.indexOf('MSIE 5') != -1);
	this.isIE5 = this.isIE && (ua.indexOf('MSIE 5') != -1);
	this.isIE52 = this.isIE && (ua.indexOf('MSIE 5.2') != -1);
	this.isIE55 = this.isIE && (ua.indexOf('MSIE 5.5') != -1);
	this.isIE6 = this.isIE && (ua.indexOf('MSIE 6') != -1);
	this.isIE7 = this.isIE && (ua.indexOf('MSIE 7') != -1);

	//gecko(mozilla)
	this.isGecko = ua.indexOf('Gecko') != -1;

	//firefox
	this.isFirefox15 = ua.indexOf('Firefox/1.5') != -1;
	this.isFirefox2 = ua.indexOf('Firefox/2') != -1;

	//safari
	this.isSafari = ua.indexOf('Safari') != -1;
	this.isSafari2 = ua.indexOf('AppleWebKit/4') != -1;

	//camino
	this.isCamino = ua.indexOf('Camino') != -1;

	//opera
	this.isOpera = ua.indexOf('Opera') != -1;
	this.isOpera6 = ua.indexOf('Opera 6') != -1;
	this.isOpera7 = (ua.indexOf('Opera 7') != -1 || ua.indexOf('Opera/7') != -1);
	this.isOpera8 = (ua.indexOf('Opera 8') != -1 || ua.indexOf('Opera/8') != -1);
	this.isOpera9 = (ua.indexOf('Opera 9') != -1 || ua.indexOf('Opera/9') != -1);

	//nn
	this.isNN4 = document.layers ? true : false;
	this.isNN6 = ua.indexOf('Netscape6') != -1;
	this.isNN7 = ua.indexOf('Netscape/7') != -1;

	if(this.isOpera){
		this.isIE = true;
		this.isGecko = false;
		this.isSafari = false;
	}

	//platform
	this.isMac = ua.indexOf('Mac') != -1;
	this.isWin = ua.indexOf('Win') != -1;

	//browserName
	this.browserName = "";
	if(this.isIE4) this.browserName = 'Internet Explorer 4';
	if(this.isIE5) this.browserName = 'Internet Explorer 5';
	if(this.isIE52) this.browserName = 'Internet Explorer 5.2';
	if(this.isIE55) this.browserName = 'Internet Explorer 5.5';
	if(this.isIE6) this.browserName = 'Internet Explorer 6';
	if(this.isIE7) this.browserName = 'Internet Explorer 7';
	if(this.isFirefox15) this.browserName = 'Firefox 1.5';
	if(this.isFirefox2) this.browserName = 'Firefox 2';
	if(this.isSafari) this.browserName = 'Safari';
	if(this.isSafari2) this.browserName = 'Safari2';
	if(this.isCamino) this.browserName = 'Camino';
	if(this.isOpera6) this.browserName = 'Opera 6';
	if(this.isOpera7) this.browserName = 'Opera 7';
	if(this.isOpera8) this.browserName = 'Opera 8';
	if(this.isOpera9) this.browserName = 'Opera 9';
	if(this.isNN4) this.browserName = 'Netscape 4';
	if(this.isNN6) this.browserName = 'Netscape 6';
	if(this.isNN7) this.browserName = 'Netscape 7';

	//cookieEnable
	this.isCookieEnabled = this.checkCookieEnabled();

	//使用可能なブラウザか？
	//this.isDenyAgent = (this.isNN4 || this.isIE4 || (this.isIE5 && !this.isIE52 && this.isMac) || this.isOpera6);
    this.isAllowAgent = (this.isIE6 || this.isIE7);
	//サイトを利用できない条件を列挙
	//var denyThisSite = (this.isNN4 || this.isIE4 || (this.isIE5 && !this.isIE52 && this.isMac) || this.isOpera6 || !this.isCookieEnabled);
	//サイトを利用可能な条件を列挙
    var allowThisSite = ((this.isIE6 || this.isIE7) && this.isCookieEnabled);
	this.isAllow = allowThisSite;

};

userInfo.prototype.checkCookieEnabled = function(){
	var isEnable1 = navigator.cookieEnabled;
	var isEnable2 = false;
	if(typeof document.cookie == "string"){
		if(document.cookie.length == 0){
			document.cookie = "test";
			isEnable2 = (document.cookie == "test");
			document.cookie = "";
		}else{
			isEnable2 = true;
		}
	}
	return (isEnable1 || isEnable2);
};

/**
 * ID名よりForm要素取得
 *
 * @param  id        要素のid
 * @return element   Form要素
 */
function GetElementById(id){
    if(document.getElementById){
        return (document.getElementById(id));
    }else if(document.all){
        return (document.all[id]);
    }else{
        if((navigator.appname.indexOf("Netscape") != -1) && parseInt(navigator.appversion == 4)){
            return (document.layers[id]);
        }
    }
}

/**
 *   NameよりForm要素取得
 *
 * @param  name      要素のname
 * @return element   Form要素
 */
function GetElementsByName(name){
    if(document.getElementsByName){
        return (document.getElementsByName(name));
    }else if(document.all){
        return (document.all[name]);
    }else{
        if((navigator.appname.indexOf("Netscape") != -1) && parseInt(navigator.appversion == 4)){
            return (document.layers[name]);
        }
    }
}

/**
 *  新規Windowでコンテンツを開く
 *
 * @param   targetUrl
 * @param   windowName
 * @param   option
 */
var hWnd;
function openWindow(targetUrl, windowName, option){
    if(option == null){
        hWnd = window.open(targetUrl, windowName);
    }else{
        hWnd = window.open(targetUrl, windowName, option);
    }
}
/**
 *  Windowを閉じる
 *
 * @see スクリプトクローズ出来るwindowはスクリプトによって
 *      オープンされたWindowのみです。
 */
function closeWindow(){
    if(hWnd){
        window.opener = hWnd;
    }else{
        window.opener = window;
    }

    window.close();
}

//プリントボタン
function printWindow(){
    if(window.print){
        window.print();
    } else {
        window.alert("ブラウザの印刷ボタン\nまたは「Ctrlキーを押しながらP」で印刷してください。");
    }
}

/**
 *  ログアウトの確認ダイアログを表示します
 *
 * @param targetUrl
 * @see   OKボタン押下時にはログアウトページへ遷移します
 */
function logout(targetUrl){
    if(window.confirm("ログアウトしてもよいですか？")){
        location.href = targetUrl;
    }
    return false;
}
/**
 *  会社法のポップアップで同番号をクリックされた際にフォーカスします
 *
 * @param theURL,winName
  */
    var windows = new Array();
    function openPopWindow(theURL,winName) {
        if (windows[winName]) {
            if (windows[winName].closed){
                windows[winName] = window.open(theURL,winName);
            } else {
                windows[winName].focus();
            }
        } else {
            windows[winName] = window.open(theURL,winName);
            windows[winName].focus();
        }
    }