function startJobEditMode(anfrage,url){
    if (anfrage.readyState == 4) {
        if (anfrage.status == 200) {
            var naviObj = anfrage.responseXML;
            var jobsArray = naviObj.getElementsByTagName("jobs");
            //Aktionen aus XML holen
            for(var i=0;i<jobsArray.length;i++){
                var job = jobsArray[i];
                if(job != null){
                    var id = trim(job.getElementsByTagName("id")[0].firstChild.nodeValue);
                    var bezeichnung = trim(job.getElementsByTagName("bezeichnung")[0].firstChild.nodeValue);
                    var msg = trim(job.getElementsByTagName("msg")[0].firstChild.nodeValue);
                }
            }

            $('jobId').value = id;
            $('job_bezeichnung').value = bezeichnung;
            $('job_text').value = msg;
            $('jobSaveButton').style.visibility = "hidden";
            $('jobEditButton').style.visibility = "visible";
            $('newJobMode').style.visibility = "visible";

            var jobText = $('jobText');
            while(jobText.hasChildNodes()){
                var firstChild = jobText.firstChild;
                jobText.removeChild(firstChild);
            }
            var neuerText = document.createTextNode("Job bearbeiten:");
            jobText.appendChild(neuerText);




        }
    }
}

function startNewJobMode(anfrage,url){
    if (anfrage.readyState == 4) {
        if (anfrage.status == 200) {
            //Text Ueberschrift aendern
            var jobText = $('jobText');
            while(jobText.hasChildNodes()){
                var firstChild = jobText.firstChild;
                jobText.removeChild(firstChild);
            }
            var neuerText = document.createTextNode("Neue Aktion anlegen:");
            jobText.appendChild(neuerText);

            $('jobId').value = "";
            $('job_bezeichnung').value = "";
            $('job_text').value = "";
            $('jobSaveButton').style.visibility = "visible";
            $('jobEditButton').style.visibility = "hidden";
            $('newJobMode').style.visibility = "hidden";

        }
    }
}

