﻿

function ChangeFilterOrganisation(ID){
	window.location.href = "index.php?sid=5&sort="+ID;
}

function login(){
	document.login.submit();
}
function submitenter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
   {
   document.login.submit();
   return false;
   }
else
   return true;
}

function ChangeOrganisation(ID, sort)
{
	window.location.href = "index.php?sid=5&orgID="+ID+"&sort="+sort;
}


function ChangeOrgAufgaben(AID)
{
	window.location.href = "index.php?sid=9&aufID="+AID;
}

function changeOnClick(mode,ID)
{
	switch (mode) {
    case "save": window.location.href = "index.php?sid=5&orgID="+ID+"&mode=save&did="+ID;
                   break;
 
    case "del": if(confirm("Wollen Sie wirklich löschen?")){
					window.location.href = "index.php?sid=5&mode=del&did="+ID;
				}
                     break;
 
    case "statusON": window.location.href = "index.php?sid=5&orgID="+ID+"&mode=statusON&did="+ID;
                     break;
 
    case "statusOFF":window.location.href = "index.php?sid=5&orgID="+ID+"&mode=statusOFF&did="+ID;
                       break;
  }

}

function changeClickAufgaben(mode,ID)
{
	switch (mode) {
    case "save": window.location.href = "index.php?sid=51&aufID="+ID+"&mode=save&did="+ID;
                   break;
 
    case "del": if(confirm("Wollen Sie wirklich löschen?")){
					window.location.href = "index.php?sid=51&mode=del&did="+ID;
				}
                     break;
 
    case "statusON": window.location.href = "index.php?sid=51&aufID="+ID+"&mode=statusON&did="+ID;
                     break;
 
    case "statusOFF":window.location.href = "index.php?sid=51&aufID="+ID+"&mode=statusOFF&did="+ID;
                       break;
  }

}

function orgDelete(ID)
{
	 window.location.href = "index.php?sid=9&did="+ID;
}

function DeleteAnsprechpartner(ID)
{
    window.location.href = "index.php?sid=52&mode=del&did="+ID;
}

function ChangeAnsprechpartner(ID)
{
	window.location.href = "index.php?sid=52&ansprID="+ID;
}

function ChangeFilterAufgabe(ID, OrgID){
	if(OrgID=="none")
		window.location.href = "index.php?sid=51&sort="+ID;	
	else
		window.location.href = "index.php?sid=51&sort="+ID+"&orgID="+OrgID;
}
function ChangeOrganisationAuf(ID, sort){
	if(sort=="none")
		window.location.href = "index.php?sid=51&orgID="+ID;
	else
		window.location.href = "index.php?sid=51&orgID="+ID+"&sort="+sort;
}
function ChangeAufgaben(ID, AID, sort)
{
	window.location.href = "index.php?sid=51&orgID="+ID+"&aufID="+AID+"&sort="+sort;
}
