<!-- Start Script

function swappic(img_name,img_src){
	document[img_name].src=img_src;
}
function openwindow(datei, w, h) {
	window.open(datei,"_blank","toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizeable=0,copyhistory=0,menubar=0,width=" + w + ",height=" + h)
}

function popup($datei, $w, $h, $sb, $resize) {
	window.open($datei,"_blank","toolbar=0,location=0,directories=0,status=0,scrollbars=" + $sb + ",resizable=" + $resize + ",copyhistory=0,menubar=0,width=" + $w + ",height=" + $h)
}

function SelectAll(theForm,selected) {

	for(var x = 0; x < theForm.elements.length; x++) { 
		
		theForm.elements[x].checked=selected;
	
	}
}

function qr($question, $url) {
	if (confirm($question)) {
		document.location.href = $url
	}
}


function addText($formular, $input, $text){
	document[$formular][$input].value = document[$formular][$input].value + $text;
}


function check(feld, meldung)
{
	var email = document.getElementsByName(feld)
		
	var OK = EMail(email.item(0).value);
		
	if (OK == false) {
		var answer = confirm (meldung)
		if (answer) d.submit();
		else return false;
	}
	
}

function EMail(s)
{
 var a = false;
 var res = false;
 if(typeof(RegExp) == 'function')
 {
  var b = new RegExp('abc');
  if(b.test('abc') == true){a = true;}
  }

 if(a == true)
 {
  reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)'+
                   '(\\@)([a-zA-Z0-9\\-\\.]+)'+
                   '(\\.)([a-zA-Z]{2,4})$');
  res = (reg.test(s));
 }
 else
 {
  res = (s.search('@') >= 1 &&
         s.lastIndexOf('.') > s.search('@') &&
         s.lastIndexOf('.') >= s.length-5)
 }
 return(res);
}
//  End -->
