function setiwCookie(name, value, expires, path, domain, secure){ var today = new Date(); if(expires){ expires = expires * 1000 * 3600 * 24; } document.cookie = name+'='+escape(value) + ((expires) ? ';expires=' + new Date(today.getTime() + expires).toGMTString() : '') + ((path) ? ';path=' + path : '') + ((domain) ? ';domain=' + domain : '') + ((secure) ? ';secure' : ''); } function aaflogout() { setiwCookie('iw_login', 'false', -7, '/'); window.location = '/'; } function arrowsOn(id, aniimg){ document.getElementById(id).src = aniimg; document.getElementById("left_"+id).src = '/Traryd/layout.nsf/webImages/arrow_left.gif/$file/arrow_left.gif'; document.getElementById("right_"+id).src = '/Traryd/layout.nsf/webImages/arrow_right.gif/$file/arrow_right.gif'; } function arrowsOff(id, noaniimg){ document.getElementById(id).src = noaniimg; document.getElementById("left_"+id).src = '/Traryd/layout.nsf/webImages/spacer.gif/$file/spacer.gif'; document.getElementById("right_"+id).src = '/Traryd/layout.nsf/webImages/spacer.gif/$file/spacer.gif'; } function searchSubmit(sortby,displayas,searchpage,category){ errorNr = 0; var obj = document.getElementById("query"); /* errorText ="Please enter seThFølgende felter mangler at blive udfyldt\n-----------------------------------------------\n"; if (obj.value == ""){ errorText += " * Søgeord/søgestreng\n"; errorNr++; } */ if (errorNr > 0) { alert(errorText); } else { var tmp = obj.value; var q = escape(tmp).replace("%27","%22"); // var submit_this = '/global/searchresult?opendocument&charset=ISO-8859-1&Query='+q+'&SearchMax=0&SortResultBy='; var submit_this = searchpage+'?opendocument&charset=ISO-8859-1&Query='+q+'&SearchMax=0&SortResultBy='; var tq = q; if(isNaN(parseFloat(tq))){ submit_this += sortby+'&SortResultByType='+displayas; }else{ submit_this += 'Title&SortResultByType=Ascending'; } top.location.href = submit_this; } return false; }