function openPopUp(sUrl, iWidth, iHeight, sTarget) { if (typeof(sTarget)=="undefined") sTarget = "content"; windowOpen(sUrl, sTarget, "top=50,left=50,toolbar=0,height="+ iHeight +",width="+iWidth+",resizable=1,scrollbars=1",false); } function windowOpenPrintPreview(sUrl) { return(windowOpen(sUrl, 'PrintPreview','left=100,top=100,height=550,width=700,resizable=1,scrollbars=1')); } function windowOpenExportPreview(sUrl) { return(windowOpen(sUrl, 'ExportPreview','top=20,left=20,height=200,width=300,resizable=1,menubar=1')); } function windowClose() { parentFocus(); window.close(); } function windowRefresh(_bDontCloseChildren) { bDontCloseChildren = _bDontCloseChildren; try { window.document.location.reload(true); } catch(e) { window.document.location.replace(window.document.location.href); } } function windowReplace(sUrl) { window.document.location.replace(sUrl); } function parentFocus() { try { window.opener.focus(); } catch(e) {} } function parentRefresh() { try { window.opener.windowRefresh(); } catch(e) { try { window.opener.location.reload(true); } catch(e) {} } } function parentCall(sCmd) { try { eval('window.opener.' + sCmd +';'); } catch(e) {} } function ClassHilite(oObj, sClass) { sHilite_OldClass = oObj.className; if(sClass == null || sClass == '') sClass = 'highlight'; oObj.className += ' ' + sClass; } function ClassUnhilite(oObj, sClass) { if(sClass == null || sClass == '') sClass = 'highlight'; oObj.className = ltrim(rtrim(oObj.className.replace(sClass, ''))); } function DateDiffString(dStart, dEnd) { var sDiff; var dDiff = new Date(dEnd.getTime() - dStart.getTime()); var sMilliSec = parseInt((((dDiff.getMinutes() * 60) + dDiff.getSeconds()) * 1000) + dDiff.getMilliseconds()) + ""; while(sMilliSec.length < 4) { sMilliSec = '0' + sMilliSec; } iLen = sMilliSec.length; sDiff = "" + sMilliSec.substring(0, iLen-3) + '.' + sMilliSec.substring(iLen-3) + ' sec.'; return sDiff; } function Round(fVal, iDecimals) { iShift = Math.pow(10, iDecimals); return (Math.round(fVal*iShift) / iShift); } function search_nextPage(pname, sURL, iLastIndex) { eval('var iPageNr=parseInt('+pname+'_iPageNr);'); eval('var sIndices='+pname+'_sIndices;'); sPageIndex = (iPageNr+1) + '@' + iLastIndex; sRegEx = '/' + iPageNr + '@/'; iPos = sIndices.search(sRegEx); if (iPos != -1) sIndices = sIndices.substr(0, iPos) + ':'; else sIndices += ':'; sIndices += sPageIndex; sURL += ((sURL.search(/\?/) == -1) ? "?" : "&"); var sPagePar = pname+'_PageNr='+(iPageNr+1); var sIndPar = '&'+pname+'_Indices='+sIndices; var sSearchPar = '&'+pname+'_Search=2'; document.location = sURL+sPagePar+sIndPar+sSearchPar; } function search_prevPage(pname, sURL) { eval('var iPageNr=parseInt('+pname+'_iPageNr);'); eval('var sIndices='+pname+'_sIndices;'); sURL += ((sURL.search(/\?/) == -1) ? "?" : "&"); var sPagePar = pname+'_PageNr='+(iPageNr-1); var sIndPar = '&'+pname+'_Indices='+sIndices; var sSearchPar = '&'+pname+'_Search=2'; document.location = sURL+sPagePar+sIndPar+sSearchPar; } function trim(s) { return ltrim(rtrim(s)); } function ltrim(s) { while (s.length > 0 && s.charAt(0) == ' ') s = s.substr(1, s.length); return s; } function rtrim(s) { while (s.length > 0 && s.charAt(s.length - 1) == ' ') s = s.substr(0, s.length - 1); return s; } function nl2br(s) { re = /\n/g; return s.replace(re, '
'); } function noPopUp(e) { var message="Copyright '2012 - cText_SiteOwner'"; if(e.button == 2) { alert(message); return false; } } function OpenWizard(pname, sParams, sWndName, bUpdateParent) { iUpdate = ((typeof(bUpdateParent)=="undefined" || !bUpdateParent) ? 0 : 1); if (sParams!="" && sParams.substr(0, 1) != "&") { sParams = "&" + sParams; } windowOpen("/documentviewer.html?sDocName=" + pname + "&bUpdateParent="+iUpdate+"&variant=1&new=1" + sParams , sWndName,"left=300,top=300,height=530,width=660,resizable=1,scrollbars=0" ); } function WizNextOnEnter(evt) { if (!evt) evt = window.event; eCode = evt.keyCode; switch (eCode) { case 13: try {evt.stopPropagation()} catch (e) {evt.keyCode=0} WIZdoNext(); break; } } function confirmDelete(title) { if (typeof(title)=="string" && title!="") title = " ("+ title +") "; return confirm("Weet u zeker dat u dit item"+title+" wilt wissen?"); } function showPropInfo(prop, val, showval) { var param = (prop==0) ? "val="+val : "prop="+prop; if (typeof(showval) != "undefined" && showval) param += "&showval=1"; openPopUp("/pages/propinfo.html?variant=popup&"+param, 400, 400, "info"); } var _aSpRowStyle = new Array(); function SetClassName(item, name, classname) { _aSpRowStyle[name] = item.className; item.className = classname; } function ResetClassName(item, name) { item.className = _aSpRowStyle[name]; } var _aReq = new Array(); function getReqObj() { var req = false; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e1) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { } } } return req; } function fillListItemsXml(id) { if (_aReq[id].readyState!=4) return; if (_aReq[id].status == 200) { var oList = document.getElementById(id); var oNodeList = _aReq[id].responseXML.getElementsByTagName("items").item(0); if (oNodeList == null) return; oNodeList = oNodeList.childNodes; for (var i=0; i < oNodeList.length; i++) { var node = oNodeList.item(i); var oOpt = document.createElement("OPTION"); oOpt.value = node.getAttribute("id"); oOpt.text = unescape(node.getAttribute("caption")); oList.options.add(oOpt, i+1); } _aReq[id] = "ok"; } } function asyncGetXmlItems(id, cbf, type, val) { if (typeof(_aReq[id])=="string" && _aReq[id]=="ok") return; if (!val) val = "1"; _aReq[id] = getReqObj(); _aReq[id].onreadystatechange = cbf; _aReq[id].open("GET", "/pages/getxml.html?"+type+"="+val, true); _aReq[id].send(null); }