function printPage() { if (window.print) window.print() else alert("Din browser kan ikke udføre denne funktion"); } function displayOff(name){ document.getElementById(name).style.display = 'none'; } function displayOn(name,x,y){ document.getElementById(name).style.display = 'block'; var st = document.getElementById(name).style; st.display = 'block'; st.position='absolute'; } function hideLayer(name){ document.getElementById(name).style.visibility = 'hidden'; } function showLayer(name){ document.getElementById(name).style.visibility = 'visible'; } function remoteWindow(url,name,w,h){ LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; var ItsTheWindow; ItsTheWindow = window.open(url,name, "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,height="+h+",width="+w+",top="+TopPosition+",left="+LeftPosition+",dependent=yes"); } function remoteIWWindow(ID,name,w,h,unid_or_quickid){ x = window.innerWidth/2; y = window.innerHeight/2; if(document.all){ xIE = document.body.offsetWidth/2; yIE = document.body.offsetHeight/2; } if(!document.all && document.getElementById){ xIE = window.innerWidth/2 - 100; yIE = window.innerHeight/2 + 60; } if(document.layers){ xIE = 0; yIE = 0; } var poptype = 'webDocsByQuickID/'+ID+'?OpenDocument'; if(unid_or_quickid == "0") poptype = 'webDocuments/' +ID+'?OpenDocument'; var ItsTheWindow; ItsTheWindow = window.open('/velfac-uk/data.nsf/'+poptype,name, "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width="+w+",height="+h+",screenX=" + x + ",screenY=" + y + ",left=" + xIE + ",top=" + yIE + ",dependent=yes"); } var prev_layername = -1; function toggleLayer(layername, close_prev){ if(document.getElementById(layername).style.visibility == 'hidden') { document.getElementById(layername).style.visibility = "visible"; document.getElementById(layername).style.position = 'relative'; if(prev_layername != -1 && close_prev) { document.getElementById(prev_layername).style.visibility = "hidden"; document.getElementById(prev_layername).style.position = 'absolute'; } } else { document.getElementById(layername).style.visibility = "hidden"; document.getElementById(layername).style.position = 'absolute'; layername=-1; } prev_layername = layername; } /* Bruges af webredigering */ function setWarningText(txt){ document.getElementById("oWarning").innerHTML = txt; } function clearWarningText(txt){ document.getElementById("oWarning").innerHTML = ""; }