function changePics(path, picName, mode)
{
	if(mode == "over")
	{
		marker = "markerGruen.gif";
	}
	else { marker = "markerRot.gif";}
	
	window.document.images[picName].src = path + "mat/" + marker;
}

//-----------------------------------------------------------------------

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-----------------------------------------------------------------------


function setFocus(formularName, formularField)
{
	if(window.document.forms[formularName].elements[formularField])
	{
		window.document.forms[formularName].elements[formularField].focus();
	}
}

//------------------------------------------------------------------------

function openWindow(file, name, width, height, top, left, scroll, resizable)
{
	window.open(file, name, "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + ",scrollbars=" + scroll + ",resizable=" + resizable + ",location=no,menubar=no,status=no,toolbar=no");
}

//------------------------------------------------------------------------

function detectIfPopUp(path)
{
	if(!opener) { window.document.location.href = path + "index.htm"; }
}

//------------------------------------------------------------------------

//------------------------------------------------------------------------
function showWarning(name)
{
	var warning = "Möchten Sie " + name + " wirklich löschen?";
	var antwort = false;
	meldung = confirm(warning);
	if(meldung) { antwort = true;}
	return antwort;
}

//------------------------------------------------------------------------

function submitThis(caller, page, path)
{
	var form = window.document.forms[caller];
	var sess = form.sess.value;
	var mode = form.mode.value;
	var url = page + "?sess=" + sess;
	
	if(mode == "edit")
	{
		alert('Bitte speichern Sie erst oder klicken Sie "Abbrechen"!');
	}
	
	else 
	{			
		if(caller == "formEditService")
		{
			var editID = form.elements["editID"].options[form.elements["editID"].selectedIndex].value;
			url = url + "&editID=" + editID;
		}
		url = encodeURI(url);
		//alert(url);
		
		window.location.href = url;			
	}	
}

//------------------------------------------------------------------------
