function SetFocus() { if (document.forms.length > 0) { if(document.forms['login_bezoekers']!=null && document.forms['login_bezoekers'].elements['paswoord']!=null && document.forms['login_bezoekers'].elements['paswoord']!= "hidden" && !document.forms['login_bezoekers'].elements['paswoord'].disabled) { document.forms['login_bezoekers'].elements['paswoord'].focus(); document.forms['login_bezoekers'].elements['paswoord'].select(); } else { var field = document.forms[0]; for (i=0; i 1 { var test=cat+"&action=add_product&product="+k.name+cadeaubon; //we bouwen string op om pagina opnieuw te laden window.location=test; //laad pagina opnieuw } function checkkeywords_zoeken()//functie die wordt uitgevoerd bij het zoeken { var out = "", flag = 0; var b=document.zoeken.keyword.value; for (i = 0; i < b.length; i++) //overloopt de ingegeven waarde in de tekstbox keywords(=max bedrag), indien er een "," voorkomt wordt die omgezet naar een "." { if (b.charAt(i) != ",") { out += b.charAt(i); flag = 0; } else { if(flag == 0) { out += "."; flag = 1; } } } document.zoeken.keyword.value=out; var x=document.zoeken.keyword.value; var anum=/(^\d+$)|(^\d+\.\d+$)/; var anum2=/(^\d+$)|(^\d+\,\d+$)/; if(document.zoeken.keyword.value.length<1) { alert('Gelieve een maximum bedrag in te vullen!'); return false; } if(document.zoeken.keyword.value<=0) { alert('Gelieve een positief bedrag in te vullen!'); return false; } if (!anum.test(x)&&!anum2.test(x)) { alert('Gelieve een getal in te vullen voor het maximum bedrag!'); return false; } return true; } function help_login_bezoekers(body) { venster = window.open('','','width=400,height=750,scrollbars,resizable'); venster.document.write('Help'); venster.document.write(body); venster.document.write(''); } /*fotoalbum owners*/ function check_foto_upload() { if(document.form1.upload.value.length == 0 || document.form1.upload.value.length > 500000) { alert('gelieve een bestandsnaam op te geven. Klik hiervoor op bladeren.'); return false; } } /*geboortekaartje_edit*/ function check_geb_kaart_edit() { if (document.form1.geboortedatum.value.length !=0) { /*if(!IsValidDate(document.form1.geboortedatum.value)) { return false; }*/ } return true; } /* list overview owners*/ function sorteer_artikel(cat,k,cadeaubon) { var test=cat+"&sortorder="+k.options[k.selectedIndex].value+cadeaubon; window.location=test; } function toon_per_pagina(cat,k,cadeaubon) { var test=cat+"&pagesize="+k.options[k.selectedIndex].value+cadeaubon; window.location=test; } function ga_naar_pagina(cat)//deze functie wordt uitgevoerd indien er gekozen wordt om de volgende artikelen van de geboortelijst te zien. { var test=cat; window.location=test; } function controle_mail(emailStr) { /* The following variable tells the rest of the function whether or not to verify that the address ends in a two-letter country or well-known TLD. 1 means check it, 0 means don't. */ var checkTLD=1; /* The following is the list of known TLDs that an e-mail address must end with. */ var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|be|museum)$/; /* The following pattern is used to check if the entered e-mail address fits the user@domain format. It also is used to separate the username from the domain. */ var emailPat=/^(.+)@(.+)$/; /* The following string represents the pattern for matching all special characters. We don't want to allow special characters in the address. These characters include ( ) < > @ , ; : \ " . [ ] */ var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]"; /* The following string represents the range of characters allowed in a username or domainname. It really states which chars aren't allowed.*/ var validChars="\[^\\s" + specialChars + "\]"; /* The following pattern applies if the "user" is a quoted string (in which case, there are no rules about which characters are allowed and which aren't; anything goes). E.g. "jiminy cricket"@disney.com is a legal e-mail address. */ var quotedUser="(\"[^\"]*\")"; /* The following pattern applies for domains that are IP addresses, rather than symbolic names. E.g. joe@[123.124.233.4] is a legal e-mail address. NOTE: The square brackets are required. */ var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/; /* The following string represents an atom (basically a series of non-special characters.) */ var atom=validChars + '+'; /* The following string represents one word in the typical username. For example, in john.doe@somewhere.com, john and doe are words. Basically, a word is either an atom or quoted string. */ var word="(" + atom + "|" + quotedUser + ")"; // The following pattern describes the structure of the user var userPat=new RegExp("^" + word + "(\\." + word + ")*$"); /* The following pattern describes the structure of a normal symbolic domain, as opposed to ipDomainPat, shown above. */ var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$"); /* Finally, let's start trying to figure out if the supplied address is valid. */ /* Begin with the coarse pattern to simply break up user@domain into different pieces that are easy to analyze. */ var matchArray=emailStr.match(emailPat); if (matchArray==null) { /* Too many/few @'s or something; basically, this address doesn't even fit the general mould of a valid e-mail address. */ alert('Ongeldig emailadres (controleer dat @ en . 1 keer voorkomt in uw emailadres)'); return false; } var user=matchArray[1]; var domain=matchArray[2]; // Start by checking that only basic ASCII characters are in the strings (0-127). for (i=0; i127) { alert('Ongeldig emailadres - u gebruikte ongeldige tekens voorafgaand aan het @-teken.'); return false; } } for (i=0; i127) { alert('Ongeldig emailadres - uw domeinnaam (= na het @-teken) in ongeldig.'); return false; } } // See if "user" is valid if (user.match(userPat)==null) { // user is not valid alert('Ongeldig emailadres.'); return false; } /* if the e-mail address is at an IP address (as opposed to a symbolic host name) make sure the IP address is valid. */ var IPArray=domain.match(ipDomainPat); if (IPArray!=null) { // this is an IP address for (var i=1;i<=4;i++) { if (IPArray[i]>255) { alert('IP adres ongeldig!'); return false; } } return true; } // Domain is symbolic name. Check if it's valid. var atomPat=new RegExp("^" + atom + "$"); var domArr=domain.split("."); var len=domArr.length; for (i=0;i 12 || intMonth < 1) { alert('U gaf een ongeldige datum in. De datum moet gelijk zijn aan dd-mm-jjjj. Het cijfer voor de maand moet tussen de 1 en 12 liggen.'); return false; } intYear = parseInt(strYear, 10); if (isNaN(intYear)) { alert('U gaf een ongeldige datum in. De datum moet gelijk zijn aan dd-mm-jjjj. Enkel cijfers en de scheidingstekens - en / zijn toegelaten.'); return false; } if (IsLeapYear(intYear) == true) { intDaysArray[1] = 29; } if (intday > intDaysArray[intMonth - 1]) { alert("de maand "+intMaandenArray[intMonth-1]+" bevat geen "+intday+" dagen"); return false; } return true; } function IsLeapYear(intYear) { if (intYear % 100 == 0) { if (intYear % 400 == 0) { return true; } } else { if ((intYear % 4) == 0) { return true; } } return false; } function checkInputSize() { if(checkout_adress.boodschap.value.length > 130) { checkout_adress.boodschap.value = checkout_adress.boodschap.value.substring(0, 129); } }