// // variables used for path information // var server = location.protocol + '//' + location.host; var fullPath = location.pathname; var dbname = getDBName( fullPath ); var pos = fullPath.indexOf( dbname ); var curPath = '/' + fullPath.slice( 1, pos ); var path = server + curPath + dbname; var mode = location.search; function getDBName( x ) { i = x.indexOf( '.nsf', 0 ); tmpPath = x.slice( 0, i ); m = tmpPath.lastIndexOf( '/' ); return x.slice( m + 1, i + 4 ); } // pull a given value out of the search string function getSVal( srch, sval ) { pos1 = srch.indexOf(sval); if ( pos1 == '-1' ) { // could not find return false; } // end if pos2 = srch.indexOf('&',pos1); if ( pos2 == '-1' ) { // there are no parameters after punid x = srch.slice(pos1+sval.length,srch.length); } // end if else { x = srch.slice(pos1+sval.length,pos2); } return x; } function getDocField(objName) { var docObj = eval("document.forms[0]." + objName); return docObj; }