
function FGM_Validate_5773039B020C3DEDC1256FDD0054314F()
{
          var v="";
          
v=FGM_getFieldValue(document.FGM_Job.LastName,"Text");
if(v =="" )
{
alert("Bitte geben Sie Ihren Nachnamen ein!");
document.FGM_Job.LastName.focus();
return false;
}

v=FGM_getFieldValue(document.FGM_Job.Country,"Dropdown");
if(v =="" )
{
alert("Bitte wählen Sie ein Land aus.");
document.FGM_Job.Country.focus();
return false;
}

v=FGM_getFieldValue(document.FGM_Job.InternetAddress,"Mail");
if(v =="" )
{
alert("Bitte geben Sie eine gültige Emailadresse ein!");
document.FGM_Job.InternetAddress.focus();
return false;
}

          
          
          return true;
}



function FGM_GetFieldValue ( theField, vType ) {
        //this function will return the field value (or value list) based on the element type
        theValue = ""; 
        sep = ""; 
        hits = 0;
        vType = vType.toLowerCase();
        //text is the user-entered value as a string
        if ( vType == "text" ) return ( theField.value ); 
        //textarea is the user-entered value as a string array of one element
        if ( vType == "textarea" ) return ( theField.value );
        //select is an array of selection pointers to an array of strings representing the choices
        if ( vType == "select" ) { 
                for ( i = 0; i < theField.options.length; i++ ) {
                        if ( theField.options[i].selected ) {
                                if ( theField.options[i].value == "" ) {
                                        theValue += theField.options[i].text
                                } else { 
                                        theValue += theField.options[i].value 
                                }
                        }
                } 
                return ( theValue );
        }
        if ( vType == "dropdown" ) { 
                 if ( theField.options[0].selected ) {
                         return("");
                 }
                 return("True");
        }
        
        // check Emailaddress
        if ( vType == "mail" ) { 
                var mail=theField.value;
                if(mail == "") {
                        return ("");
                } else {
                        var erg  = mail.search(/.+@..+\...+/);
                        if (erg==-1) {
                                 return ("");
                        }
                        var erg = mail.search(/\s/);
                        if(erg!=-1) {
                               return ("");
                        }
                } 
                return (mail);
        } 
        //checkboxes & radio buttons 
        if ( vType == "checkbox" || vType == "radiobutton" ) { 
                if ( theField.value == null ) {
                        //if we're here, we are validating a radio button or a nn multi-element checkbox
                        for ( i = 0; i < theField.length; i++ ) { 
                                if ( theField[i].checked ) { 
                                        hits++; 
                                        if ( hits > 1 ) {
                                                sep = "; ";
                                        } 
                                        theValue += sep + theField[i].value;  
                                } 
                        }
                } 
                return ( theValue );
 
        } else {
                //if we are here, must be an ie checkbox, or nn with a one-element checkbox")
                if ( navigator.appName == "Microsoft Internet Explorer" ) { 
                        //ie. return some data so we can validate on the server; 
                        return ("can't validate on client")
                }
                //nn one-element checkbox, see if its checked ...
                if (theField.checked ) { 
                        return ( theField.value ); 
                } else {
                        return ( "" ); 
                } 
        } 
}
function FGM_Validate()
{
          var v="";
          
          v=FGM_GetFieldValue(document.MSS_Person.LastName,"Text");
          if(v =="" )
          {
                    alert("Bitte geben Sie Ihren Nachnamen ein!");
                    document.MSS_Person.LastName.focus();
                    return false;
          }
          v=FGM_GetFieldValue(document.MSS_Person.Country,"Dropdown");
          if(v =="" )
          {
                    alert("Bitte wählen Sie ein Land aus.");
                    document.MSS_Person.Country.focus();
                    return false;
          }
          v=FGM_GetFieldValue(document.MSS_Person.InternetAddress,"Mail");
          if(v =="" )
          {
                    alert("Bitte geben Sie eine gültige Emailadresse ein!");
                    document.MSS_Person.InternetAddress.focus();
                    return false;
          }
          v=FGM_GetFieldValue(document.MSS_Person.MSS_SubscribeToList,"Checkbox");
          if(v =="" )
          {
                    alert("Bitte wählen Sie Ihr Intressensgebiet aus.");
                    
                    return false;
          }
          
          
          document.forms['MSS_Person'].submit();
          return true;
}
