

function loadProjectSOW(projectID) {

    if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari

        xmlhttp = new XMLHttpRequest();

    }

    else {// code for IE6, IE5

        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

    }

    xmlhttp.onreadystatechange = function () {

        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            document.getElementById("var_sow_namef").innerHTML = xmlhttp.responseText;
        }

    }

    xmlhttp.open("GET", "getProjectSOW.php?projectID=" + projectID, true);

    xmlhttp.send();


}

function loadProjectPhases(projectID) {

    if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari

        xmlhttp = new XMLHttpRequest();

    }

    else {// code for IE6, IE5

        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

    }

    xmlhttp.onreadystatechange = function () {

        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            document.getElementById("input-phase1").innerHTML = xmlhttp.responseText;
            loadProjectZones(projectID);
        }

    }

    xmlhttp.open("GET", "getProjectPhases1.php?projectID=" + projectID, true);

    xmlhttp.send();


}

function loadProjectZones(projectID) {
    if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari

        xmlhttp = new XMLHttpRequest();

    }

    else {// code for IE6, IE5

        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

    }

    xmlhttp.onreadystatechange = function () {

        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            document.getElementById("input-zone1").innerHTML = xmlhttp.responseText;
            loadProjectSOW(projectID);
        }

    }

    xmlhttp.open("GET", "getProjectZones.php?projectID=" + projectID, true);

    xmlhttp.send();
}

$(document).ready(function(){

    $("#hideformdiv").click(function(){

        $("#formdiv").toggle();

    });

	$("#showformdiv").click(function(){

        $("#formdiv").toggle();

    });

	$("#addformdiv").click(function(){

        $("#formdiv").toggle();

    });

	$("#showhiddendiv").click(function(){

        $("#hiddendiv").toggle();

    });

	$("#hidehiddendiv").click(function(){

        $("#hiddendiv").toggle();

    })

	$("#shownotesdiv").click(function(){

        $("#notesdiv").toggle();

    })

	$("#showremsdiv").click(function(){

        $("#remsdiv").toggle();

    })

	$("#showfilesdiv").click(function(){

        $("#filesdiv").toggle();

    })

});
