function tabbar(action,hl) {
document.form.jsaction.value = action;
document.form.newhl.value = hl;
document.form.submit();
}

// Set Focus on the first field that contains an error
function errfocus (fieldname)
		{
		document.forms[0].elements[fieldname].focus();
		}
function formchanged ()
			{
			document.form.form_changed.value = 'yes';
			}

// Rückfrage (Ja,Nein) auslösen, Aktion zwischenspeichern

function ChangedConfirmSubmit(action,message)
	{
	confirmtype = "2";
	if (document.form.form_changed.value == 'yes' && message != '')
		{
		nextaction = action;
		openQuestion("Yes,No,Cancel",message);
		}
	else
		{
		ActionSubmit(action);
		}
	}
	
function ConfirmSubmit(action,message) 
{
  confirmtype = "1";
	if (message != '')
		{
		nextaction = action;
		openQuestion('Yes,No',message);
		}
	else
		{
		ActionSubmit(action);
		}
}

// zeigt ein Rückfragefenster
//   unter buttons wird eine Liste erwartet, die die Buttons bilden soll
//	 unter msg die Nachricht, die auf dem Fenster gezeigt werden soll */
function openQuestion(buttons,msg)
{
  Fenster = window.open("dsp_confirm.cfm?buttons=" + buttons + "&msg=" + msg,"Frage",
	"width=250,height=120,resizable=no");
	Fenster.moveTo(screen.width / 2 - 125, screen.height / 2 - 60);
}


	
// Nimmt die Antwort aus dem Rückfragefenster entgegen
function getanswer(answer)
{
  switch(confirmtype + "=" + answer)
	{
	  case "1=Yes":
		  ActionSubmit(nextaction);
			break;
		case "1=No":
			break;
		case "2=Yes":
		  ActionSubmit("2" + nextaction);
			break;
		case "2=No":
		  ActionSubmit(nextaction);
		case "2=Cancel":
		break;
	}
}

// Aktion über URL-Variable verschicken.
	function ActionSubmit(action) {
		document.forms[0].jsaction.value = action;
		document.forms[0].submit();
	}

function formsubmit(action,message) {
	if (message != '')
		{if (confirm (message) == true)
			{
			document.forms[0].action = document.forms[0].action + "?action=" + action;
			document.forms[0].submit();
			}
		}
	else
		{
		document.forms[0].action = document.forms[0].action + "?action=" + action;
		document.forms[0].submit();
		}
}

	<!-- begin to hide script contents from old browsers
	function checksearch()
	  {
		var searchlen = document.forms[0].searchterm.value;
		if(searchlen == "")
			{
			alert("Please type in keyword(s) to search!");
			}
		else {
				ActionSubmit('act_content_search');
			 }
	  }
	// end hiding script from old browsers -->



	function popitup(destination,win_name,win_dim) 
	{
			window.open (destination ,win_name,win_dim + ',' + 'resizable=no,scrollbars=no,toolbar=no,Left=250,Top=250,status=no,directories=no,menubar=no,location=tabelle');
 	}



	if (document.layers) document.captureEvents(Event.KEYPRESS); 
	// needed if you wish to cancel the key

	document.onkeypress = keyhandler;
	
	function keyhandler(e) {
	    if (document.layers)
	        Key = e.which;
	    else
	        Key = window.event.keyCode;
			
//        alert("Key pressed! ASCII-value: " + Key);

	    if (Key == 13){
			var searchlen = document.forms[0].searchterm.value;
			if(searchlen == "")
				{
				alert("Please type in keyword(s) to search!");
			    if (document.layers)
					return false;
		    	else
					window.event.returnValue = false;
				}
			else {
					ActionSubmit('act_content_search');
				 }
			}
	}
function noSpamMailLink(user,domain,tld,param) {
	locationstring = "mailto:" + user + "@" + domain + "." + tld + param;
	window.location = locationstring;
}



