
//ブラウザ判別
function SystemRequirementCheck(){

	this.ChAgent = navigator.userAgent;
	this.ChBrowser = navigator.appName;
	this.ChAppVer = navigator.appVersion;

	this.Win = (this.ChAgent.indexOf("Win") != -1);
	this.Mac = (this.ChAgent.indexOf("Mac") != -1);
	this.OtherOS = (this.ChAgent.indexOf("Win" && "Mac") == -1);
	
	this.Op = ((this.ChBrowser.indexOf("Microsoft") != -1) && (this.ChAgent.indexOf("Opera") != -1));
	this.Ie4 = ((this.ChBrowser.indexOf("Microsoft") != -1) && (this.ChAgent.indexOf("MSIE 4") != -1));
	this.Ie = ((this.ChBrowser.indexOf("Microsoft") != -1) && (this.ChAgent.indexOf("IE") != -1));
	this.Ge = ((this.ChBrowser.indexOf("Netscape") != -1) && (this.ChAgent.indexOf("Gecko/") != -1));
	this.Nn3 = ((this.ChBrowser.indexOf("Netscape") != -1) && (this.ChAppVer.substr(0,1) <= 3));
	this.Nn4 = ((this.ChBrowser.indexOf("Netscape") != -1) && (this.ChAppVer.substr(0,1) >= 4));

}

var CheckB = new SystemRequirementCheck();

//ポップアップウィンドウ_W500
function PopWin_w500(winName,url) {
	Win_op500 = window.open(url, winName,"width=516,height=493,toolbar=no,location=no,directories=on,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
	Win_op500.focus();
}



//ポップアップウィンドウ_W600
function PopWin_w600(winName,url) {
	Win_op600 = window.open(url, winName,"width=616,height=600,toolbar=no,location=no,directories=on,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
	Win_op600.focus();
}
//ポップアップウィンドウ_W600 witn no controls
function PopWin_w600nc(winName,url) {
	Win_op600 = window.open(url, winName,"width=616,height=660,toolbar=no,location=no,directories=on,status=no,menubar=no,scrollbars=no,resizable=no");
	Win_op600.focus();
}
//ポップアップウィンドウ_W600 witn no controls but scroll on
function PopWin_w600ncScroll(winName,url) {
	Win_op600 = window.open(url, winName,"width=616,height=660,toolbar=no,location=no,directories=on,status=no,menubar=no,scrollbars=yes,resizable=no");
	Win_op600.focus();
}



//ポップアップウィンドウ_W700
function PopWin_w700(winName,url) {
	Win_op700 = window.open(url, winName,"width=716,height=600,toolbar=no,location=no,directories=on,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
	Win_op700.focus();
}

//ポップアップウィンドウ_Webサイト利用規定用 W600 witn no controls but scroll on
//gypeRootの場所用
function PopWin_w600ncScrollWebPolicy(winName,url) {
    switch (location.hostname.toUpperCase()) {
        case "WWW.GYPE.JP" :
            url = "http://www.gype.jp/gypeRoot/gypewpol10.aspx";
            break; 
        case "WWWS.GYPE.JP" :
            url = "http://www.gype.jp/gypeRoot/gypewpol10.aspx";
            break;  
        default:
            url = "gypewpol10.aspx";
            break;
    }  
	Win_op600 = window.open(url, winName,"width=616,height=660,toolbar=no,location=no,directories=on,status=no,menubar=no,scrollbars=yes,resizable=no");
	Win_op600.focus();
}

//ポップアップウィンドウ_プライバシーポリシー用 W600 witn no controls but scroll on
//gypeRootの場所用
function PopWin_w600ncScrollPrivacyPolicy(winName,url) {
    switch (location.hostname.toUpperCase()) {
        case "WWW.GYPE.JP" :
            url = "http://www.gype.jp/gypeRoot/gypeppol10.aspx";
            break; 
        case "WWWS.GYPE.JP" :
            url = "http://www.gype.jp/gypeRoot/gypeppol10.aspx";
            break;  
        default:
            url = "gypeppol10.aspx";
            break;
    }  
	Win_op600 = window.open(url, winName,"width=616,height=660,toolbar=no,location=no,directories=on,status=no,menubar=no,scrollbars=no,resizable=no");
	Win_op600.focus();
}
function close_win(){
  var nvua = navigator.userAgent;
    if(nvua.indexOf('MSIE') >= 0){
      if(nvua.indexOf('MSIE 5.0') == -1) {
        top.opener = '';
      }
    }
    else if(nvua.indexOf('Gecko') >= 0){
      top.name = 'CLOSE_WINDOW';
      wid = window.open('','CLOSE_WINDOW');
    }
    top.close();
}

