function OpenPrintWindow(qid) { window.print(); } /* function OpenPrintWindow(qid) { var ItsTheWindow; w = 640; h = 500; LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; var isRes = ""; try{ var prm = document.getElementById("docParm").value; var parms = prm.substring(prm.indexOf("&"),prm.length); isRes = parms + "&isResult=" + document.getElementById("isResult").value; }catch(e){} settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes'; ItsTheWindow = window.open('/udskriv/'+qid+'?OpenDocument'+isRes,'Udskrift', settings); } */ function searchSubmit(sortby,displayas,searchpage) { errorText ="You cannot search for an empty text\n-----------------------------------------------\n"; obj = document.getElementById("query") if (obj.value == "" || obj.value == "Type search text"){ alert(errorText); } else { var tmp = obj.value; var q = escape(tmp).replace("%27","%22"); 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; }