function sendForm(fn){
    var f = document.forms[fn];
    
    $('#msg'+f.name,f).html('');
    $('span.errMSG',f).html(''); 
    
    var fs = {};
    $('input[mandatory=1],textarea[mandatory=1]',f).each(function(i){
        fs[$(this).attr('field')] = $(this).attr('field');
    });
    var p=[];
    
    for(var i in fs){
	    if(($('input[field='+fs[i]+']').attr('type')=='checkbox' || 
	       $('input[field='+fs[i]+']').attr('type')=='radio') &&
	       (typeof $('input:checkbox:checked[field='+fs[i]+']').val() =='undefined' &&
	        typeof $('input:radio:checked[field='+fs[i]+']').val()=='undefined'))
	    {
	        p.push(fs[i]); 
	    }
	    else if($('input[field='+fs[i]+']').attr('type')=='text' && $('input:[field='+fs[i]+']').val()==''){
	        p.push(fs[i]);  
	    }
	    else if(typeof $('textarea[field='+fs[i]+']')!='undefined' && $('textarea:[field='+fs[i]+']').val()==''){
	        p.push(fs[i]);   
	    }	        
    }
    
    if(p.length > 0){
        for(var i=0; i<p.length; i++){
            $('span.errMSG[field='+p[i]+']').html(langProfile.FieldIsMandatory);   
        }
        $('#msg'+f.name).html(langProfile.ErrorsInForm);
    } 
    else{
        $('#msg'+f.name).html(langProfile.Saving);
        f.submit();
    }
    
}
