﻿// JScript File

function chgProd(strID) {
    var x = 1;
    document.getElementById('pgBody').className = 'prodInside';
    document.getElementById('divProdContent_0').className = 'divProdContent isHide';
    
    for (x=1;x<=11;x++) {
        if (x.toString() == strID.toString()) {
            document.getElementById('divProd' + x.toString() + '_off').className = 'btnProd isHide';
            document.getElementById('divProd' + x.toString() + '_on').className = 'btnProd isShow';
            document.getElementById('divProdContent_' + x.toString()).className = 'divProdContent isShow';
        } else {
            document.getElementById('divProd' + x.toString() + '_off').className = 'btnProd isShow';
            document.getElementById('divProd' + x.toString() + '_on').className = 'btnProd isHide';
            document.getElementById('divProdContent_' + x.toString()).className = 'divProdContent isHide';
        }
    }
}

function chgDetails(strName, strID, ttlCount) {
    var x = 1;
    for (x=1;x<=ttlCount;x++) {
        if (x.toString() == strID.toString()) {
            document.getElementById('div' + strName + '_' + x.toString()).className = 'prodItem isShow';
        } else {
            document.getElementById('div' + strName + '_' + x.toString()).className = 'prodItem isHide';
        }
    }
}

function chgStates(strID) {
    var x = 1;
    document.getElementById('pgBody').className = 'contInside';
    document.getElementById('contIntro').className = 'isHide';
    
    for (x=1;x<=20;x++) {
        if (x.toString() == strID.toString()) {
            document.getElementById('divState' + x.toString() + '_off').className = 'btnState isHide';
            document.getElementById('divState' + x.toString() + '_on').className = 'btnState isShow';
            document.getElementById('divStateContent_' + x.toString()).className = 'divStateContent isShow';
        } else {
            document.getElementById('divState' + x.toString() + '_off').className = 'btnState isShow';
            document.getElementById('divState' + x.toString() + '_on').className = 'btnState isHide';
            document.getElementById('divStateContent_' + x.toString()).className = 'divStateContent isHide';
        }
    }
}
