<!--

// ------------ register.htm ------------------------------------------------------

function RegCheck(){

	var obj;
	var obj2;
	var obj_focus;
	var msg ="";
	var para,para2;
	var e_msg="";
	var test=true;
	obj_focus = document.reg.name_1;
	obj= document.reg.anrede[0];
	obj2= document.reg.anrede[1];

	if (!obj.checked  && !obj2.checked){
		msg = msg  +  "Anrede \n";
		test=false;
		obj_focus = obj;
	}

	obj= document.reg.vorname;
	if (obj.value==""){
		msg = msg  +  "Vorname \n";
		if (test)
			obj_focus = obj;
		test=false;
	}

	obj= document.reg.name_1;
	if (obj.value==""){
		msg = msg  +  "Name \n";
		if (test)
			obj_focus = obj;
		test=false;
	}


	obj= document.reg.strasse;
	if (obj.value==""){
		msg = msg  +  "Strasse \n";
		if (test)
			obj_focus = obj;
		test=false;
	}
	obj= document.reg.plz;
	lkz = document.reg.lkz.value;

	if (obj.value==""){
		msg = msg  +  "PLZ \n";
		if (test)
			obj_focus = obj;
		test=false;
	}else if (lkz=="D") {
		// Validierung der PLZ  nur bei deutschen Adressen
		var plz = String(obj.value);
		var	err =  isNaN(obj.value) || (lkz.toUpperCase() =="D"  && plz.length != 5);
		if (err){
			msg = msg  +  "Bitte prüfen Sie das Format der Postleitzahl. \n";
			if (test)
				obj_focus = obj;
			test=false;
		}
	}

	obj= document.reg.ort;
	if (obj.value==""){
		msg = msg  +  "Ort \n";
		if (test)
			obj_focus = obj;
		test=false;
	}

	obj= document.reg.telefon;
	if (obj.value==""){
		msg = msg  +  "Telefon \n";
		if (test)
			obj_focus = obj;
		test=false;
	}else {

		para =obj.value;
		para = para.replace(/-/g, "");
		para = para.replace(/\s/g, "");

		if (isNaN(para)==true){
			msg = msg  +  "Bitte prüfen Sie das Format der Telefonnummer.\n";
			if (test)
				obj_focus = obj;
			test=false;
		}
	}

	obj= document.reg.std_28;

	if (obj.value==""){
		msg = msg  +  "Hausnummer \n";
		if (test)
			obj_focus = obj;
		test=false;
	}else{
		/*
		para =obj.value;
		para = para.replace(/-/g, "");
		para = para.replace(/\s/g, "");

		if (isNaN(para)==true){
			msg = msg  +  "Bitte prüfen Sie das Format der Hausnummer.\n";
			if (test)
				obj_focus = obj;
			test=false;
		}
		*/
	}


	e_msg ="";
	obj= document.reg.email;
	obj2= document.reg.email2;
	para =  obj.value;
	para2 = obj2.value;

	if(para.search("@")==-1){
		e_msg ="Bitte prüfen Sie die eMail-Adresse! \n";
		if (test)
			obj_focus = obj;
		test=false;
	}

	if(para2.search("@")== -1) {
		e_msg ="Bitte prüfen Sie die eMail-Adresse! \n";
		if (test)
			obj_focus = obj2;
		test=false;
	}

	if (para==""){
		e_msg ="E-Mail \n";
		if (test)
			obj_focus = obj;
		test=false;
	}

	if (para2==""){
		e_msg = "E-Mail \n";
		if (test)
			obj_focus = obj2;
		test=false;
	}

	if ( (para!=para2) && e_msg == ""){
		e_msg = "Die E-Mail Angaben stimmen nicht überein!\n";
		if (test)
			obj_focus = obj;
		test=false;
	}

	msg = msg + e_msg;

	if(!test){
		alert("Folgende Felder sind noch zu füllen:\n" + msg);
		obj_focus.focus();
		return   false;
	}
	return   test;
}

// -----  filial-suche.html --------------------------------------------------------------
function setFilial(fname,name)
{
	window.status = name;
	for(i = 0; i < document.forms[fname].elements['search_string_1'].length;i++)
	if(document.forms[fname].elements['search_string_1'].options[i].value == name)
	{
		document.forms[fname].elements['search_string_1'].options[i].selected = true;
	}
}

function Filial(fname)
{

	plz =  document.forms[fname].elements['search_string_2'].value;
	if(plz != "" && isNaN(plz) )
	{
	    plz_new = plz.substr(0,1);
	    document.forms[fname].elements['search_string_3'].value = plz_new + '*';
	}

	return "true";
}

// -----  kontakt.html --------------------------------------------------------------
 function replaceVal() {
      var a = replaceVal.arguments;
      fname  = a[0];
      for (i = 1; i < a.length;i++)
      {
     	ename = a[i];
    	txt = document.forms[fname].elements[ename].value;
    	val = txt.replace(/&/g,'und');
    	document.forms[fname].elements[ename].value = val;
  	}
}

//-->

