// Browserdetection
MAC_NS = false; MAC_IE = false; 
PC_NS  = false; PC_IE  = false;
IE     = false; NS     = false;
BROWSERVERSION = 0;

if((navigator.appVersion.indexOf("Mac")!= -1)){
        if(navigator.appName=="Netscape") {
                BROWSERVERSION = navigator.appVersion.substring(0,1);
                MAC_NS = true;
                NS     = true;
        } else {
                BROWSERVERSION = navigator.appVersion.substring(0,1);
                MAC_IE = true;
                IE     = true;
        }
} else {
        if(navigator.appName=="Netscape") {
                BROWSERVERSION = navigator.appVersion.substring(0,1);
                PC_NS = true;
                NS    = true;
        } else {
                BROWSERVERSION = navigator.appVersion.substring(0,1);
                PC_IE = true;
                IE    = true;
        }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function formInit() {
	if( NS ) { 
	    if (BROWSERVERSION <= 4)
		{block = document.main.document;}
		if (BROWSERVERSION >= 5) 
		{if (MAC_NS){block = document.main.document;} else {block = document;}}
	} else {
		block = main.document;
	}
}
	
function sfield_menu(link,formname,fieldname,varname)
{
	formInit();
	for(i=0;i<block.forms[''+formname].elements[''+fieldname].length;i++)
	{
		if(block.forms[''+formname].elements[''+fieldname].options[i].selected)
		{
			varvalue = block.forms[''+formname].elements[''+fieldname].options[i].value;
		}
	}
	
	location.href = link+'&'+varname+'='+varvalue;
}

function formSubmit(formname) 
{
	formInit();
	block.forms[''+formname].submit();
}

function formReset(formname) 
{
	formInit();
	block.forms[''+formname].reset();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function deletecheck(dellink)
{
  check = prompt("Zum ENDGÜLTIGEN löschen bitte 'ja' eingeben.","");
  if(check == "ja") location.href = dellink;
}

MM_reloadPage(true);