function OpenWinTest(link) {

    newwinTest=window.open(link,'newwinTest','width=300,height=200,scrollbars=0');
    newwinTest.focus();

}
function OpenWinmedi(link) {

    newwinmedi=window.open(link,'newwinmedi','width=600,height=525,scrollbars=1');
    newwinmedi.focus();

}

function OpenWinEin(link) {

    newwinEin=window.open(link,'newwinEin','width=600,height=525,scrollbars=0');
    newwinEin.focus();

}

function OpenWinEin2(link) {

    newwinEin=window.open(link,'newwinEin','width=600,height=645,scrollbars=0');
    newwinEin.focus();

}
function OpenWinanmeldung(link) {

    newwinanmeldung=window.open(link,'newwinanmeldung','width=600,height=650,scrollbars=1');
    newwinanmeldung.focus();

}
function OpenWinWirth(link) {

    newwinWirth=window.open(link,'newwinWirth','width=600,height=530,scrollbars=1');
    newwinWirth.focus();

}
function OpenWinCd(link) {

    newwinCd=window.open(link,'newwinCd','width=350,height=350,scrollbars=0');
    newwinCd.focus();

}

function donothing(){}

function curriculumValidator(theForm)
{
	if(theForm.Name.value=="")
	{
		alert("Bitte geben Sie Ihren Namen an!");
		theForm.Name.focus();
		return false;
	}
	if(theForm.Firma.value=="")
	{
		alert("Bitte geben Sie Ihre Firma an!");
		theForm.Firma.focus();
		return false;
	}	
	if(theForm.Adresse.value=="")
	{
		alert("Bitte geben Sie Ihre Adresse an!");
		theForm.Adresse.focus();
		return false;
	}
	if(theForm.Telefon.value=="")
	{
		alert("Bitte geben Sie Ihre Telefonnummer an!");
		theForm.Telefon.focus();
		return false;
	}
	if(theForm.Email.value=="")
	{
		alert("Bitte geben Sie Ihre Email-Adresse an!");
		theForm.Email.focus();
		return false;
	}		
		

	return true;	
	
}

function seminarValidator(theForm)
{
	if(theForm.Seminartitel.value=="")
	{
		alert("Bitte geben Sie den Seminartitel an!");
		theForm.seminartitel.focus();
		return false;
	}
	if(theForm.Datum.value=="")
	{
		alert("Bitte geben Sie das gewünschte Datum an!");
		theForm.Datum.focus();
		return false;
	}	
	if(theForm.Name.value=="")
	{
		alert("Bitte geben Sie Ihren Namen an!");
		theForm.Name.focus();
		return false;
	}
	if(theForm.Firma.value=="")
	{
		alert("Bitte geben Sie Ihre Firma an!");
		theForm.Firma.focus();
		return false;
	}	
	if(theForm.Adresse.value=="")
	{
		alert("Bitte geben Sie Ihre Adresse an!");
		theForm.Adresse.focus();
		return false;
	}
	if(theForm.Tel.value=="")
	{
		alert("Bitte geben Sie Ihre Telefonnummer an!");
		theForm.Tel.focus();
		return false;
	}
	if(theForm.Email.value=="")
	{
		alert("Bitte geben Sie Ihre Email-Adresse an!");
		theForm.Email.focus();
		return false;
	}
	if(!theForm.agbs.checked)
	{
		alert("sie müssen die AGBs akzeptieren!");
		theForm.agbs.focus();
		return false;
	}	
	

	return true;	
	
}

function submitForm(theForm,action)
{
 switch (action)
 {
  case 'del':
        Con = confirm("Wollen Sie diesen Eintrag wirklich löschen?");
              if (Con==true)
              {
               theForm.doit.value='del';
               theForm.submit();
              }
        break;

  case 'edit':
        theForm.doit.value = 'edit';
        theForm.submit();
        break;

  case 'up':
        theForm.doit.value = 'up';
        theForm.submit();
        break;

  case 'down':
        theForm.doit.value = 'down';
        theForm.submit();
        break;

   case 'nono':
        theForm.submit();
        break;

   case 'curriculum':
        if(curriculumValidator(theForm)==true)
        {
         theForm.submit();
        }
        break;
  
   case 'seminar':
        if(seminarValidator(theForm)==true)
        {
         theForm.submit();
        }
        break;
  }
}
