// login functions function DoLogin() { str = top.location.href; str = str.split(".nsf")[1]; if( ((str.indexOf('?')>1) || (str.indexOf('?')>1)) && (str.indexOf('Login')<1)) { top.location.href = top.location.href + '&Login'; } else { str = str.substring(1,str.length); pos = str.indexOf('/'); if (pos>1) { top.location.href = top.location.href + '?OpenDocument&Login'; } else { top.location.href = top.location.href + '?OpenView&Login'; } } } // row color alternation var rownumber=1; function altrow() { if (rownumber==1){ rownumber=2; document.write(''); } else { rownumber=1; document.write(''); } } // mouseover effect function hiOff(o){ str = o.className; pos = str.indexOf('hilite'); if (pos>0){ o.className = str.substring(0,pos); } } function hiOn(o){ str = o.className; pos = str.indexOf('hilite'); if (pos<=0){ o.className = o.className + 'hilite'; } } // search related functions function getElement(id) { return document.getElementById ? document.getElementById(id) : document.all ? document.all(id) : null; } function show(id) { var el = getElement(id); if (el && el.style) el.style.display = ''; } function hide(id) { var el = getElement(id); if (el && el.style) el.style.display = 'none'; } function toggleSearch(tog){ if(tog){ hide('searchSimple'); show('searchAdvanced'); } else { hide('searchAdvanced'); show('searchSimple'); } //document.forms.dbsearch.Query.focus(); } //Code Rating function hasRating(){ var field = document.forms.ratebox.rate; var hasSelection = false; for(var i=0;i -1) { result = field.options[field.selectedIndex].value; if (result == "") result = field.options[field.selectedIndex].text; } } return result; } function tabber(ta) { if (event.keyCode==9) { ta.value=ta.value + ' '; event.returnValue=false; ta.focus(); } } // Validation Routines function validateCodeDoc() { var doc = document.forms[0]; //validate description if (trim(doc.Subject.value) == "") { alert('Description is a required field.'); doc.Subject.focus(); return false; } //validate contributor if (trim(doc.Contributor.value) == "") { alert('Contributor is a required field.'); doc.Contributor.focus(); return false; } //validate category if (trim(ListValue(doc.CodeCategory)) == "") { alert('Category is a required field.'); doc.CodeCategory.focus(); return false; } //validate type if (trim(ListValue(doc.CodeType)) == "") { alert('Type is a required field.'); doc.CodeType.focus(); return false; } return true; } function validateComment() { var doc = document.forms.comment; //validate subject if (trim(doc.Subject.value) == "") { alert('Subject is a required field.'); doc.Subject.focus(); return false; } //validate comment if (trim(doc.BodyR.value) == "") { alert('Comment is a required field.'); doc.BodyR.focus(); return false; } return true; } // DHTML Menu Functions var rimPath = '/notesoss.nsf/webcontent/dmbmenu/$file/'; var rjsPath = '/notesoss.nsf/webcontent/dmbmenu/$file/'; var rPath2Root = 'http://www.openntf.org'; function InitRelCode() { var iImg; var jImg; var tObj; if(!document.layers) { iImg = document.images['DMBImgFiles']; jImg = document.images['DMBJSCode']; tObj = jImg; } else { tObj = document.layers['DMBRI']; if(tObj) { iImg = tObj.document.images['DMBImgFiles']; jImg = tObj.document.images['DMBJSCode']; } } if(!tObj) { // window.setTimeout("InitRelCode()", 1500); window.setTimeout("InitRelCode()", 500); return false; } rimPath = _gp(iImg.src); rjsPath = _gp(jImg.src); rPath2Root = rjsPath + ""; return true; } function _purl(u) { return xrep(xrep(u, "%%REP%%", rPath2Root), "\\", "/"); } function _fip(img) { if(img.src.indexOf("%%REL%%")!=-1) img.src = rimPath + img.src.split("%%REL%%")[1]; return img.src; } function _gp(p) { return p.substr(0,p.lastIndexOf("/")+1); } function FixImages() { var h = null; if(typeof(hStyle)!="undefined") h = hStyle; if(typeof(hS)!="undefined") h = hS; if(h) for(var i=0; i