
window.name = "mainWindow";
//
function login_auth(){
	with(document.myForm){
		action="/asp/Auth/auth/";
		method="POST";
		submit();
	}
}
//
function catalogWin(){
	var sc_h = screen.height;
	if(sc_h <= 1200){
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook/","catalogWin","status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
		subWin.moveTo(0,0);
		subWin.resizeTo(screen.availWidth,screen.availHeight);
	} else {
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook/","catalogWin","width=1600,height=1200,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
	}
	subWin.focus();
}
//
function catalogWin_gray(){
	var sc_h = screen.height;
	if(sc_h <= 1200){
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_gray/","catalogWin","status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
		subWin.moveTo(0,0);
		subWin.resizeTo(screen.availWidth,screen.availHeight);
	} else {
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_gray/","catalogWin","width=1600,height=1200,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
	}
	subWin.focus();
}
//
function catalogWin_blue(){
	var sc_h = screen.height;
	if(sc_h <= 1200){
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_blue/","catalogWin","status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
		subWin.moveTo(0,0);
		subWin.resizeTo(screen.availWidth,screen.availHeight);
	} else {
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_blue/","catalogWin","width=1600,height=1200,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
	}
	subWin.focus();
}
//
function catalogWin_pink(){
	var sc_h = screen.height;
	if(sc_h <= 1200){
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_pink/","catalogWin","status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
		subWin.moveTo(0,0);
		subWin.resizeTo(screen.availWidth,screen.availHeight);
	} else {
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_pink/","catalogWin","width=1600,height=1200,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
	}
	subWin.focus();
}
//
function catalogWin_green(){
	var sc_h = screen.height;
	if(sc_h <= 1200){
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_green/","catalogWin","status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
		subWin.moveTo(0,0);
		subWin.resizeTo(screen.availWidth,screen.availHeight);
	} else {
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_green/","catalogWin","width=1600,height=1200,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
	}
	subWin.focus();
}
//
function catalogWin_white(){
	var sc_h = screen.height;
	if(sc_h <= 1200){
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_white/","catalogWin","status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
		subWin.moveTo(0,0);
		subWin.resizeTo(screen.availWidth,screen.availHeight);
	} else {
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_white/","catalogWin","width=1600,height=1200,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
	}
	subWin.focus();
}
//
function catalogWin_type1(){
	var sc_h = screen.height;
	if(sc_h <= 1200){
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_type1/","catalogWin","status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
		subWin.moveTo(0,0);
		subWin.resizeTo(screen.availWidth,screen.availHeight);
	} else {
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_type1/","catalogWin","width=1600,height=1200,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
	}
	subWin.focus();
}
//
function catalogWin_sales(){
	var sc_h = screen.height;
	if(sc_h <= 1200){
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_sales/","catalogWin","status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
		subWin.moveTo(0,0);
		subWin.resizeTo(screen.availWidth,screen.availHeight);
	} else {
		subWin = window.open("http://www.adjustbook.com/aplisvc/demobook_sales/","catalogWin","width=1600,height=1200,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
	}
	subWin.focus();
}
//
function linksetWinOpen(){
  var sc_h = screen.height;
  if(sc_h <= 1200){
		subWin = window.open("http://www.adjustbook.com/setlink/","catalogWin","status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
		subWin.moveTo(0,0);
		subWin.resizeTo(screen.availWidth,screen.availHeight);
	} else {
		subWin = window.open("http://www.adjustbook.com/setlink/","catalogWin","width=1600,height=1200,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=yes");
	}
	subWin.focus();
}

// アスキーコードでキーチェック
function Func_CheckAsciiCode(type){
    var code;

    code = event.keyCode;

    switch (type){
    // 数字
    case 1:
        if(CheckACNumeric(code)) return true;
        if(CheckACMovement(code)) return true;
        if(CheckACDelete(code)) return true;
        return false;
        break;

    // 英字
    case 2:
        if(CheckACAlpha(code)) return true;
        if(CheckACMovement(code)) return true;
        if(CheckACDelete(code)) return true;
        return false;
        break;

    // 数字+ハイフン
    case 3:
        if(CheckACNumeric(code)) return true;
        if(CheckACHyphen(code)) return true;
        if(CheckACMovement(code)) return true;
        if(CheckACDelete(code)) return true;
        return false;
        break;
    }

}

// アスキーコードで0～9,テンキー0～9キーチェック
function CheckACNumeric(code){

    switch (code){
    // テンキー0～9
    case 96:
    case 97:
    case 98:
    case 99:
    case 100:
    case 101:
    case 102:
    case 103:
    case 104:
    case 105:
    // 0～9キー
    case 48:
    case 49:
    case 50:
    case 51:
    case 52:
    case 53:
    case 54:
    case 55:
    case 56:
    case 57:
        return true;
        break;

    default:
        return false;
        break;
    }

}

// アスキーコードでa～zキーチェック
function CheckACAlpha(code){

    switch (code){
    // a～zキー
    case 65:
    case 66:
    case 67:
    case 68:
    case 69:
    case 70:
    case 71:
    case 72:
    case 73:
    case 74:
    case 75:
    case 76:
    case 77:
    case 78:
    case 79:
    case 80:
    case 81:
    case 82:
    case 83:
    case 84:
    case 85:
    case 86:
    case 87:
    case 88:
    case 89:
    case 90:
        return true;
        break;

    default:
        return false;
        break;
    }

}

// アスキーコードでTab,←→↑↓,Home,Endキーチェック
function CheckACMovement(code){

    switch (code){
    // Tabキー
    case 9:
    // ←→↑↓キー
    case 37:
    case 38:
    case 39:
    case 40:
    // Homeキー
    case 36:
    // Endキー
    case 35:
        return true;
        break;

    default:
        return false;
        break;
    }

}

// アスキーコードでハイフンキーチェック
function CheckACHyphen(code){

    switch (code){
    // -キー
    case 109:
    case 189:
        return true;
        break;

    default:
        return false;
        break;
    }

}

// アスキーコードでDel,BSキーチェック
function CheckACDelete(code){

    switch (code){
    // BackSpaceキー
    case 8:
    // Deleteキー
    case 46:
        return true;
        break;

    default:
        return false;
        break;
    }

}
//

