
function processAjaxError(xmlHttpRequest,textStatus,errorThrown){alert('xmlHttpRequest#'+xmlHttpRequest);alert('textStatus#'+textStatus);alert('errorThrown#'+errorThrown);}
$(function(){$("label.mandatory").after('<span style="margin-left: 5px; margin-right: 5px; color: red; ">*</span>');$(':input.mandatory').each(function(i){$('label[for="'+$(this).attr('id')+'"]').after('<span style="margin-left: 5px; margin-right: 5px; color: red; ">*</span>');});$.datepicker.setDefaults({showOn:'both',buttonImageOnly:true,buttonImage:'/images/calendar-green.gif'});$.datepicker.setDefaults($.datepicker.regional['nl']);});function validateMandatoryFields(formSelector){var result=true;$(formSelector).find(':input.mandatory').each(function(i){var value=$(this).val();if(this.nodeName=='TEXTAREA'){try{var EditorInstance=FCKeditorAPI.GetInstance($(this).attr('name'));value=EditorInstance.EditorDocument.body.textContent;}catch(e){}}
if(value===''||$.trim(value).length===0){var fieldName=$('label[for="'+$(this).attr('id')+'"]').text();if($.trim(fieldName).length===0){alert('Verplicht veld niet ingevuld');}else{alert(fieldName+' is een verplicht veld');}
$(this).focus();result=false;return result;}});return result;}
function sendContactForm(){$('input#submitButton').attr('disabled','disabled');if(validateMandatoryFields()){return true;}else{$('input#submitButton').removeAttr('disabled');return false;}}
function registerLightbox(selector){$(selector).lightBox({imageLoading:'/scripts/lib/jquery/plugins/lightbox/images/lightbox-ico-loading.gif',imageBtnPrev:'/scripts/lib/jquery/plugins/lightbox/images/lightbox-btn-prev.gif',imageBtnNext:'/scripts/lib/jquery/plugins/lightbox/images/lightbox-btn-next.gif',imageBtnClose:'/scripts/lib/jquery/plugins/lightbox/images/lightbox-btn-close.gif',imageBlank:'/scripts/lib/jquery/plugins/lightbox/images/lightbox-blank.gif',txtImage:'Afbeelding',txtOf:'van'});}
function showOrHideElement(id){$('.description-additionalinfo').hide();$('#'+id).show();}
