// returns the element value from modules array function getHmElement(eName,b,eMod) { elementName= eName + b + eMod; for (var a=0;a,\[,\]]/; var str = s.value; var tstr = t.value; if ( regExp1.test( str ) || regExp2.test( str ) ) { alrt = "Please note that you can not include:"; alrt += "\n\nThe reserved word 'field'\nthe characters [, ], (, ), < or >"; alrt += "\n\nin your search query!\n\nIf you are confident that you know"; alrt += "\nwhat you are doing, then you can\nmanually produce the URL required."; s.focus(); return alert( alrt ); } if ( str == "" ) { alert("Please be sure to enter something to search for."); s.focus(); } else { document.location = "/" + document.forms[0].Path.value + "/index?open&type=Search&query=(FIELD+" + tstr + "+contains+"+ escape( str ) + ")&start=1&count=100"; } } // close popup window function closeWindow() { window.close() } // print the page function printWindow() { window.print() } function inStr(beginning, word1, word2) { check1 = new String(word2); returnInStr = word1.indexOf(word2, (beginning - 1)) + 1; return returnInStr; } function mid(inputMid, pos, l) { pos = pos - 1; if ((pos < inputMid.length) && ((pos + l) <= inputMid.length)) { returnMid = inputMid.substring(pos, pos + l); } else { returnMid = ""; } return returnMid; } function replaceSubstring (inputString, badString, goodString, caseSensitive) { fixedReplace = ""; UI = inputString; UB = badString; if ((caseSensitive != 1) && (caseSensitive != true)) { UI = inputString.toUpperCase(); UB = badString.toUpperCase(); } badEnd = -1; badLoc = UI.indexOf(UB); if (badLoc != -1) { for (x=1; (badLoc != -1); x++) { fixedReplace = fixedReplace + inputString.substring((badEnd + 1), badLoc) + goodString badEnd = badLoc + UB.length - 1; badLoc = UI.indexOf(UB, (badLoc + 1)); } fixedReplace = fixedReplace + inputString.substring((badEnd + 1), inputString.length); } else { fixedReplace = inputString; } return fixedReplace; } // similar to the StrLeft function function getFront(mainStr, searchStr ){ foundOffset = mainStr.indexOf(searchStr) if ( foundOffset == -1 ) { return null; } return mainStr.substring(0, foundOffset ); } // similar to the StrRight function function getEnd(mainStr, searchStr ){ foundOffset = mainStr.indexOf(searchStr) if ( foundOffset == -1 ) { return null; } return mainStr.substring( foundOffset + searchStr.length, mainStr.length); } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 1; i-- ) { c = s.charAt(10 - i); checkDigit += (c - 0) * i; result += c; } checkDigit = (11 - (checkDigit % 11)) % 11; result += checkDigit == 10 ? 'X' : (checkDigit + ""); return ( result ); } function convISBN10toISBN13(str) { var c; var checkDigit = 0; var result = ""; c = '9'; result += c; checkDigit += (c - 0) * 1; c = '7'; result += c; checkDigit += (c - 0) * 3; c = '8'; result += c; checkDigit += (c - 0) * 1; for ( i = 0; i < 9; i++ ) { // > c = str.charAt(i); if ( i % 2 == 0 ) checkDigit += (c - 0) * 3; else checkDigit += (c - 0) * 1; result += c; } checkDigit = (10 - (checkDigit % 10)) % 10; result += (checkDigit + ""); return ( result ); } function preEditISBN(str) { var len = str.length; var c; var s; if ( (str.substring(0,4) == 'ISBN') || (str.substring(0,4) == 'isbn') ) { str = str.substring(4, len); len = str.length; } s = ""; for ( i = 0; i < len; i++ ) { // > c = str.charAt(i); if ( (c == '-') || (c == ' ') ) continue; s += c; } str = s; return ( str ); }