var loc = location.pathname var DatabasePath = loc.substr(0, loc.indexOf('.nsf')+4) function tbButtonOvr() { var image; image = event.srcElement; if (image.className == "buttonNor") { image.className = "buttonOvr"; } } function tbButtonOut() { var image; image = event.srcElement; if (image.className == "buttonOvr") { image.className = "buttonNor"; } } function tbButtonDown() { var image; image = event.srcElement; if (image.className == "buttonOvr") { image.className = "buttonPress"; } } function tbButtonUp() { var image; image = event.srcElement; if (image.className == "buttonPress") { image.className = "buttonOvr"; } } //background text color function setHilite() { var arr = showModalDialog( DatabasePath+"/jslibs/$file/selcolor.htm?openelement", "", "font-family:Verdana; font-size:12; dialogWidth:35em; dialogHeight:42em" ); if (arr != null) { document.forms[0].DHTMLEdit1.ExecCommand(DECMD_SETBACKCOLOR,OLECMDEXECOPT_DODEFAULT, arr); } } //Table function function InsertTable() { var pVar = document.forms[0].ObjTableInfo; var args = new Array(); var arr = null; // Display table information dialog args["NumRows"] = pVar.NumRows; args["NumCols"] = pVar.NumCols; args["TableAttrs"] = pVar.TableAttrs; args["CellAttrs"] = pVar.CellAttrs; args["Caption"] = pVar.Caption; arr = null; arr = showModalDialog( DatabasePath+"/jslibs/$file/instable.htm?openelement", args, "font-family:Verdana; font-size:12; dialogWidth:36em; dialogHeight:25em"); if (arr != null) { // Initialize table object for ( elem in arr ) { if ("NumRows" == elem && arr["NumRows"] != null) { pVar.NumRows = arr["NumRows"]; } else if ("NumCols" == elem && arr["NumCols"] != null) { pVar.NumCols = arr["NumCols"]; } else if ("TableAttrs" == elem) { pVar.TableAttrs = arr["TableAttrs"]; } else if ("CellAttrs" == elem) { pVar.CellAttrs = arr["CellAttrs"]; } else if ("Caption" == elem) { pVar.Caption = arr["Caption"]; } } document.forms[0].DHTMLEdit1.ExecCommand(DECMD_INSERTTABLE,OLECMDEXECOPT_DODEFAULT, pVar); } } //Functions to open image/attachment/html windows function imageForm() { window.open(DatabasePath+"/webimagefile?openform" , "UploadImage" , "height=400, width=400, status"); } function showHTML() { window.open(DatabasePath+"/DisplayHTML?openform" , "DisplayHTML" , "height=400, width=600, status"); } function attachForm() { window.open(DatabasePath+"/attachment?openform" , "UploadFile" , "height=300, width=400, status"); } //functions to get and set data function loadEditor() { var content = document.forms[0].Body.value; if (content.charAt(0) == '[') content = content.substr(1,content.length-2); document.forms[0].DHTMLEdit1.DOM.body.innerHTML = content document.forms[0].DHTMLEdit1.focus(); } function submitHTML() { var theData = document.forms[0].DHTMLEdit1.DOM.body.innerHTML; if (theData.charAt(0) =='<') { var data = "[" + theData + "]"; } else{ var data = theData; } var content = document.getElementById("rtStore"); content.value = data; alert('Het document wordt nu opgeslagen') document.forms[0].submit() } function insertChar(charTyp) { var sel = document.forms[0].DHTMLEdit1.DOM.selection; i = document.forms[0].elements[charTyp].selectedIndex; text = document.forms[0].elements[charTyp].options[i].text; range = sel.createRange(); range.pasteHTML(text) document.DHTMLEdit1.focus(); } function strikeThru() { var sel = document.forms[0].DHTMLEdit1.DOM.selection; range = sel.createRange(); range.pasteHTML("" + range.htmlText + "") document.DHTMLEdit1.focus(); } function superText() { var sel = document.forms[0].DHTMLEdit1.DOM.selection; range = sel.createRange(); range.pasteHTML("" + range.htmlText + "") document.DHTMLEdit1.focus(); } function subText() { var sel = document.forms[0].DHTMLEdit1.DOM.selection; range = sel.createRange(); range.pasteHTML("" + range.htmlText + "") document.DHTMLEdit1.focus(); } function Runswf(swffile,myurl,name,width,height) { document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); document.write('\n'); } function saveDocument() { //Als eerste gaat er een validatie af om te controleren of alle velden goed zijn ingevuld. //Tot slot wordt het formulier gesubmit en dan gaat er een QuerySave agent af die controleert of de datums die zijn ingevoerd mogelijk zijn. //Controleer of de gegevens in ieder geval zijn ingevuld var adrGeg = new Array("Naam", "Adres", "Postcode","Woonplaats", "Email","Telnr"); for(i=0;i