function Search(){ if (document.frmSearch.c_cat.value == '') { alert('Du måste precisera ett kategori!'); } else if (document.frmSearch.search_query.value == '') { alert('Du måste precisera ett nyckelord!'); } else { window.location = document.frmSearch.c_cat.value+"-search-"+document.frmSearch.search_query.value+'.html'; // window.location = document.frmSearch.Cat.value + '?k=' + document.frmSearch.Key.value; } return false } function CheckKey() { if (window.event.keyCode == 13) { Search(); } return false; } function chTdColor(o, sens) { if(o) { if(sens == 1) { o.style.background = '#0080C0'; o.style.color = '#313131'; o.style.cursor = 'pointer'; }else{ o.style.background = '#004080'; o.style.color = '#ffffff'; o.style.cursor = 'normal'; } } } function setCookie(name, value, expire) { document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString())); } function getCookie(Name) { var search = Name + "=" if (document.cookie.length > 0) { // if there are any cookies offset = document.cookie.indexOf(search) if (offset != -1) { // if cookie exists offset += search.length // set index of beginning of value end = document.cookie.indexOf(";", offset) // set index of end of cookie value if (end == -1) end = document.cookie.length return unescape(document.cookie.substring(offset, end)) } } }