function getSafeElement(id) { return document.getElementById?document.getElementById(id):(document.all?document.all(id):null) } function dropdown(id) { if (getSafeElement(id + "data").style.display == "block") { getSafeElement(id + "data").style.display = "none"; } else { setTimeout("getSafeElement('"+id+"data').style.display = 'block';",50); } } function dropdownhover(show,t) { show?t.className = "dropdown-item-hover":t.className = "dropdown-item"; } function dropdownclick(dropdownid,id,t,formname,inputname) { eval("document."+formname+"."+inputname).value = id; getSafeElement(dropdownid).innerHTML = t.innerHTML; } function checkboxclick(t,formname,inputname) { if (t.className == "checkbox-off") { eval("document."+formname+"."+inputname).value = "on"; t.className = "checkbox-on"; } else { eval("document."+formname+"."+inputname).value = "off"; t.className = "checkbox-off"; } t.blur(); } function resetPage() { getSafeElement("personsdropdowndata").style.display = "none"; } function init() { document.form1.person_id.value = "1"; } function doSearch() { document.form1.action="/sok-julklappar.asp" document.form1.submit(); } function button(t) { t.className = "button-click"; // TODO: fixa så det blir "this"-parametern setTimeout("getSafeElement('search').className = 'button';",300); }