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,category){ errorNr = 0; var obj = document.getElementById("query"); /* errorText ="Please enter seThFølgende felter mangler at blive udfyldt\n-----------------------------------------------\n"; var obj = document.getElementById("query"); 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; } function PrintPage(){ window.print(); } function calcHeight() { //find the height of the internal page try { var vIframe = document.getElementById('ifrCenter2'); if(vIframe != 'null') { var the_height = vIframe.contentWindow.document.body.scrollHeight; //change the height of the iframe vIframe.height = the_height; } } catch(err) {} }