var exaleadSearchStyle = document.createElement("style"); var styleText = "#exalead_search_form { font: 13px arial, helvetica, sans-serif; margin-top: 7px; padding-top: 25px; position: relative; width: 150px; z-index: 10;}#exalead_search_form .searchType { margin: 0; padding: 0; display: block; position: absolute; top: 0; z-index: 110;}#exalead_search_form .searchType li { display: block; float: left; height: 28px;}#exalead_search_form .searchType li a { font-weight: bold; text-decoration: none; color: #707070; padding: 10px;}#exalead_search_form .searchType li a:hover { color: #ed6813;}#exalead_search_form .searchType li.selected { background: url('http://www.exalead.fr/content/img/search-widget-search-form-arrow.png') no-repeat center bottom;}#exalead_search_form .searchType li.selected a { color: #ed6813;}#exalead_search_form .searchWrapper { border: 1px solid #CCCCCC; border-right-color: #707070; border-top-color: #707070; height: 27px; position: relative; padding: 0px; margin: 0px;}#exalead_search_form .searchWrapper .searchField { border: none; border-top: 1px solid #CACACA; height: 19px; font-size: 17px; margin: 0px; padding: 3px; position: absolute; box-sizing: content-box; top: 0px; left: 0px; width: 113px;}#exalead_search_form .searchWrapper .searchButton { background: url('http://www.exalead.fr/content/img/search-widget-button.gif') no-repeat right top; border: none; height: 27px; width: 29px; margin: 0px; position: absolute; top: 0px; left: 119px;}" exaleadSearchStyle.setAttribute("type", "text/css"); // IE if (exaleadSearchStyle.styleSheet) { exaleadSearchStyle.styleSheet.cssText = styleText; } else { exaleadSearchStyle.appendChild(document.createTextNode(styleText)); } var head_node = document.getElementsByTagName("head")[0]; head_node.appendChild(exaleadSearchStyle); var exaleadSearchForm = document.createElement("form"); exaleadSearchForm.method = "get" exaleadSearchForm.action = "http://www.exalead.fr/search/web/results/" exaleadSearchForm.id = "exalead_search_form" exaleadSearchForm.onsubmit = function() { parameter = exaleadSearchForm.getElementsByTagName('input')[1] if (exaleadSearchForm.getElementsByTagName('li')[0].className == 'selected') { parameter.value = 'http://www.carces-autrement.fr/' } else { parameter.value = '' } } exaleadSearchSwitch = function(element) { listElements = exaleadSearchForm.getElementsByTagName('li') for(var index = 0; index < listElements.length; index++) { if (listElements[index] == element) { element.className = 'selected'; } else { listElements[index].className = ''; } } } exaleadSearchForm.innerHTML = "
" var script_node = document.getElementById("exalead_script"); script_node.parentNode.insertBefore(exaleadSearchForm ,script_node); var separator = document.createElement("div") separator.style.clear = "both" script_node.parentNode.insertBefore(separator ,script_node);