(function() { var widgetWrapper = document.getElementById('springest-search-widget') , regions = [{"id":35,"value":"alkmaar","name":"Alkmaar"},{"id":8,"value":"almere-lelystad","name":"Almere / Lelystad"},{"id":39,"value":"alphen-aan-den-rijn","name":"Alphen aan den Rijn"},{"id":16,"value":"amersfoort","name":"Amersfoort"},{"id":1,"value":"amsterdam","name":"Amsterdam"},{"id":32,"value":"antwerpen","name":"Antwerpen"},{"id":12,"value":"apeldoorn","name":"Apeldoorn"},{"id":14,"value":"arnhem","name":"Arnhem"},{"id":37,"value":"assen","name":"Assen"},{"id":10,"value":"breda","name":"Breda"},{"id":34,"value":"brugge","name":"Brugge"},{"id":31,"value":"brussel","name":"Brussel"},{"id":28,"value":"delft","name":"Delft"},{"id":3,"value":"den-haag","name":"Den Haag"},{"id":27,"value":"deventer","name":"Deventer"},{"id":20,"value":"dordrecht","name":"Dordrecht"},{"id":38,"value":"drachten","name":"Drachten"},{"id":25,"value":"ede","name":"Ede"},{"id":5,"value":"eindhoven","name":"Eindhoven"},{"id":24,"value":"emmen","name":"Emmen"},{"id":11,"value":"enschede","name":"Enschede"},{"id":42,"value":"gent","name":"Gent"},{"id":46,"value":"gouda","name":"Gouda"},{"id":6,"value":"groningen","name":"Groningen"},{"id":13,"value":"haarlem","name":"Haarlem"},{"id":17,"value":"haarlemmermeer","name":"Haarlemmermeer"},{"id":43,"value":"heerenveen","name":"Heerenveen"},{"id":40,"value":"hilversum","name":"Hilversum"},{"id":29,"value":"leeuwarden","name":"Leeuwarden"},{"id":23,"value":"leiden","name":"Leiden"},{"id":33,"value":"luik","name":"Luik"},{"id":21,"value":"maastricht","name":"Maastricht"},{"id":30,"value":"middelburg","name":"Middelburg"},{"id":9,"value":"nijmegen","name":"Nijmegen"},{"id":41,"value":"n-v-t-onbekend","name":"N.V.T. / Onbekend"},{"id":44,"value":"roermond","name":"Roermond"},{"id":2,"value":"rotterdam","name":"Rotterdam"},{"id":18,"value":"s-hertogenbosch","name":"'s-Hertogenbosch"},{"id":47,"value":"terneuzen","name":"Terneuzen"},{"id":7,"value":"tilburg","name":"Tilburg"},{"id":4,"value":"utrecht","name":"Utrecht"},{"id":45,"value":"veenendaal","name":"Veenendaal"},{"id":36,"value":"venlo","name":"Venlo"},{"id":26,"value":"westland","name":"Westland"},{"id":15,"value":"zaanstad","name":"Zaanstad"},{"id":19,"value":"zoetermeer","name":"Zoetermeer"},{"id":22,"value":"zwolle","name":"Zwolle"}] , priceRanges = [{"slug":"gratis","label":"Gratis"},{"slug":"0-500","label":"€ 0 t/m € 500"},{"slug":"500-1000","label":"€ 500 t/m € 1.000"},{"slug":"1000-2000","label":"€ 1.000 t/m € 2.000"},{"slug":"2000-4000","label":"€ 2.000 t/m € 4.000"},{"slug":"4000-meer","label":"€ 4.000 en hoger"}] , important = important = /*@cc_on @_jscript_version <= 5.8 ? true : false || @*/ false , ie6 = /*@cc_on @_jscript_version <= 5.6 ? true : false || @*/ false , baseUrl = "//www.springest.nl" , tenderUrl = "//www.springest.nl/in-company" , searchUrl = "//www.springest.nl/zoeken" , trackingParams = ""; if (!widgetWrapper) return; if (widgetWrapper.innerHTML.indexOf(baseUrl) === -1) { if (typeof console != 'undefined' && typeof console.error != 'undefined') { console.error('Please use the exact embed code as found on ' + baseUrl); } return; } var widgetTitle = widgetWrapper.innerHTML , widgetTitleChunks = widgetTitle.split('.') , widgetRealTitle = widgetTitleChunks[0] , widgetLink = widgetWrapper.getElementsByTagName('a')[0].getAttribute('href') , isSubjectSearch = false , isIncompanySearch = false , elements = createHtml(widgetWrapper); function css(styles) { return important ? styles.replace(/\!important/g, '') : styles; } function setCss() { if (arguments.length == 3) { var obj = {}; obj[arguments[1]] = arguments[2]; } else { var obj = arguments[1]; } var elm = arguments[0], val; for (var prop in obj) if (obj.hasOwnProperty(prop)) { val = obj[prop]; if (prop == 'float') { elm.style['cssFloat'] = val; elm.style['styleFloat'] = val; prop = 'cssFloat'; if (!important && typeof elm.style.setProperty != 'undefined') { elm.style.setProperty('float', val, 'important'); } } if (important && prop.indexOf('-') != -1) { prop = prop.replace(/(\-[a-z])/g, function(match) { return match.substring(1).toUpperCase(); }) } elm.style[prop] = val; if (!important && typeof elm.style.setProperty != 'undefined') { elm.style.setProperty(prop, val, 'important'); } } }; function createHtml(widgetWrapper) { var wrapperElm = document.createElement('div'); wrapperElm.id = 'springest-search-widget-wrapper'; wrapperElm.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:15px !important; margin-left:15px !important; margin-right:15px !important; margin-top:15px !important; overflow:hidden !important; padding-bottom:23px !important; padding-left:23px !important; padding-right:23px !important; padding-top:23px !important; position:relative !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; background-color:#F1F3F5 !important; border-radius:4px !important; margin:15px !important; padding:23px !important; "); widgetWrapper.parentNode.insertBefore(wrapperElm, widgetWrapper); widgetWrapper.parentNode.removeChild(widgetWrapper); var titleElm = document.createElement('strong'); titleElm.innerHTML = widgetRealTitle; titleElm.style.cssText = css("bottom:0 !important; clear:none !important; color:#000000 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; font-size:14px !important; font-weight:bold !important; "); wrapperElm.appendChild(titleElm); var form = document.createElement('form'); form.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:100% !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; "); form.onsubmit = formatForSubmit; wrapperElm.appendChild(form); if (!isSubjectSearch) { var pQuery = document.createElement('p'); pQuery.style.cssText = css("bottom:0 !important; clear:none !important; color:#999 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0.916em !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; font-size:12px !important; padding:0.916em 0 0 !important; "); form.appendChild(pQuery); var searchBoxWidth = isIncompanySearch ? (pQuery.offsetWidth - 150) : (pQuery.offsetWidth - 12); if (searchBoxWidth < 0) { searchBoxWidth = pQuery.offsetWidth - 12; } if (isIncompanySearch) { var queryLabel = document.createElement('label'); queryLabel.setAttribute('for','springest-search-widget-query'); queryLabel.innerHTML = "Onderwerp:"; queryLabel.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:inline-block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; "); setCss(queryLabel, 'width', '138px'); pQuery.appendChild(queryLabel); } var queryInput = document.createElement('input'); queryInput.id = 'springest-search-widget-query'; if (isIncompanySearch) { queryInput.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:inline-block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:4px !important; padding-left:5px !important; padding-right:5px !important; padding-top:4px !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; -webkit-transition:border-color 0.3s linear !important; -moz-transition:border-color 0.3s linear !important; -ms-transition:border-color 0.3s linear !important; -o-transition:border-color 0.3s linear !important; background-color:#FFF !important; border-bottom:1px solid #C1C1C1 !important; border-left:1px solid #858585 !important; border-right:1px solid #C1C1C1 !important; border-top:1px solid #858585 !important; box-shadow:inset 1px 1px 1px #CCC !important; font-size:15px !important; outline:none !important; padding:4px 5px !important; transition:border-color 0.3s linear !important; margin-left:12px !important; "); } else { queryInput.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:5px !important; padding-left:5px !important; padding-right:5px !important; padding-top:5px !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; -webkit-transition:border-color 0.3s linear !important; -moz-transition:border-color 0.3s linear !important; -ms-transition:border-color 0.3s linear !important; -o-transition:border-color 0.3s linear !important; background-color:#FFF !important; background-image:url(//www.springest.nl/images/sprite-icon.png) !important; background-repeat:no-repeat !important; background-position:98% -48px !important; border-bottom:1px solid #C1C1C1 !important; border-left:1px solid #858585 !important; border-right:1px solid #C1C1C1 !important; border-top:1px solid #858585 !important; box-shadow:inset 1px 1px 1px #CCC !important; font-size:15px !important; outline:none !important; padding:5px !important; transition:border-color 0.3s linear !important; "); } setCss(queryInput, 'width', searchBoxWidth + 'px'); queryInput.onfocus = function(){ setCss(queryInput, 'border-color', '#059EE7'); }; queryInput.onblur = function(){ setCss(queryInput, { 'border-bottom-color': '#C1C1C1', 'border-left-color': '#858585', 'border-right-color':'#C1C1C1', 'border-top-color': '#858585' }); }; pQuery.appendChild(queryInput); } var pDropdown = document.createElement('p'); pDropdown.id = 'springest-search-widget-dropdown'; pDropdown.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0.916em !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; font-size:12px !important; padding:0.916em 0 0 !important; "); form.appendChild(pDropdown); var regionSelect = document.createElement('select'); regionSelect.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:inline !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:3px !important; padding-right:3px !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:48% !important; word-spacing:normal !important; z-index:auto !important; margin-right:4% !important; padding:0 3px !important; box-sizing:border-box !important; "); regionSelect.id = 'springest-search-widget-region'; var blancOption = document.createElement('option'); blancOption.value = '-'; blancOption.appendChild(document.createTextNode('Regio')); regionSelect.appendChild(blancOption); for (var region in regions) if (regions.hasOwnProperty(region)) { var option = document.createElement('option'); option.value = isIncompanySearch ? regions[region].id : regions[region].value; option.appendChild(document.createTextNode(regions[region].name)); regionSelect.appendChild(option); } pDropdown.appendChild(regionSelect); if (! isIncompanySearch) { var priceSelect = document.createElement('select'); priceSelect.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:inline !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:3px !important; padding-right:3px !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:48% !important; word-spacing:normal !important; z-index:auto !important; padding:0 3px !important; box-sizing:border-box !important; "); priceSelect.id = 'springest-search-widget-price'; var defaultOption = document.createElement('option'); defaultOption.appendChild(document.createTextNode('Budget')); defaultOption.value = '-'; priceSelect.appendChild(defaultOption); for (var priceRange in priceRanges) if (priceRanges.hasOwnProperty(priceRange)) { var option = document.createElement('option'); option.value = priceRanges[priceRange].slug; option.appendChild(document.createTextNode(priceRanges[priceRange].label)); priceSelect.appendChild(option); } pDropdown.appendChild(priceSelect); } if (wrapperElm.offsetWidth < 750 && isIncompanySearch) { var clearfix1 = document.createElement('div'); clearfix1.style.cssText = css("bottom:0 !important; clear:both !important; color:#000 !important; display:table !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; "); clearfix1.textContent = ' '; form.appendChild(clearfix1); } var submit = document.createElement('input'); submit.type = 'submit'; submit.value = 'Zoeken'; submit.style.cssText = css("bottom:0 !important; clear:none !important; color:#333 !important; display:inline !important; float:right !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:6px !important; padding-left:10px !important; padding-right:10px !important; padding-top:4px !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; border-bottom-color:#7F7F7F !important; border-bottom-style:solid !important; border-bottom-width:1px !important; border-left-color:#7F7F7F !important; border-left-style:solid !important; border-left-width:1px !important; border-right-color:#7F7F7F !important; border-right-style:solid !important; border-right-width:1px !important; border-top-color:#7F7F7F !important; border-top-style:solid !important; border-top-width:1px !important; -webkit-transition:background-color 0.3s linear !important; -moz-transition:background-color 0.3s linear !important; -ms-transition:background-color 0.3s linear !important; -o-transition:background-color 0.3s linear !important; text-align:center !important; background-color:#FFFFFF !important; background-image:url(//www.springest.nl/images/button-gradient-simple.png) !important; background-repeat:repeat-x !important; background-size:100% 100% !important; border:1px solid #7F7F7F !important; border-radius:4px !important; cursor:pointer !important; font-size:13px !important; margin-bottom:5px !important; padding:4px 10px 6px !important; transition:background-color 0.3s linear !important; zoom:1 !important; "); submit.onmouseover = submit.onfocus = function(){setCss(this,'background-color','#E5E5E5');} submit.onmouseout = submit.onblur = function(){setCss(this,'background-color','#FFFFFF');} if (isIncompanySearch) { var pParticipants = document.createElement('p'); pParticipants.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0.916em !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; font-size:12px !important; padding:0.916em 0 0 !important; "); form.appendChild(pParticipants); var participantsLabel = document.createElement('label'); participantsLabel.id = 'springest-search-widget-participants-label'; participantsLabel.setAttribute('for', 'springest-search-widget-participants'); participantsLabel.innerHTML = "Aantal deelnemers:" participantsLabel.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:inline-block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; "); setCss(participantsLabel, 'width', '138px'); pParticipants.appendChild(participantsLabel); var participantsInput = document.createElement('input'); participantsInput.id = 'springest-search-widget-participants'; participantsInput.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:inline-block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:4px !important; padding-left:5px !important; padding-right:5px !important; padding-top:4px !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; background-color:#FFF !important; border-bottom:1px solid #C1C1C1 !important; border-left:1px solid #858585 !important; border-right:1px solid #C1C1C1 !important; border-top:1px solid #858585 !important; box-shadow:inset 1px 1px 1px #CCC !important; font-size:15px !important; outline:none !important; padding:4px 5px !important; margin-left:12px !important; "); setCss(participantsInput, 'width', '80px'); participantsInput.onfocus = function(){ setCss(participantsInput, 'border-color', '#059EE7'); }; participantsInput.onblur = function(){ setCss(participantsInput, { 'border-bottom-color': '#C1C1C1', 'border-left-color': '#858585', 'border-right-color':'#C1C1C1', 'border-top-color': '#858585' }); }; pParticipants.appendChild(participantsInput); } var pSubmit = document.createElement('p'); pSubmit.style.cssText = css("bottom:0 !important; clear:none !important; color:#999 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:hidden !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0.916em !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:100% !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; font-size:11px !important; line-height:10px !important; padding:0.916em 0 0 !important; "); form.appendChild(pSubmit); if (isIncompanySearch) { pParticipants.appendChild(submit); } else { pSubmit.appendChild(submit); } var spanSubmit = document.createElement('span'); spanSubmit.style.cssText = css("bottom:0 !important; clear:none !important; color:#000 !important; display:inline !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; line-height:20px !important; white-space:nowrap !important; "); pSubmit.appendChild(spanSubmit); var innerSpan = document.createElement('span'); innerSpan.style.cssText = css("bottom:0 !important; clear:none !important; color:#999 !important; display:inline !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:relative !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:16px !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; "); innerSpan.appendChild(document.createTextNode("In samenwerking met ")); spanSubmit.appendChild(innerSpan); var springestLink = document.createElement('a'); springestLink.href = widgetLink; springestLink.appendChild(document.createTextNode('Springest')); springestLink.style.cssText = css('bottom:0 !important; clear:none !important; color:#999 !important; display:inline-block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:35px !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:65px !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; background-image:url(//www.springest.nl/images/widget/logo-springest-sprite.png) !important; background-position:0 -35px !important; margin-left:5px !important; text-indent:-9999em !important; vertical-align:top !important; zoom:1 !important; '); springestLink.onmouseover = springestLink.onfocus = function(){setCss(this,{color:'#333','background-position':'0 0'});} springestLink.onmouseout = springestLink.onblur = function(){setCss(this,{color:'#999','background-position':'0 -35px'});} spanSubmit.appendChild(springestLink); return { wrapperElm: wrapperElm, headerwidgetWrapper: widgetWrapper, formElm: form, pQueryElm: (pQuery || null), queryLabelElm: (queryLabel || null), queryInputElm: (queryInput || null), pDropdownElm: pDropdown, regionSelectElm: regionSelect, priceSelectElm: (priceSelect || null), pSubmitElm: pSubmit, submitElm: submit, spanSubmitElm: spanSubmit, spanSubmitInnerSpanElm: innerSpan, springestLogo: springestLink, pParticipantsElm: (pParticipants || null), participantsLabelElm: (participantsLabel || null), participantsInputElm: (participantsInput || null) }; } function queryError() { var errorMessage = isIncompanySearch ? "Vul alsjeblieft een onderwerp in." : "Vul alsjeblieft een zoekterm in."; var queryElm = document.getElementById('springest-search-widget-query'); setCss(queryElm, 'border', '1px solid #C00'); if (document.getElementById('springest-search-widget-error-query')) return; var errorElm = document.createElement('p'); errorElm.id = 'springest-search-widget-error-query'; errorElm.style.cssText = css("bottom:0 !important; clear:none !important; color:#111 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; font-style:italic !important; margin-top:5px !important; text-align:center !important; "); errorElm.appendChild(document.createTextNode(errorMessage)); queryElm.parentNode.appendChild(errorElm); queryElm.onchange = queryElm.onkeyup = function(){ setCss(this, 'border', '1px solid #C1C1C1'); } } function participantsError() { var errorMessage = "Vul alsjeblieft 2 of meer in."; var participantsElm = document.getElementById('springest-search-widget-participants'); setCss(participantsElm, 'border', '1px solid #C00'); var participantsLabelElm = document.getElementById('springest-search-widget-participants-label'); if (document.getElementById('springest-search-widget-error-participants')) return; var errorElm = document.createElement('p'); errorElm.id = 'springest-search-widget-error-participants'; errorElm.style.cssText = css("bottom:0 !important; clear:none !important; color:#111 !important; display:block !important; float:none !important; font-family:Arial, Helvetica, sans-serif !important; font-size:1em !important; font-style:normal !important; font-variant:normal !important; font-weight:normal !important; height:auto !important; left:0 !important; letter-spacing:normal !important; line-height:normal !important; list-style-image:none !important; list-style-position:outside !important; list-style-type:disc !important; margin-bottom:0 !important; margin-left:0 !important; margin-right:0 !important; margin-top:0 !important; overflow:visible !important; padding-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; padding-top:0 !important; position:static !important; right:0 !important; text-align:left !important; text-decoration:none !important; text-indent:0 !important; text-transform:none !important; top:0 !important; vertical-align:baseline !important; visibility:visible !important; white-space:normal !important; width:auto !important; word-spacing:normal !important; z-index:auto !important; background-color:transparent !important; background-attachment:scroll !important; background-image:none !important; background-position:0 0 !important; background-repeat:repeat !important; border-bottom-color:transparent !important; border-bottom-style:none !important; border-bottom-width:0 !important; border-left-color:transparent !important; border-left-style:none !important; border-left-width:0 !important; border-right-color:transparent !important; border-right-style:none !important; border-right-width:0 !important; border-top-color:transparent !important; border-top-style:none !important; border-top-width:0 !important; font-style:italic !important; margin-top:5px !important; text-align:center !important; "); errorElm.appendChild(document.createTextNode(errorMessage)); participantsElm.parentNode.appendChild(errorElm); if (elements.wrapperElm.offsetWidth > 400) { setCss(errorElm, {'text-align': 'left', 'padding-left': (participantsLabelElm.offsetWidth + 12) + 'px'}); } if (elements.wrapperElm.offsetWidth - (participantsLabelElm.offsetWidth + participantsElm.offsetWidth + 12) > 300) { setCss(errorElm, {'text-align': 'left', padding: 0, left: (23 + participantsLabelElm.offsetWidth + participantsElm.offsetWidth + 24) + 'px', position: 'absolute', 'margin-top': '-21px', right: 'auto', top: 'auto', bottom: 'auto'}); } participantsElm.onchange = participantsElm.onkeyup = function(){ setCss(this, 'border', '1px solid #C1C1C1'); } } function springestResize() { var queryWidth, dropdownWidth , oWidth = elements.wrapperElm.offsetWidth , oHeight = elements.wrapperElm.offsetHeight; if (oWidth == 0) return; if (elements.pQueryElm) { if (oWidth > 750) { queryWidth = oWidth - ((elements.priceSelectElm ? 375 : 425) + elements.pSubmitElm.offsetWidth) dropdownWidth = elements.priceSelectElm ? '300px' : '150px'; setCss(elements.formElm, { 'padding-top': '5px' }); setCss(elements.pQueryElm, { 'float': 'left', 'margin-right': '5px', 'padding-top': '0px', width: queryWidth + 'px' }); setCss(elements.pDropdownElm, { display: 'inline', 'float': 'left', 'line-height': '30px', 'margin-left': '5px', 'padding-top': '0px', width: '300px' }); setCss(elements.pSubmitElm, { 'float': 'left', 'padding-top': '0px', width: 'auto' }); setCss(elements.submitElm, { 'float': 'left', 'margin-left': '10px', 'margin-right': '10px' }); } else if (oWidth > 400) { queryWidth = elements.priceSelectElm ? '49%' : '74%'; dropdownWidth = elements.priceSelectElm ? '49%' : '24%'; setCss(elements.formElm, { 'padding-top': '0px' }); setCss(elements.pQueryElm, { 'float': 'left', 'margin-right': '1%', 'padding-top': '0.916em', width: queryWidth }); setCss(elements.pDropdownElm, { 'float': 'left', 'line-height': '30px', 'margin-left': '1%', 'padding-top': '0.916em', width: dropdownWidth }); setCss(elements.pSubmitElm, { 'float': 'none', 'padding-bottom': '0px', 'padding-top': '0.916em', width: '100%', height: '35px', clear: 'both' }); setCss(elements.submitElm, { 'float': 'right', 'margin-left': '0px', 'margin-right': '0px' }); if (isIncompanySearch && oHeight < 150 && oWidth >= 728) { setCss(elements.pSubmitElm, { left: '-20px', right: 'auto', bottom: 'auto', position: 'absolute', top: '0px', 'text-align': 'right', overflow: 'visible' }); } setCss(elements.spanSubmitElm, { bottom: 'auto', left: 'auto', position: 'static', top: '0px' }); } else { setCss(elements.formElm, { 'padding-top': '0px' }); setCss(elements.pQueryElm, { 'float': 'none', 'margin-right': '0', 'padding-top': '0.916em', width: '100%' }); setCss(elements.pDropdownElm, { 'float': 'none', 'line-height': '1em', 'margin-left': '0', 'padding-top': '0.916em', width: '100%' }); setCss(elements.pSubmitElm, { 'float': 'none', 'padding-bottom': '0px', 'padding-top': '0.916em', width: '100%', overflow: 'visible' }); setCss(elements.submitElm, { 'float': 'right', 'margin-left': '0px', 'margin-right': '0px' }); setCss(elements.spanSubmitElm, { bottom: 'auto', left: 'auto', position: 'static', top: '0px' }); } var queryInputWidth = isIncompanySearch ? (elements.pQueryElm.offsetWidth - (elements.queryLabelElm.offsetWidth + 28)) : (elements.pQueryElm.offsetWidth - 12); if (queryInputWidth < 0) { queryInputWidth = elements.pQueryElm.offsetWidth; } if (isIncompanySearch) { if (oWidth < 400) { var participantsInputWidth = elements.pParticipantsElm.offsetWidth - (elements.participantsLabelElm.offsetWidth + 24); var queryInputWidth = elements.pQueryElm.offsetWidth - 12; if (queryInputWidth < 0) queryInputWidth = 0; if (participantsInputWidth < 0) participantsInputWidth = 0; setCss(elements.queryInputElm, { 'margin-left': '0', 'margin-top': '5px', 'width': queryInputWidth + 'px' }); if (participantsInputWidth > 40) { setCss(elements.participantsInputElm, { 'width': participantsInputWidth + 'px' }); } else { setCss(elements.participantsInputElm, { 'margin-top': '5px', 'margin-left': '0', 'width': (elements.pParticipantsElm.offsetWidth > 0 ? elements.pParticipantsElm.offsetWidth - 12 : elements.pParticipantsElm.offsetWidth) + 'px' }); } if (elements.submitElm.parentNode === elements.pParticipantsElm) { elements.pParticipantsElm.removeChild(elements.submitElm); elements.pSubmitElm.insertBefore(elements.submitElm, elements.spanSubmitElm); } } else { setCss(elements.queryInputElm, { 'margin-left': '12px', 'margin-top': '0', 'width': queryInputWidth + 'px' }); setCss(elements.participantsInputElm, { 'margin-left': '12px', 'margin-top': '0', 'width': '80px' }); if (elements.submitElm.parentNode === elements.pSubmitElm) { elements.pSubmitElm.removeChild(elements.submitElm); elements.pParticipantsElm.insertBefore(elements.submitElm, elements.participantsLabelElm); } } if (oWidth <= 300 && oHeight < 300) { setCss(elements.queryLabelElm, 'display', 'none'); elements.queryInputElm.placeholder = elements.queryLabelElm.textContent.replace(':', ''); if (oHeight < 250) { setCss(elements.pParticipantsElm, 'display', 'none'); } else { setCss(elements.pParticipantsElm, 'display', 'block'); } } else { setCss(elements.queryLabelElm, 'display', 'inline-block'); elements.queryInputElm.placeholder = ''; setCss(elements.pParticipantsElm, 'display', 'block'); } } else { setCss(elements.queryInputElm, 'width', queryInputWidth + 'px'); } } /* No query input */ else { if (oWidth > 525) { setCss(elements.formElm, { 'padding-top': '5px' }); setCss(elements.pDropdownElm, { 'float': 'left', 'line-height': '30px', 'margin-left': '5px', 'padding-top': '0px', width: oWidth - 325 + 'px' }); setCss(elements.pSubmitElm, { 'padding-top': '0px', width: 'auto' }); setCss(elements.submitElm, { 'float': 'left', 'margin-left': '10px', 'margin-right': '10px' }); } else { setCss(elements.formElm, { 'padding-top': '0px' }); setCss(elements.pDropdownElm, { 'float': 'none', 'line-height': '1em', 'margin-left': '0', 'padding-top': '0.916em', width: '100%' }); setCss(elements.pSubmitElm, { 'padding-top': '0.916em', width: '100%', overflow: 'visible' }); setCss(elements.submitElm, { 'float': 'right', 'margin-left': '0px', 'margin-right': '0px' }); } } setCss(elements.spanSubmitElm, {'margin-top': '0'}); if (oWidth < 200 || (isIncompanySearch && oWidth < 250)) { var spanWidth = isIncompanySearch ? (elements.pSubmitElm.offsetWidth - (elements.submitElm.offsetWidth + 10)) + 'px' : '100%' , spanFloat = isIncompanySearch ? 'left' : 'none' , spanClear = isIncompanySearch ? 'none' : 'both'; if (parseInt(spanWidth) < 0) spanWidth = '100%'; setCss(elements.spanSubmitElm, {clear: spanClear, display: 'block', 'float': spanFloat, width: spanWidth}); setCss(elements.spanSubmitInnerSpanElm, {top: '0px'}); setCss(elements.springestLogo, {'float': 'none', top: '0px', display: 'block'}); } else { if (isIncompanySearch && oWidth > 250 && oWidth <= 300) setCss(elements.spanSubmitElm, {'margin-top': '40px'}); if (oWidth < 270 && (! isIncompanySearch && oHeight < 250)) { setCss(elements.spanSubmitElm, {'margin-bottom': '10px', 'white-space': 'normal'}); setCss(elements.spanSubmitInnerSpanElm, 'white-space', 'normal'); setCss(elements.spanSubmitInnerSpanElm, 'top', '17px'); setCss(elements.springestLogo, { 'float': 'none', 'margin-top': '15px', position: 'relative' }); } else { setCss(elements.spanSubmitElm, {'margin-bottom': '10px', 'white-space': 'nowrap'}); setCss(elements.spanSubmitInnerSpanElm, 'white-space', 'nowrap'); setCss(elements.springestLogo, {'float': 'none', 'margin-top': '0px'}); } } if (oWidth < 250 && oHeight < 250) { if (isIncompanySearch) { setCss(elements.spanSubmitElm, 'display', 'none'); } else if (oWidth <= 200 && oHeight <= 200) { setCss(elements.spanSubmitInnerSpanElm, 'display', 'none'); } } if (oWidth < 200) { setCss(elements.regionSelectElm, { 'margin': '0 0 1em 0', width: '100%' }); if (elements.priceSelectElm) setCss(elements.priceSelectElm, 'width', '100%'); } else { var regionSelectWidth = isIncompanySearch ? '100%' : '48%' , regionSelectMargin = isIncompanySearch ? '0' : '0 4% 0 0'; setCss(elements.regionSelectElm, {'margin': regionSelectMargin, width: regionSelectWidth}); if (elements.priceSelectElm) setCss(elements.priceSelectElm, 'width', '48%'); } } if (window.addEventListener) { window.addEventListener('resize', springestResize, false); } else if (window.attachEvent) { window.attachEvent('onresize', springestResize); } setTimeout(springestResize, 50); setTimeout(springestResize, 250); function formatForSubmit(e) { if (e && e.preventDefault) { e.preventDefault(); } else if (window.event && window.event.returnValue) { window.eventReturnValue = false; } var query = document.getElementById('springest-search-widget-query'), region = document.getElementById('springest-search-widget-region'), price = document.getElementById('springest-search-widget-price'), participants = document.getElementById('springest-search-widget-participants'), queryValue = '', regionValue = '', priceValue = '', participantsValue = ''; if (query && query.value.length === 0) { queryError(); return false; } if (participants && participants.value !== '' && parseInt(participants.value) < 2) { participantsError(); return false; } if (query) { queryValue = (isIncompanySearch ? '&incompany_tender[title]=' : '/') + encodeURIComponent(query.value); } if (region && region.value != '-') { regionValue = (isIncompanySearch ? '&incompany_tender[region_id]=' : '/') + region.value; } if (price && price.value != '-') { priceValue = '/' + price.value; } if (isIncompanySearch && participants) { participantsValue = "&incompany_tender[participant_count]=" + participants.value; } var urlToGoTo , suffix = "" , affiliate = false; if (isSubjectSearch) { urlToGoTo = '//www.springest.nl/' + isSubjectSearch + regionValue + priceValue + suffix; } else if (isIncompanySearch) { urlToGoTo = tenderUrl + "?widget=true" + queryValue + regionValue + participantsValue; } else { urlToGoTo = searchUrl + queryValue + regionValue + priceValue + suffix; } if (trackingParams.length > 0) { if (urlToGoTo.indexOf('?') !== -1) { urlToGoTo += '&'; } else { urlToGoTo += '?'; } urlToGoTo += trackingParams; } if (affiliate) { urlToGoTo = affiliate.replace('[URL]', encodeURIComponent('http:' + urlToGoTo)); } window.open(urlToGoTo); /* Needed for sloppy browsers this time, normally .preventDefault() would work. */ return false; } })();//