var draw_application = function() {
    getFullPanel(0, 2, 2, 5, "tab-page-basic_systems", "sec-application", "APPLICATION", "", "VER 1.0");
    var panel = document.getElementById("sec-application");
    panel.innerHTML += draw_application_0();
    panel.innerHTML += draw_application_1();
    panel.innerHTML += draw_application_2();
    panel.innerHTML += draw_application_3();
}

var draw_application_0 = function() {
    var html = getSectionTitle('TARGET');
    var rows = '';
    var row = '';
    row = getInfoCell('', 'MAIN TARG APP');
    row += getInfoCell('app-main-app-target', '100');
    row += getInfoCell('', 'MAIN TARG FLOW');
    row += getInfoCell('app-main-flow-target', '10000');
    rows += getInfoRow(row);
    row = getInfoCell('', 'DEFA TARG APP');
    row += getInfoCell('app-default-app-target', '100');
    rows += getInfoRow(row);
    row = getInfoCell('', 'TOTA TARG APP');
    row += getInfoCell('app-total-app-target', '5');
    row += getInfoCell('', 'TOTA TARG FLOW');
    row += getInfoCell('app-total-flow-target', '2');
    rows += getInfoRow(row);

    html += getTabel(rows);
    html = getPanel(html);
    return html;
}

var draw_application_1 = function() {
    var html = getSectionTitle('ACTUAL');
    var rows = '';
    var row = '';
    row = getInfoCell('', 'MAIN ACTU APP');
    row += getInfoCell('app-main-app-actual', '100');
    row += getInfoCell('', 'MAIN ACTU FLOW');
    row += getInfoCell('app-main-flow-actual', '10000');
    rows += getInfoRow(row);
    row = getInfoCell('', 'TOTA ACTU APP');
    row += getInfoCell('app-total-app-actual', '5');
    row += getInfoCell('', 'TOTAL ACTU FLOW');
    row += getInfoCell('app-total-flow-actual', '2');
    rows += getInfoRow(row);

    html += getTabel(rows);
    html = getPanel(html);
    return html;
}

var draw_application_2 = function() {
    var html = getSectionTitle('DEVIATIONS');
    var rows = '';
    var row = '';
    row = getInfoCell('', 'MAIN APP DEVI');
    row += getInfoCell('app-main-app-deviation', '5');
    row += getInfoCell('', 'MAIN FLOW DEVI');
    row += getInfoCell('app-main-flow-deviation', '2');
    rows += getInfoRow(row);
    row = getInfoCell('', 'MAIN APP DEVI %');
    row += getInfoCell('app-main-app-deviation-per', '5');
    row += getInfoCell('', 'MAIN FLOW DEVI %');
    row += getInfoCell('app-main-flow-deviation-per', '2');
    rows += getInfoRow(row);
    row = getInfoCell('', 'TOTAL APP DEVI');
    row += getInfoCell('app-total-app-deviation', '5');
    row += getInfoCell('', 'TOTAL FLOW DEVI');
    row += getInfoCell('app-total-flow-deviation', '2');
    rows += getInfoRow(row);

    html += getTabel(rows);
    html = getPanel(html);
    return html;
}

var draw_application_3 = function() {
    var html = getSectionTitle('DEVIATION FLAGS');
    var rows = '';
    var row = '';
    row = getInfoCell('flags-app-2-per', '2%');
    row += getInfoCell('flags-app-5-per', '5%');
    row += getInfoCell('flags-app-10-per', '10%');
    row += getInfoCell('flags-app-25-per', '25%');
    rows += getInfoRow(row);

    html += getTabel(rows);
    html = getPanel(html);
    return html;
}

draw_application();