function findObject(objectId) { if(window.document.getElementById && window.document.getElementById(objectId)) return window.document.getElementById(objectId); else if (window.document.all && window.document.all(objectId)) return window.document.all(objectId); else if (window.document.layers && window.document.layers[objectId]) return window.document.layers[objectId]; else return null; } function getFormData(formName) { var _form = null; var _responseBody = ''; var _elm = null; if (typeof(findObject)=='function') { _form = findObject(formName); } else { alert('Form object ' + formName + ' could not be found'); } if (_form == null) return null; for(i=0;i<_form.elements.length;i++) { _elm = _form.elements[i]; switch(_elm.type) { case 'submit' : break; case 'checkbox' : case 'radio' : { if(_elm.checked == true) _responseBody += '&'+ encodeURIComponent(_elm.name)+'='+encodeURIComponent(_elm.value); break; } default : { _responseBody += '&'+ encodeURIComponent(_elm.name)+'='+encodeURIComponent(_elm.value); break; } } } return _responseBody; } function submitForm(formname) { try { var obj = findObject(formname); if (obj != null) obj.submit(); } catch(e) {} return false; } function doSubscribe() { var obj = findObject('email'); if (obj == null) alert('U kon niet aangemeld worden'); else { Subscribe.SubscribeMember(obj.value,function(response) { alert(response.value); }); } } function checkForm() { Form.CheckForm(getFormData('competitieForm'),function(response) { if (response.value != null) alert(response.value); else submitForm('competitieForm'); }); } function checkReserve(item) { try { var obj = findObject('reservedag'); if (obj != null) obj.disabled = !item.checked; } catch(e) {} } function checkType(item) { try { var obj = findObject('type'); if (obj != null) obj.disabled = !item.checked; } catch(e) {} }