function retarget() { var linkobj = document.links; var hnaam = document.location.hostname; for (i=0; i < linkobj.length;) { if(linkobj[i].hostname.indexOf(hnaam)) { linkobj[i].target ="_blank"; } i++; } } function nothing(){ } 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; //Default waarden geven pVar.NumRows = 1; pVar.NumCols = 2 pVar.TableAttrs= "border=1 cellPadding=0 cellSpacing=0 width=100%" pVar.CellAttrs= "valign=top" // 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=450, width=600, status"); } function doclinkForm() { window.open(DatabasePath+"/insertDocLink?openform" , "Doclink" , "height=600, width=600, status, scrollbars=1"); } function schaalForm() { window.open(DatabasePath+"/UploadPhoto?openform" , "UploadImage" , "height=600, width=800, 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); //FIND OUT CURRENT SERVER NAME AND REPLACE "../" IN URL var svrname = location.hostname; newstring = "http://" + svrname+DatabasePath+"/"; contentArray=content.split("../"); content=contentArray.join( newstring ) ; /////////// 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; //REPLACE CURRENT SERVER NAME WITH "../" IN URL var svrname = location.hostname; newstring = "http://" + svrname + DatabasePath+"/"; contentArray=data.split( newstring ); data=contentArray.join( "../" ) ; //////////// } else{ var data = "

"+theData+"

" } var content = document.getElementById("rtStore"); content.value = "["+data+"]"; } 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 hr() { var sel = document.forms[0].DHTMLEdit1.DOM.selection; range = sel.createRange(); range.execCommand("InsertHorizontalRule") document.all.DHTMLEdit1.focus(); } //remove format function function removeTags() { var sel = document.forms[0].DHTMLEdit1.DOM.selection; range = sel.createRange(); range.execCommand("RemoveFormat"); document.all.DHTMLEdit1.focus(); } //special characters function setChar() { var arr = showModalDialog(DatabasePath+"/jslibs/$file/selchar.htm?OpenElement","Special Character","unadorned: yes; dialogHeight: 330px; dialogWidth: 470px; edge: Raised; center: Yes; help: No; resizable: No; status: No;"); if (arr != null) { var sel = document.forms[0].DHTMLEdit1.DOM.selection; range = sel.createRange(); range.pasteHTML(arr) document.DHTMLEdit1.focus(); } } function insCell() { status=document.DHTMLEdit1.QueryStatus(DECMD_INSERTCELL); if (status == DECMDF_DISABLED || status == DECMDF_NOTSUPPORTED) { alert('Feature only available in a table'); } else { document.DHTMLEdit1.ExecCommand(DECMD_INSERTCELL); document.DHTMLEdit1.focus(); } } function delCell() { status=document.DHTMLEdit1.QueryStatus(DECMD_DELETECELLS); if (status == DECMDF_DISABLED || status == DECMDF_NOTSUPPORTED) { alert('Feature only available in a table'); } else { document.DHTMLEdit1.ExecCommand(DECMD_DELETECELLS); document.DHTMLEdit1.focus(); } } function indent() { document.DHTMLEdit1.ExecCommand(DECMD_INDENT); document.DHTMLEdit1.focus(); } function outdent() { document.DHTMLEdit1.ExecCommand(DECMD_OUTDENT); document.DHTMLEdit1.focus(); }