Function.prototype.bind = function() { var __method = this, args = [].slice.call(arguments, 0), object = args.shift(); return function() { return __method.apply(object, args.concat([].slice.call(arguments, 0))); }; }; Object.extend = function(dest, source, allowOverwrite) { for (var prop in source) { if (source.hasOwnProperty(prop) && (allowOverwrite || !dest.hasOwnProperty(prop))) { dest[prop] = source[prop]; } } return dest; }; Object.extend(Array.prototype, { indexOf: function(search, from) { var i = from || 0; if (i < 0) { i += this.length; if (i < 0) i = 0; } for (var l = this.length; i < l; i++) { if (this[i] === search) return i; } return -1; }, lastIndexOf: function(search, from) { var i = this.length - 1; if (from != undefined) { if (from < 0) i += from + 1; else if (from < i) i = from; } for (; i >= 0; i--) { if (this[i] === search) return i; } return -1; }, forEach: function(func, obj) { for (var i = 0, l = this.length; i < l; i++) { if (i in this) func.call(obj, this[i], i, this); } }, map: function(func, obj) { var res = []; for (var i = 0, l = this.length; i < l; i++) { if (i in this) res[i] = func.call(obj, this[i], i, this); } return res; }, filter: function(func, obj) { var res = [], val; for (var i = 0, l = this.length; i < l; i++) { if (i in this) { val = this[i]; if (func.call(obj, val, i, this)) res.push(val); } } return res; }, some: function(func, obj) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && func.call(obj, this[i], i, this)) return true; } return false; }, every: function(func, obj) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && !func.call(obj, this[i], i, this)) return false; } return true; } }); ['join', 'reverse', 'sort', 'push', 'pop', 'shift', 'unshift', 'splice', 'concat', 'slice', 'indexOf', 'lastIndexOf', 'forEach', 'map', 'filter', 'some', 'every'].forEach( function(func) { if (!(func in Array) && func in Array.prototype) { Array[func] = function(obj) { return this.prototype[func].apply( obj, Array.prototype.slice.call(arguments, 1) ); } } } ); function addEvent(element, type, handler) { if (element.addEventListener) element.addEventListener(type, handler, false); else { if (!handler.$$guid) handler.$$guid = addEvent.guid++; if (!element.events) element.events = {}; var handlers = element.events[type]; if (!handlers) { handlers = element.events[type] = {}; if (element['on' + type]) handlers[0] = element['on' + type]; element['on' + type] = handleEvent; } handlers[handler.$$guid] = handler; } } addEvent.guid = 1; function removeEvent(element, type, handler) { if (element.removeEventListener) element.removeEventListener(type, handler, false); else if (element.events && element.events[type] && handler.$$guid) delete element.events[type][handler.$$guid]; } function handleEvent(event) { event = event || fixEvent(window.event); var returnValue = true; var handlers = this.events[event.type]; for (var i in handlers) { if (!Object.prototype[i]) { this.$$handler = handlers[i]; if (this.$$handler(event) === false) returnValue = false; } } if (this.$$handler) this.$$handler = null; return returnValue; } function fixEvent(event) { event.preventDefault = fixEvent.preventDefault; event.stopPropagation = fixEvent.stopPropagation; return event; } fixEvent.preventDefault = function() { this.returnValue = false; }; fixEvent.stopPropagation = function() { this.cancelBubble = true; }; if (!window.addEventListener) { document.onreadystatechange = function() { if (window.onload && window.onload != handleEvent) { addEvent(window, 'load', window.onload); window.onload = handleEvent; } } } function cancelEvent(e) { if (!e) e = window.event; if (e.stopPropagation) e.stopPropagation(); if (e.preventDefault) e.preventDefault(); e.cancelBubble = true; e.cancel = true; e.returnValue = false; return false; } function number_format (number, decimals, dec_point, thousands_sep) { var n = number, prec = decimals; var toFixedFix = function (n,prec) { var k = Math.pow(10,prec); return (Math.round(n*k)/k).toString(); }; n = !isFinite(+n) ? 0 : +n; prec = !isFinite(+prec) ? 0 : Math.abs(prec); var sep = (typeof thousands_sep === 'undefined') ? '.' : thousands_sep; var dec = (typeof dec_point === 'undefined') ? ',' : dec_point; var s = (prec > 0) ? toFixedFix(n, prec) : toFixedFix(Math.round(n), prec); var abs = toFixedFix(Math.abs(n), prec); var _, i; if (abs >= 1000) { _ = abs.split(/\D/); i = _[0].length % 3 || 3; _[0] = s.slice(0,i + (n < 0)) + _[0].slice(i).replace(/(\d{3})/g, sep+'$1'); s = _.join(dec); } else { s = s.replace('.', dec); } var decPos = s.indexOf(dec); if (prec >= 1 && decPos !== -1 && (s.length-decPos-1) < prec) { s += new Array(prec-(s.length-decPos-1)).join(0)+'0'; } else if (prec >= 1 && decPos === -1) { s += dec+new Array(prec).join(0)+'0'; } return s; } function errorHandler(error) { var div = createElement('div', { innerHTML : error }, { border : '1px solid #FF0000', backgroundColor : '#FFEEEE', padding : '10px' } ); if (body = document.getElementsByTagName('body')[0]) body.insertBefore(div, body.firstChild); else document.write(div.innerHTML); } function getCookie(name) { var cookie = document.cookie.split('; '), i = cookie.length, value; while (i--) { value = cookie[i].split('='); if ('test_' + name == value[0]) return unescape(value[1]); } return null; } function setCookie(name, value, expire) { var date = new Date(); if (expire) date.setTime(date.getTime() + expire * 1000); else date.setFullYear(date.getFullYear() + 1); document.cookie = cookie_name + '_' + name + '=' + escape(value) + '; expires=' + date.toGMTString() + '; path=/' + (cookie_host ? '; domain=' + cookie_host : ''); } function clearCookie(name) { setCookie(name, '', -1); } function createElement(tag, attribs, styles, parent, before) { var el = document.createElement(tag); if (attribs) setAttribs(el, attribs); if (styles) setStyles(el, styles); if (parent) parent.appendChild(el); if (before) before.parentNode.insertBefore(el, before); return el; } function setAttribs(el, attribs) { for (var x in attribs) el[x] = attribs[x]; } function setStyles(el, styles) { for (var x in styles) try { el.style[x] = styles[x]; } catch (e) {} } function getFormInput(form, name) { for (var i=0, l=form.elements.length; i<l; i++) if (form.elements[i].name == name) return form.elements[i].value; return ''; } function setFormInput(form, name, value) { for (var i=0, l=form.elements.length; i<l; i++) if (form.elements[i].name == name) form.elements[i].value = value; } function validate_form() { var valid = true; var warnings = cssQuery('.required_field_warning'); for (var i = 0, l = warnings.length; i < l; i++) warnings[i].parentNode.removeChild(warnings[i]); var inputs = cssQuery('.required_field, .required', this); for (var i = inputs.length - 1; i >= 0; i--) { if ((inputs[i].type == 'checkbox' && inputs[i].checked == false) || inputs[i].value == '' || inputs[i].value == 'http://') valid = validate_form_message(inputs[i], 'Dit veld is verplicht'); if (inputs[i].maxLength > 0 && inputs[i].value.length > inputs[i].maxLength) valid = validate_form_message(inputs[i], 'Dit veld bevat teveel karakters'); } return valid; } function validate_form_message(input, message) { input.focus(); createElement( 'span', { innerHTML: ' * ' + message, className: 'required_field_warning' }, null, input.parentNode ); return false; } function duplicate_element_onchange() { var nesting_count = duplicate_nesting_count; var parent = this.parentNode; removeEvent(this, 'change', duplicate_element_onchange); removeEvent(this, 'keydown', duplicate_element_onchange); while (nesting_count--) parent = parent.parentNode; parent.appendChild(duplicate_element); set_duplicate_element_onchange(duplicate_element_id, duplicate_nesting_count); } function duplicate_element_onchange_delete() { if (!this.deleteElement) this.deleteElement = createElement( 'input', { 'type' : 'button', 'value' : duplicate_element_delete, 'onclick' : function() { this.value = ''; this.parentNode.removeChild(this.deleteElement); this.deleteElement = null; }.bind(this) }, {}, this.parentNode ); } function toggle_element(element, hide, delay) { element = typeof element == 'object' ? element : document.getElementById(element); if (delay) element.toggle_element_timeout = setTimeout(function() { this.style.display = hide ? 'none' : 'block'; }.bind(element), delay); else element.style.display = hide ? 'none' : 'block'; } function toggle_element_cancel(element) { element = typeof element == 'object' ? element : document.getElementById(element); clearTimeout(element.toggle_element_timeout); } function toggle_element_disable(element, hide) { element = typeof element == 'object' ? element : document.getElementById(element); element.disabled = hide; } function set_opacity(element, alpha) { element = typeof element == 'object' ? element : document.getElementById(element); element.style.opacity = alpha / 100; element.style.filter = 'alpha(opacity=' + alpha + ')'; } function html_entities(input) { var output = ''; for (var i = 0, l = input.length; i < l; i++) output += input.charCodeAt(i) < 256 ? input.charAt(i) : '&#' + input.charCodeAt(i) + ';'; return output; } function get_message_preview(form, submit) { if (!validate_form.bind(form)()) return false; this.action = getFormInput(form, 'data[action]'); document.body.className += ' progress'; var xml = new xmlhttp(submit == true ? process_message_submit.bind(this) : process_message_preview.bind(this), set_message_error.bind(form)); xml.postRequest(script_xml_url, { 'data[action]' : this.action, 'data[content_id]' : getFormInput(form, 'data[content_id]'), 'data[parent_id]' : getFormInput(form, 'data[parent_id]'), 'data[parent_type]' : getFormInput(form, 'data[parent_type]'), 'data[message_id]' : getFormInput(form, 'data[message_id]'), 'data[content_raw]' : html_entities(getFormInput(form, 'data[content_raw]')), 'data[general_conditions]' : getFormInput(form, 'data[general_conditions]'), 'data[submit]' : submit == true ? '1' : '0' } ); return false; } function get_message_submit(form, link) { get_message_preview.bind(this, form, true)(); if (link) { form.parentNode.parentNode.removeChild(form.parentNode); link.message_form = false; } return false; } function process_update_message(xml) { var message_container = this.parentNode.parentNode.parentNode; this.message_form = createElement( 'span', { innerHTML : xml.getElementsByTagName('message_form')[0].firstChild.nodeValue }, null, message_container.nextSibling ? null : message_container.parentNode, message_container.nextSibling ? message_container.nextSibling : null ); var message_buttons = cssQuery('ul.submit input', this.message_form); message_buttons[0].onclick = get_message_preview.bind(this.parentNode.parentNode.nextSibling, this.message_form.firstChild); message_buttons[1].onclick = get_message_submit.bind(this.parentNode.parentNode.nextSibling, this.message_form.firstChild, this); var messageBox = cssQuery('textarea', this.message_form); set_messageBox(messageBox[0], true); } function process_quote_message(xml) { var textarea = document.getElementById('messageBox'); if (textarea) { window.location.hash = '#quickreply'; if (textarea.value != '') textarea.value = textarea.value + '\n\n'; textarea.value = textarea.value + xml.getElementsByTagName('message_quote')[0].firstChild.nodeValue; textarea.focus(); } } function process_message_preview(xml) { this.innerHTML = xml.getElementsByTagName('message_content')[0].firstChild.nodeValue; var message_container = this.action == 'update_message' ? this.parentNode : this.firstChild; set_message_status(message_container, 'Voorbeeld, ' + (this.action == 'update_message' ? 'klik Wijzigen om te bevestigen' : 'klik Toevoegen om te plaatsen')); message_container.className += ' message_preview'; document.body.className = document.body.className.replace('progress', ''); if (this.action == 'insert_message' && window.location.hash != '#reactie') window.location.hash = '#reactie'; } function process_message_submit(xml) { var message_output = createElement( 'span', { innerHTML: xml.getElementsByTagName('message_output')[0].firstChild.nodeValue } ); this.parentNode.parentNode.replaceChild(message_output, this.parentNode); var output_messages_empty = document.getElementById('output_messages_empty'); if (output_messages_empty) output_messages_empty.parentNode.removeChild(output_messages_empty); var output_messages_count = document.getElementById('output_messages_count'), message_count = xml.getElementsByTagName('message_count'); if (output_messages_count && message_count.length > 0) output_messages_count.innerHTML = message_count[0].firstChild.nodeValue; set_message_status(message_output, 'Reactie ' + (this.action == 'update_message' ? 'gewijzigd' : 'toegevoegd'), 5); if (this.action == 'insert_message') document.getElementById('messageBox').value = ''; set_message_ajax(message_ajax_below); document.body.className = document.body.className.replace('progress', ''); if (this.action == 'insert_message') window.location.hash = '#' + xml.getElementsByTagName('message_id')[0].firstChild.nodeValue; } function set_message_status(message_container, status, remove_delay, blink_count) { var author = cssQuery('p.author, span.message_preview', message_container); if (author.length == 1) var status_span = createElement( 'span', { innerHTML : ' (' + status + ')', className : 'message_preview' }, null, author[0] ); if (remove_delay) setTimeout(function() { this.parentNode.removeChild(this); }.bind(status_span), remove_delay * 1000); if (blink_count > 1) setTimeout(function() { set_message_status(message_container, status, remove_delay, blink_count - 1); }, remove_delay * 2000); } function set_message_error(error) { var div = createElement('div', { innerHTML : error.replace('Error: ', 'Foutmelding: ') }, { border : '1px solid #FF0000', backgroundColor : '#FFEEEE', padding : '10px' } ); this.insertBefore(div, this.firstChild); setTimeout(function() { this.removeChild(div); }.bind(this), 5000); } function motor_brands_onchange(e) { var motor_model = this.motor_model; while (motor_model.length > motor_model.startLength) motor_model.remove(motor_model.startLength); var xml = new xmlhttp(process_options.bind(motor_model), errorHandler); xml.getRequest(script_xml_url + '/' + current_action, { 'data[get_motor_models]' : 1, 'data[motor_brand_id]' : this.options[this.selectedIndex].value } ); } function suggest_box_events_keyup(e) { if (!this.processKeyup) return false; if (!this.processSuggests) return true; while (this.suggestsTarget.length > this.suggestsTarget.startLength) this.suggestsTarget.remove(this.suggestsTarget.startLength); if (this.value != '') { this.suggestsTarget.currentValue = this.value.toLowerCase(); if (this.suggestsTarget.previousValue != '' && this.suggestsTarget.currentValue.substring(0, this.suggestsTarget.previousValue.length) == this.suggestsTarget.previousValue) { process_options_internal.bind(this.suggestsTarget)(); } else { if (this.suggestsTarget.xml) this.suggestsTarget.xml.cancelRequest(); this.suggestsTarget.xml = new xmlhttp(process_options.bind(this.suggestsTarget), errorHandler); this.suggestsTarget.xml.getRequest(script_xml_url + '/' + current_action, { 'data[get_locations]' : 1, 'data[location_name]' : this.value } ); } } else toggle_element('location_suggests', true); } function suggest_box_events_keypress(e) { if (!e) e = event; var chr = e.charCode || e.keyCode; this.processKeyup = this.suggestsTarget.style.display != 'block'; this.processSuggests = true; switch (chr) { case 9: case 13: toggle_element('location_suggests', true); break; case 33: if (this.suggestsTarget.selectedIndex > this.suggestsTarget.size) this.suggestsTarget.selectedIndex -= this.suggestsTarget.size; else this.suggestsTarget.selectedIndex = 0; break; case 34: if (this.suggestsTarget.selectedIndex < this.suggestsTarget.length - this.suggestsTarget.size) this.suggestsTarget.selectedIndex += this.suggestsTarget.size; else this.suggestsTarget.selectedIndex = this.suggestsTarget.length - 1; break; case 35: this.suggestsTarget.selectedIndex = this.suggestsTarget.length - 1; this.processSuggests = false; break; case 36: this.suggestsTarget.selectedIndex = 0; this.processSuggests = false; break; case 38: if (this.suggestsTarget.selectedIndex > 0) this.suggestsTarget.selectedIndex--; break; case 40: if (this.suggestsTarget.selectedIndex < this.suggestsTarget.length - 1) this.suggestsTarget.selectedIndex++; break; case 37: case 39: this.processSuggests = false; default: this.processKeyup = true; } if (!this.processKeyup) { if (this.suggestsTarget.selectedIndex >= 0) this.value = this.suggestsTarget.options[this.suggestsTarget.selectedIndex].text; return cancelEvent(e); } } function suggest_input_events_click(e) { this.suggestsTarget.value = this.options[this.selectedIndex].text; this.suggestsTarget.focus(); } function suggest_input_events_mouseover(e) { if (e.target && e.target.nodeName.toLowerCase() == 'option') this.selectedIndex = e.target.index; } function select_file_callback(id, link) { this.parentNode.className = ''; this.targetInput.value = id; this.targetInput.link = link; if (!this.targetImage) { this.targetImage = createElement('img', { className : 'file_chooser', targetInput : this.targetInput, onclick : this.onclick }, null, null, this ); this.targetImage.targetImage = this.targetImage; } this.targetImage.src = link + '/' + this.targetInput.thumb_name; if (this.targetInput.onchange) this.targetInput.onchange.bind(this.targetInput)(); } function pictures_sorter_onchange(start_position, stop_position) { var xml = new xmlhttp(pictures_sorter_result.bind(this), errorHandler); xml.postRequest(script_xml_url, { 'data[action]' : 'update_gallery_order', 'data[user_id]' : user_id, 'data[gallery_id]' : gallery_id, 'data[order_from]' : start_position, 'data[order_to]' : stop_position } ); } function pictures_sorter_result() { var position_updated = createElement('span', { innerHTML : 'Positie opgeslagen', className : 'position_updated' }, null, this ); setTimeout(function() { this.parentNode.removeChild(this); }.bind(position_updated), 2000); } var maxWidth = 665; function scaleImage(e, img) { if (!img) img = this; if (img.className == 'resized_image') return; var imgWidth = 0, imgHeight = 0; if (img.naturalWidth) { imgWidth = img.naturalWidth; imgHeight = img.naturalHeight; } else if (img.complete) { var dum = new Image(); dum.src = img.src; imgWidth = dum.width; imgHeight = dum.height; } else { imgWidth = img.width; imgHeight = img.height; } if (imgWidth > maxWidth) { img.className = 'resized_image'; if (img.width > maxWidth) { img.style.width = maxWidth + 'px'; img.style.height = Math.round(imgHeight * (maxWidth / imgWidth)) + 'px'; } } } var custom_profile_style = null; function toggle_page_style() { if (!custom_profile_style) { var style = document.getElementsByTagName('style'); style = style[style.length-1]; custom_profile_style = style.parentNode.removeChild(style); this.innerHTML = 'Zet opmaak aan'; } else { var head = document.getElementsByTagName('head')[0]; head.appendChild(custom_profile_style); custom_profile_style = null; this.innerHTML = 'Zet opmaak uit'; } } function process_options(xml) { if (this.length > this.startLength) return; var options = xml.documentElement.childNodes; for (var i=0; i<options.length; i++) { createElement('option', { innerHTML : options[i].firstChild.nodeValue, value : options[i].attributes[0].nodeValue }, null, this ); if (typeof this.availableOptions != 'undefined') this.availableOptions[i] = { data : options[i].firstChild.nodeValue, value : options[i].attributes[0].nodeValue }; } if (options.length && typeof this.newOption != 'undefined') createElement('option', { innerHTML : 'Anders...', value : '0' }, null, this ); toggle_element(this, this.length == this.startLength); if (typeof this.currentValue != 'undefined') this.previousValue = this.currentValue; } function process_options_internal() { if (this.length > this.startLength) return; var options = this.availableOptions; for (var i=0; i<options.length; i++) { if (options[i].data.toLowerCase().substring(0, this.currentValue.length) == this.currentValue) createElement('option', { innerHTML : options[i].data, value : options[i].value }, null, this ); } toggle_element(this, this.length == this.startLength); } function set_file_updated() { var updated_file = createElement('p', { innerHTML : 'Keuze opgeslagen', className : 'file_updated' }, null, null, this.parentNode.getElementsByTagName('p')[0] ); setTimeout(function() { this.parentNode.removeChild(this); }.bind(updated_file), 2000); } var map_user_location_id = 0; function process_map(xml) { if (!xml.documentElement.childNodes.length) { var div = document.getElementById('map_output'); var p = document.getElementById('map_overlay'); p.style.display = 'none'; set_opacity(div, 100); if (map_user_location_id) markers[map_user_location_id].openInfoWindowHtml(markers_html[map_user_location_id]); return; } var map_location, id, name, lat, lon, users, user_id, user_name, html_location, html_user; for (var i=0, l=xml.documentElement.childNodes.length; i<l; i++) { map_count++; map_location = xml.documentElement.childNodes[i]; user_id = map_location.attributes[0].nodeValue; user_name = map_location.childNodes[0].firstChild.nodeValue; id = map_location.childNodes[1].firstChild.nodeValue; name = map_location.childNodes[2].firstChild.nodeValue; lat = map_location.childNodes[3].firstChild.nodeValue; lon = map_location.childNodes[4].firstChild.nodeValue; html_location = '<b>' + name + ':</b>'; html_user = '<a href="' + script_url + '/../gebruiker/' + user_id + '">' + user_name + '</a>'; process_map_marker(id, lat, lon, html_location, html_user); if (map_user == user_id || map_user.toLowerCase() == user_name.toLowerCase()) map_user_location_id = id; } map_count_container.innerHTML = map_count; map_percentage_container.innerHTML = Math.round(100 * map_count / map_count_total); setTimeout(function() { map_xml.getRequest(script_xml_url + '/view_map/' + ++map_offset); }, 500); } var markers = new Array(), markers_html = new Array(), marker_open; function process_map_marker(id, lat, lon, html_location, html_user) { if (typeof markers[id] == 'undefined') { markers[id] = new GMarker(new GLatLng(lat, lon), map_icon); markers_html[id] = '<div class="map_users">' + html_location + html_user + '</div>'; } else markers_html[id] = markers_html[id].substr(0, markers_html[id].length - 6) + html_user + '</div>'; GEvent.addListener(markers[id], 'click', function() { markers[id].openInfoWindowHtml(markers_html[id]); }); map.addOverlay(markers[id]); } function set_forms_onsubmit() { var forms = document.getElementsByTagName('form'); for (var i = 0, l = forms.length; i < l; i++) if (typeof forms[i].onsubmit == 'undefined' || !forms[i].onsubmit) forms[i].onsubmit = validate_form; } function set_external_onclick() { var a = document.getElementsByTagName('a'); for (var i = 0, l = a.length; i < l; i++) { if (a[i].rel == 'external') { a[i].onclick = function(e) { cancelEvent(e); window.open(this.href); return false; }; } } } var message_ajax_below; function set_message_ajax(below) { message_ajax_below = below; var element; if (element = document.getElementsByName('update_message')) set_update_onclick(element); if (element = document.getElementsByName('quote_message')) set_quote_onclick(element); set_message_quickreply(); } function set_update_onclick(elements) { for (var i = 0, l = elements.length; i < l; i++) elements[i].onclick = function() { if (this.message_form) { this.message_form.parentNode.removeChild(this.message_form); this.message_form = false } else { var xml = new xmlhttp(process_update_message.bind(this), errorHandler); xml.getRequest(script_xml_url + '/update_message/' + this.href.split('/').pop()); } return false; } } function set_quote_onclick(elements) { if (!document.getElementById('messageBox')) return; for (var i = 0, l = elements.length; i < l; i++) elements[i].onclick = function() { var xml = new xmlhttp(process_quote_message, errorHandler); xml.getRequest(script_xml_url + '/view_message/' + this.href.split('/').pop()); return false; } } function set_message_quickreply() { var messageBox = document.getElementById('messageBox'); if (!messageBox || messageBox.value != '' || getFormInput(messageBox.form, 'data[action]') == current_action) return; var message_container = createElement( 'span', null, null, null, message_ajax_below ? messageBox.form.nextSibling : messageBox.form ); var message_content = createElement( 'span', null, null, message_container ); message_buttons = cssQuery('ul.submit input', messageBox.form); message_buttons[0].onclick = get_message_preview.bind(message_content, messageBox.form); message_buttons[1].onclick = get_message_submit.bind(message_content, messageBox.form, false); var quickreply = cssQuery('.quickreply'), quickreply_open = cssQuery('.quickreply_open')[0]; if (quickreply_open) { addEvent(quickreply_open, 'click', function() { toggle_element(quickreply_open, true); for (var i = 0; i < quickreply.length; i++) toggle_element(quickreply[i], false); messageBox.focus(); }); for (var i = 0; i < quickreply.length; i++) toggle_element(quickreply[i], true); } } var duplicate_element, duplicate_element_id, duplicate_element_callback, duplicate_nesting_count; function set_duplicate_element_onchange(input, nesting_count) { duplicate_nesting_count = nesting_count = nesting_count || 2; if (typeof input == 'string') input = document.getElementById(input); input.value = ''; var dl = input; while (nesting_count--) dl = dl.parentNode; if (++duplicate_element_count < duplicate_element_maximum) { duplicate_element = dl.cloneNode(true); duplicate_element_id = input.id; addEvent(input, 'change', duplicate_element_onchange); addEvent(input, 'keydown', duplicate_element_onchange); } if (typeof duplicate_element_delete != 'undefined' && duplicate_element_delete) { addEvent(input, 'change', duplicate_element_onchange_delete); addEvent(input, 'keydown', duplicate_element_onchange_delete); } var labels = dl.getElementsByTagName('label'); for (var i = 0, l = labels.length; i < l; i++) { labels[i].htmlFor = labels[i].htmlFor + '_' + duplicate_element_count; labels[i].innerHTML = labels[i].innerHTML.replace(':', ' ' + duplicate_element_count + ':'); } var inputs = dl.getElementsByTagName('input'); for (var i = 0, l = inputs.length; i < l; i++) { inputs[i].id = inputs[i].id + '_' + duplicate_element_count; switch (inputs[i].type) { case 'text' : inputs[i].value = ''; break; case 'radio' : inputs[i].value = duplicate_element_count; break; } } if (typeof duplicate_element_callback == 'function') duplicate_element_callback(); if (typeof duplicate_element_pad == 'boolean' && duplicate_element_pad && duplicate_element_count < duplicate_element_maximum) duplicate_element_onchange.bind(input)(); } function set_login_link() { var link = document.getElementById('login_link'), form = document.getElementById('login_form'); link.onclick = function() { form.submit(); return false; }; } function set_quicksearch_submit() { var form = document.getElementById('quicksearch_form'); form.onsubmit = function() { switch (getFormInput(this, 'data[query_type]')) { case 'name' : case 'location' : this.action = base_url + 'gebruikers'; break; case 'contents' : this.action = base_url + 'zoeken'; break; } }; } var motor_dl; function set_update_profile_events() { var get_motor_models = document.getElementsByName('data[get_motor_models]'), motor_brands = document.getElementsByName('data[motor_brand_id][]'), motor_models = document.getElementsByName('data[motor_model_id][]'), motor_models_new = document.getElementsByName('data[motor_model_new][]'), motor_files = document.getElementsByName('data[motor_file_id][]'), motor_add = document.getElementById('motor_add'); if (motor_add) { motor_dl = motor_add.parentNode.parentNode.previousSibling.previousSibling.cloneNode(true); createElement('dd', { innerHTML : 'Motor toevoegen', className : 'update_motor_insert', onclick : function() { var node = motor_dl.cloneNode(true); this.parentNode.parentNode.insertBefore(node, this.parentNode); set_update_profile_events(); } }, null, null, motor_add.parentNode ); motor_add.parentNode.parentNode.removeChild(motor_add.parentNode); } if (get_motor_models) for (var i = 0, l = get_motor_models.length; i < l; i++) get_motor_models[i].style.display = 'none'; if (motor_brands) for (var i = 0, l = motor_brands.length; i < l; i++) { if (motor_brands[i].processed) continue; motor_brands[i].processed = true; motor_brands[i].motor_model = motor_models[i]; motor_brands[i].onchange = motor_brands_onchange; } if (motor_models) for (var i = 0, l = motor_models.length; i < l; i++) { if (motor_models[i].processed) continue; motor_models[i].processed = true; motor_models[i].startLength = 1; motor_models[i].newOption = motor_models_new[i]; motor_models[i].onchange = function() { toggle_element(this.newOption, this.selectedIndex != this.length - 1); }; createElement('dd', { innerHTML : 'Motor verwijderen', className : 'update_motor_remove', onclick : function() { this.selectedIndex = 0; this.parentNode.parentNode.parentNode.parentNode.className = 'update_motor_hidden'; }.bind(motor_models[i]) }, null, motor_models[i].parentNode.parentNode.parentNode.parentNode ); toggle_element(motor_models[i], motor_models[i].length == motor_models[i].startLength); } if (motor_models_new) for (var i = 0, l = motor_models_new.length; i < l; i++) motor_models_new[i].style.display = 'none'; if (motor_files) { for (var i = 0, l = motor_files.length; i < l; i++) { if (motor_files[i].processed) continue; motor_files[i].processed = true; set_file_chooser(motor_files[i], 'small'); } } set_location_suggests(); } function set_search_profile_events() { var motor_brand = document.getElementById('motor_brand'), motor_model = document.getElementById('motor_model'); motor_brand.motor_model = motor_model; motor_brand.onchange = motor_brands_onchange; motor_model.startLength = 1; toggle_element(motor_model, motor_model.length == motor_model.startLength); set_location_suggests(); } function set_location_suggests() { var location_name = document.getElementById('location_name'), location_container = document.getElementById('location_container'); if (location_name) { var location_suggests = createElement('select', { name : 'data[location_suggests]', id : 'location_suggests', size : 10, availableOptions : [], currentValue : '', previousValue : '' }, null, location_container ); location_suggests.onclick = suggest_input_events_click; location_suggests.onmouseover = suggest_input_events_mouseover; location_suggests.startLength = 0; location_suggests.suggestsTarget = location_name; location_name.setAttribute('autocomplete', 'off'); location_name.onkeyup = suggest_box_events_keyup; location_name.onkeypress = suggest_box_events_keypress; location_name.onblur = function() { setTimeout('toggle_element(\'location_suggests\', true)', 250); }; location_name.processKeyup = true; location_name.suggestsTarget = location_suggests; } } function set_file_chooser(input, thumb_name) { if (typeof input == 'string') input = document.getElementById(input); input.thumb_name = thumb_name; var file_select = createElement('p', { innerHTML : 'Foto selecteren', className : 'file_select', targetInput : input, targetImage : input.nextSibling, onclick : function() { window.pictures_callback = select_file_callback.bind(this); if (!window.open(script_small_url + '/album/' + user_id, 'Fotoalbum', 'width=820,height=600,resizable=yes,scrollbars=yes')) alert('Om een foto te kunnen selecteren moet je popup vensters op deze internetsite toestaan.'); } }, null, input.parentNode ); var file_delete = createElement('p', { innerHTML : 'Foto verwijderen', className : 'file_delete', onclick : function() { this.value = ''; this.parentNode.className = 'file_hidden'; if (this.onchange) this.onchange.bind(this)(); }.bind(input) }, null, input.parentNode ); if (file_select.targetImage) { file_select.targetImage.targetInput = file_select.targetInput; file_select.targetImage.targetImage = file_select.targetImage; file_select.targetImage.onclick = file_select.onclick; } } function set_profile_file_chooser(input) { input = document.getElementById(input); input.onchange = function() { setTimeout(function() { var xml = new xmlhttp(set_file_updated.bind(this), errorHandler); xml.postRequest(script_xml_url, { 'data[action]' : 'update_profile', 'data[user_id]' : user_id, 'data[profile_section]' : 'file', 'data[file_id]' : this.value } ); }.bind(this), 0); }; } function set_toggle_page_style() { var navigation = cssQuery('ul.subnavigation')[0]; if (!navigation) { navigation = createElement('ul', { className : 'navigation subnavigation' }, null, cssQuery('div.subnavigation')[0] ); cssQuery('ol.backlinks')[0].style.width = '780px'; } createElement('li', { innerHTML : 'Zet opmaak uit', className : 'text right toggle_page_style', onclick : toggle_page_style }, null, navigation ); } var map, map_icon, map_xml, map_count = 0, map_offset = 0; var map_count_container, map_percentage_container; function set_map() { if (GBrowserIsCompatible()) { var div = document.getElementById('map_output'); var p = document.getElementById('map_overlay'); set_opacity(div, 50); document.body.onunload = GUnload; map = new GMap2(div); map.addMapType(G_SATELLITE_3D_MAP); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.enableScrollWheelZoom(); map.setCenter(new GLatLng(52.372797, 4.893749), 7); map_icon = new GIcon(); map_icon.image = template_url + 'images/icons/png/mm_20_blue.png?v=1283679635'; map_icon.shadow = template_url + 'images/icons/png/mm_20_shadow.png?v=1283679635'; map_icon.iconSize = new GSize(12, 20); map_icon.shadowSize = new GSize(22, 20); map_icon.iconAnchor = new GPoint(6, 20); map_icon.infoWindowAnchor = new GPoint(5, 1); map_count_container = document.getElementById('map_count'); map_percentage_container = document.getElementById('map_percentage'); map_xml = new xmlhttp(process_map, errorHandler); map_xml.getRequest(script_xml_url + '/view_map/' + map_offset); if (div.addEventListener) div.addEventListener('DOMMouseScroll', cancelEvent, false); else div.onmousewheel = cancelEvent; } } function set_images_resize() { var img = cssQuery('div.ubb img'); for (var i = 0, l = img.length; i < l; i++) { if (img[i].naturalWidth || img[i].complete) scaleImage(0, img[i]); else if (typeof img[i].onreadystatechange != 'undefined') img[i].onreadystatechange = scaleImage; else img[i].onload = scaleImage; img[i].onerror = scaleImage; img[i].onabort = scaleImage; } if (navigator.userAgent.toLowerCase().indexOf('msie') >= 0) window.onload = set_images_resize_ie; } function set_images_resize_ie() { var img = cssQuery('div.ubb img'); for (var i = 0, l = img.length; i < l; i++) scaleImage(0, img[i]); } function set_pictures() { var pictures = cssQuery('li.gallery_file, li.gallery_subgallery, li.profile_profile'); for (var i=0,j=pictures.length; i<j; i++) { pictures[i].onclick = function() { this.set_location = function() { if (this.cancel) { this.cancel = false; return true; } window.location.href = href; return false; }; if (this.className.indexOf('profile_profile') == 0) var href = 'http://' + (this.getElementsByTagName('a')[0].href.substr(7).split('/').map(decodeURIComponent)).map(encodeURIComponent).join('/'); else var href = this.getElementsByTagName('a')[0].href; try { if (this.className.indexOf('gallery_subgallery') > -1 || !window.opener || !window.opener.pictures_callback) { return this.set_location(); } else { window.opener.pictures_callback(this.id, this.getElementsByTagName('img')[0].src.replace('/small', '')); window.close(); } } catch(e) { return this.set_location(); } return false; }; pictures[i].onmouseover = function() { if (this.className.indexOf(' hover') == -1) this.className += ' hover'; }; pictures[i].onmouseout = function() { this.className = this.className.replace(' hover', ''); }; var anchors = pictures[i].getElementsByTagName('a'); for (var k=0,l=anchors.length; k<l; k++) { anchors[k].picture = pictures[i]; anchors[k].onclick = function() { if (this.picture.cancel) return false; this.picture.cancel = true; }; } } } function set_pictures_sorter() { var pictures = cssQuery('li.gallery_file'); for (var i=0, l=pictures.length; i<l; i++) { var s = new sorter(new mover(pictures[i].parentNode, pictures[i])); s.onchange = pictures_sorter_onchange; } } function bind() { var element; set_external_onclick(); set_forms_onsubmit(); set_pictures(); set_images_resize(); set_message_ajax(true); if (custom_page_style) set_toggle_page_style(); } if (!window.XMLHttpRequest) { window.XMLHttpRequest = function() { var types = [ 'Microsoft.XMLHTTP', 'MSXML2.XMLHTTP.6.0', 'MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP' ]; for (var i = 0; i < types.length; i++) { try { return new ActiveXObject(types[i]); } catch(e) {} } return undefined; } } function xmlhttp(executeFunction, errorFunction) { if (typeof window.XMLHttpRequest != 'undefined') { this.executeFunction = executeFunction; this.errorFunction = errorFunction; this.http = new XMLHttpRequest(); } else if (errorFunction) return errorFunction(); } xmlhttp.prototype.getRequest = function(url, parameters) { try { var i = 0, parameters_content = []; for (var name in parameters) parameters_content[i++] = encodeURIComponent(name) + '=' + encodeURIComponent(parameters[name]); parameters_content = parameters_content.join('&'); this.http.open('GET', url + (parameters_content ? '?' + parameters_content : ''), true); this.http.onreadystatechange = this.processRequest.bind(this); this.http.setRequestHeader('X-Referer', window.location.href); this.http.send(null); return true; } catch(e) { this.processError('GET XMLHttpRequest failed. ' + (e.description ? e.description : e)); return false; } }; xmlhttp.prototype.postRequest = function(url, parameters) { try { var i = 0, parameters_content = []; for (var name in parameters) parameters_content[i++] = encodeURIComponent(name) + '=' + encodeURIComponent(parameters[name]); parameters_content = parameters_content.join('&'); this.http.open('POST', url, true); this.http.onreadystatechange = this.processRequest.bind(this); this.http.setRequestHeader('X-Referer', window.location.href); this.http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); this.http.setRequestHeader('Content-Length', parameters_content.length); this.http.send(parameters_content); return true; } catch(e) { this.processError('POST XMLHttpRequest failed. ' + (e.description ? e.description : e)); return false; } }; xmlhttp.prototype.cancelRequest = function() { this.http.onreadystatechange = null; this.http.abort(); }; xmlhttp.prototype.processRequest = function() { try { if (this.http.readyState == 4) { if (this.http.status == 200) { if (this.http.getResponseHeader('Content-Type').indexOf('text/xml') == 0) { if (this.http.responseXML) { if (this.http.responseXML.getElementsByTagName('error').length) { this.processError('Error: ' + this.http.responseXML.getElementsByTagName('error')[0].firstChild.nodeValue); } else if (this.http.responseXML.documentElement.tagName == 'parsererror') { this.processError('Parse Error: ' + this.http.responseXML.documentElement.firstChild.nodeValue); } else if (this.executeFunction) { this.executeFunction(this.http.responseXML); } } else { this.processError('Invalid XML response.'); } } else if (this.http.getResponseHeader('Content-Type').indexOf('text/html') == 0) { if (this.http.responseText) { if (this.executeFunction) { this.executeFunction(this.http.responseText); } } else { this.processError('Invalid HTML response.'); } } else { this.processError('Invalid Content-Type'); } this.http.abort(); } else { this.processError('Invalid XML status (' + this.http.status + '):\n' + this.http.statusText); } } } catch(e) { this.processError('Caught Exception: ' + (e.description ? e.description : e)); } }; xmlhttp.prototype.processError = function(error) { if (this.errorFunction) this.errorFunction(error); }; eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 x=6(){7 1D="2.0.2";7 C=/\\s*,\\s*/;7 x=6(s,A){33{7 m=[];7 u=1z.32.2c&&!A;7 b=(A)?(A.31==22)?A:[A]:[1g];7 1E=18(s).1l(C),i;9(i=0;i<1E.y;i++){s=1y(1E[i]);8(U&&s.Z(0,3).2b("")==" *#"){s=s.Z(2);A=24([],b,s[1])}1A A=b;7 j=0,t,f,a,c="";H(j<s.y){t=s[j++];f=s[j++];c+=t+f;a="";8(s[j]=="("){H(s[j++]!=")")a+=s[j];a=a.Z(0,-1);c+="("+a+")"}A=(u&&V[c])?V[c]:21(A,t,f,a);8(u)V[c]=A}m=m.30(A)}2a x.2d;5 m}2Z(e){x.2d=e;5[]}};x.1Z=6(){5"6 x() {\\n [1D "+1D+"]\\n}"};7 V={};x.2c=L;x.2Y=6(s){8(s){s=1y(s).2b("");2a V[s]}1A V={}};7 29={};7 19=L;x.15=6(n,s){8(19)1i("s="+1U(s));29[n]=12 s()};x.2X=6(c){5 c?1i(c):o};7 D={};7 h={};7 q={P:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};7 T=[];D[" "]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=X(f[i],t,n);9(j=0;(e=s[j]);j++){8(M(e)&&14(e,n))r.z(e)}}};D["#"]=6(r,f,i){7 e,j;9(j=0;(e=f[j]);j++)8(e.B==i)r.z(e)};D["."]=6(r,f,c){c=12 1t("(^|\\\\s)"+c+"(\\\\s|$)");7 e,i;9(i=0;(e=f[i]);i++)8(c.l(e.1V))r.z(e)};D[":"]=6(r,f,p,a){7 t=h[p],e,i;8(t)9(i=0;(e=f[i]);i++)8(t(e,a))r.z(e)};h["2W"]=6(e){7 d=Q(e);8(d.1C)9(7 i=0;i<d.1C.y;i++){8(d.1C[i]==e)5 K}};h["2V"]=6(e){};7 M=6(e){5(e&&e.1c==1&&e.1f!="!")?e:23};7 16=6(e){H(e&&(e=e.2U)&&!M(e))28;5 e};7 G=6(e){H(e&&(e=e.2T)&&!M(e))28;5 e};7 1r=6(e){5 M(e.27)||G(e.27)};7 1P=6(e){5 M(e.26)||16(e.26)};7 1o=6(e){7 c=[];e=1r(e);H(e){c.z(e);e=G(e)}5 c};7 U=K;7 1h=6(e){7 d=Q(e);5(2S d.25=="2R")?/\\.1J$/i.l(d.2Q):2P(d.25=="2O 2N")};7 Q=6(e){5 e.2M||e.1g};7 X=6(e,t){5(t=="*"&&e.1B)?e.1B:e.X(t)};7 17=6(e,t,n){8(t=="*")5 M(e);8(!14(e,n))5 L;8(!1h(e))t=t.2L();5 e.1f==t};7 14=6(e,n){5!n||(n=="*")||(e.2K==n)};7 1e=6(e){5 e.1G};6 24(r,f,B){7 m,i,j;9(i=0;i<f.y;i++){8(m=f[i].1B.2J(B)){8(m.B==B)r.z(m);1A 8(m.y!=23){9(j=0;j<m.y;j++){8(m[j].B==B)r.z(m[j])}}}}5 r};8(![].z)22.2I.z=6(){9(7 i=0;i<1z.y;i++){o[o.y]=1z[i]}5 o.y};7 N=/\\|/;6 21(A,t,f,a){8(N.l(f)){f=f.1l(N);a=f[0];f=f[1]}7 r=[];8(D[t]){D[t](r,A,f,a)}5 r};7 S=/^[^\\s>+~]/;7 20=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;6 1y(s){8(S.l(s))s=" "+s;5 s.P(20)||[]};7 W=/\\s*([\\s>+~(),]|^|$)\\s*/g;7 I=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;7 18=6(s){5 s.O(W,"$1").O(I,"$1*$2")};7 1u={1Z:6(){5"\'"},P:/^(\'[^\']*\')|("[^"]*")$/,l:6(s){5 o.P.l(s)},1S:6(s){5 o.l(s)?s:o+s+o},1Y:6(s){5 o.l(s)?s.Z(1,-1):s}};7 1s=6(t){5 1u.1Y(t)};7 E=/([\\/()[\\]?{}|*+-])/g;6 R(s){5 s.O(E,"\\\\$1")};x.15("1j-2H",6(){D[">"]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=1o(f[i]);9(j=0;(e=s[j]);j++)8(17(e,t,n))r.z(e)}};D["+"]=6(r,f,t,n){9(7 i=0;i<f.y;i++){7 e=G(f[i]);8(e&&17(e,t,n))r.z(e)}};D["@"]=6(r,f,a){7 t=T[a].l;7 e,i;9(i=0;(e=f[i]);i++)8(t(e))r.z(e)};h["2G-10"]=6(e){5!16(e)};h["1x"]=6(e,c){c=12 1t("^"+c,"i");H(e&&!e.13("1x"))e=e.1n;5 e&&c.l(e.13("1x"))};q.1X=/\\\\:/g;q.1w="@";q.J={};q.O=6(m,a,n,c,v){7 k=o.1w+m;8(!T[k]){a=o.1W(a,c||"",v||"");T[k]=a;T.z(a)}5 T[k].B};q.1Q=6(s){s=s.O(o.1X,"|");7 m;H(m=s.P(o.P)){7 r=o.O(m[0],m[1],m[2],m[3],m[4]);s=s.O(o.P,r)}5 s};q.1W=6(p,t,v){7 a={};a.B=o.1w+T.y;a.2F=p;t=o.J[t];t=t?t(o.13(p),1s(v)):L;a.l=12 2E("e","5 "+t);5 a};q.13=6(n){1d(n.2D()){F"B":5"e.B";F"2C":5"e.1V";F"9":5"e.2B";F"1T":8(U){5"1U((e.2A.P(/1T=\\\\1v?([^\\\\s\\\\1v]*)\\\\1v?/)||[])[1]||\'\')"}}5"e.13(\'"+n.O(N,":")+"\')"};q.J[""]=6(a){5 a};q.J["="]=6(a,v){5 a+"=="+1u.1S(v)};q.J["~="]=6(a,v){5"/(^| )"+R(v)+"( |$)/.l("+a+")"};q.J["|="]=6(a,v){5"/^"+R(v)+"(-|$)/.l("+a+")"};7 1R=18;18=6(s){5 1R(q.1Q(s))}});x.15("1j-2z",6(){D["~"]=6(r,f,t,n){7 e,i;9(i=0;(e=f[i]);i++){H(e=G(e)){8(17(e,t,n))r.z(e)}}};h["2y"]=6(e,t){t=12 1t(R(1s(t)));5 t.l(1e(e))};h["2x"]=6(e){5 e==Q(e).1H};h["2w"]=6(e){7 n,i;9(i=0;(n=e.1F[i]);i++){8(M(n)||n.1c==3)5 L}5 K};h["1N-10"]=6(e){5!G(e)};h["2v-10"]=6(e){e=e.1n;5 1r(e)==1P(e)};h["2u"]=6(e,s){7 n=x(s,Q(e));9(7 i=0;i<n.y;i++){8(n[i]==e)5 L}5 K};h["1O-10"]=6(e,a){5 1p(e,a,16)};h["1O-1N-10"]=6(e,a){5 1p(e,a,G)};h["2t"]=6(e){5 e.B==2s.2r.Z(1)};h["1M"]=6(e){5 e.1M};h["2q"]=6(e){5 e.1q===L};h["1q"]=6(e){5 e.1q};h["1L"]=6(e){5 e.1L};q.J["^="]=6(a,v){5"/^"+R(v)+"/.l("+a+")"};q.J["$="]=6(a,v){5"/"+R(v)+"$/.l("+a+")"};q.J["*="]=6(a,v){5"/"+R(v)+"/.l("+a+")"};6 1p(e,a,t){1d(a){F"n":5 K;F"2p":a="2n";1a;F"2o":a="2n+1"}7 1m=1o(e.1n);6 1k(i){7 i=(t==G)?1m.y-i:i-1;5 1m[i]==e};8(!Y(a))5 1k(a);a=a.1l("n");7 m=1K(a[0]);7 s=1K(a[1]);8((Y(m)||m==1)&&s==0)5 K;8(m==0&&!Y(s))5 1k(s);8(Y(s))s=0;7 c=1;H(e=t(e))c++;8(Y(m)||m==1)5(t==G)?(c<=s):(s>=c);5(c%m)==s}});x.15("1j-2m",6(){U=1i("L;/*@2l@8(@\\2k)U=K@2j@*/");8(!U){X=6(e,t,n){5 n?e.2i("*",t):e.X(t)};14=6(e,n){5!n||(n=="*")||(e.2h==n)};1h=1g.1I?6(e){5/1J/i.l(Q(e).1I)}:6(e){5 Q(e).1H.1f!="2g"};1e=6(e){5 e.2f||e.1G||1b(e)};6 1b(e){7 t="",n,i;9(i=0;(n=e.1F[i]);i++){1d(n.1c){F 11:F 1:t+=1b(n);1a;F 3:t+=n.2e;1a}}5 t}}});19=K;5 x}();',62,190,'|||||return|function|var|if|for||||||||pseudoClasses||||test|||this||AttributeSelector|||||||cssQuery|length|push|fr|id||selectors||case|nextElementSibling|while||tests|true|false|thisElement||replace|match|getDocument|regEscape||attributeSelectors|isMSIE|cache||getElementsByTagName|isNaN|slice|child||new|getAttribute|compareNamespace|addModule|previousElementSibling|compareTagName|parseSelector|loaded|break|_0|nodeType|switch|getTextContent|tagName|document|isXML|eval|css|_1|split|ch|parentNode|childElements|nthChild|disabled|firstElementChild|getText|RegExp|Quote|x22|PREFIX|lang|_2|arguments|else|all|links|version|se|childNodes|innerText|documentElement|contentType|xml|parseInt|indeterminate|checked|last|nth|lastElementChild|parse|_3|add|href|String|className|create|NS_IE|remove|toString|ST|select|Array|null|_4|mimeType|lastChild|firstChild|continue|modules|delete|join|caching|error|nodeValue|textContent|HTML|prefix|getElementsByTagNameNS|end|x5fwin32|cc_on|standard||odd|even|enabled|hash|location|target|not|only|empty|root|contains|level3|outerHTML|htmlFor|class|toLowerCase|Function|name|first|level2|prototype|item|scopeName|toUpperCase|ownerDocument|Document|XML|Boolean|URL|unknown|typeof|nextSibling|previousSibling|visited|link|valueOf|clearCache|catch|concat|constructor|callee|try'.split('|'),0,{}));