/////////////----------SCRIPT NEW/UPDATE PLANIFICATION REPORT

/* cleaning input text day in month  */
function cleaningFieldDayInMonth(isCleaning) {
    if (isCleaning == "true") {
        document.getElementById("dayInMonthValue").value = "";
    }
}

/* use if when define period */
function showSubPeriod(valueOfPeriod) {
    showElements(valueOfPeriod);
}

/* Active or not boc depend value */
function showElements(myValue) {

    if (myValue === "daily") {
        // on fait rien
        document.getElementById("bloc_weekly").style.display = "none";
        document.getElementById("bloc_monthly").style.display = "none";
        document.getElementById("bloc_by_date").style.display = "none";
    } else if (myValue === "weekly") {
        // active div bloc_weekly
        document.getElementById("bloc_weekly").style.display = "";
        document.getElementById("bloc_monthly").style.display = "none";
        document.getElementById("bloc_by_date").style.display = "none";

    } else if (myValue === "monthly") {
        // active bloc_monthly
        document.getElementById("bloc_monthly").style.display = "";
        document.getElementById("bloc_weekly").style.display = "none";
        document.getElementById("bloc_by_date").style.display = "none";

    } else if (myValue === "date") {
        // active bloc_by_date
        document.getElementById("bloc_by_date").style.display = "";
        /* document.getElementById("bloc_by_date").style.visibility="visible"; */
        document.getElementById("bloc_weekly").style.display = "none";
        document.getElementById("bloc_monthly").style.display = "none";
    }
}
