var DotyArray = new Array(); // Var for hex vals var hexVals = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"); var unsafeString = "\"<>%\\^[]`\+\$\,"; // deleted these chars from the include list ";", "/", "?", ":", "@", "=", "&" and # // so that we could analyze actual URLs function nodeDotyArray(level, indexval, literal, check) { this.level = level this.indexval = indexval this.literal = literal this.check = check; } function goto_ext(vURL) { window.open(changeIt(vURL)); } function begin_search() { vWMod = new String(""); vDoc = new Object(window.frames["leftFrame"]); sest = new String(vDoc.document.forms["get_buttons"].Sest.value); while (sest.charAt(0)==" ") sest=sest.substring(1,sest.length); while (sest.charAt(sest.length-1)==" ") sest=sest.substring(0,sest.length - 1); if (sest.length<2) { alert ("Gelieve minstens 2 letters in te tikken"); vDoc.document.forms["get_buttons"].Sest.value=sest; vDoc.document.forms["get_buttons"].Sest.focus(); } else { if (vWMod.length == 0) { surl = "http://pallas.cegesoma.be/pls/opac/opac.search?"; } else { surl = "http://pallas.cegesoma.be/pls/catalo/opac.search?"; } surl += "lan=" + vDoc.document.forms["search_param"].lan.value; surl += "&seop=" + vDoc.document.forms["search_param"].seop.value; surl += "&sele=" + vDoc.document.forms["search_param"].sele.value; surl += "&sepa=" + vDoc.document.forms["search_param"].sepa.value; surl += "&sest=" + sest; surl += "&senu=" + vDoc.document.forms["search_param"].senu.value; surl += "&chna=" + vDoc.document.forms["search_param"].chna.value; surl += "&doty=" + read_doty(); surl += "&rqdb=" + vDoc.document.forms["search_param"].rqdb.value; surl += "&dbnu=" + vDoc.document.forms["search_param"].dbnu.value; if (vWMod.length == 0) { vDoc.location.href=surl; } else { parent.parent.parent.add_search_url(surl); } } } function myvoid() {} function openWindow(width,height,url,windowName) { x = (640 - width)/2; y = (480 - height)/2; if (screen) { y = (screen.availHeight - height)/2; x = (screen.availWidth - width)/2; } w1=window.open(url,windowName,'scrollbars=yes,width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x); w1.focus(); } function set_check() { var co = 0; for (var i = 0; i < DotyArray.length; i++) { if (DotyArray[i].check == 1) { window.frames["leftFrame"].document.forms["get_doty"].elements[i].checked = true; co = co + 1; } if (DotyArray[i].check == 0) { window.frames["leftFrame"].document.forms["get_doty"].elements[i].checked = false; } } if (co == 0) { DotyArray[0].check = 1; window.frames["leftFrame"].document.forms["get_doty"].elements[0].checked = true; } } function alter_check(arloc) { var vParLev = new Number(); var vChi = new Number(); if (DotyArray[arloc].check == 0) { DotyArray[arloc].check = 1; // Uncheck parent(s) vParLev = DotyArray[arloc].level - 1; UnCheck = 0; for (i = (arloc-1); i >= 0; i--) { if (DotyArray[i].level == vParLev) { DotyArray[i].check = 0; // Next Parentlevel vParLev = vParLev - 1; } } // Uncheck children vChi = 1; for (i = (arloc+1); i < DotyArray.length; i++) { if (DotyArray[i].level > DotyArray[arloc].level) { if (vChi == 1) { DotyArray[i].check = 0; } } else { vChi = 0; } } } else { DotyArray[arloc].check = 0; } set_check(); document.frames["leftFrame"].get_buttons.Sest.focus(); } function read_doty() { vDot = new String(); vDoc = new Object(window.frames["leftFrame"]); for (i = 0; i < DotyArray.length; i++) { if (DotyArray[i].check == 1) { vDot = vDot + DotyArray[i].indexval; // alert (DotyArray[i].indexval); } } vDoc.document.forms["search_param"].doty.value=vDot; //alert (vDot); return vDot; } function browse_archives() { parent.BrowseLev = 2; vDoc = new Object(window.frames["leftFrame"]); vDoc.document.forms["get_buttons"].Sest.value = ""; vDoc.document.forms["search_param"].sest.value = ""; vDoc.document.forms["search_param"].seop.value = "7"; vDoc.document.forms["search_param"].senu.value = "0"; surl = "http://pallas.cegesoma.be/pls/opac/opac.search?lan=" + vDoc.document.forms["search_param"].lan.value; surl += "&seop=7"; surl += "&sele=" + vDoc.document.forms["search_param"].sele.value; surl += "&sepa=" + vDoc.document.forms["search_param"].sepa.value; surl += "&sest=" + vDoc.document.forms["search_param"].sest.value; surl += "&senu=" + vDoc.document.forms["search_param"].senu.value; surl += "&chna=" + vDoc.document.forms["search_param"].chna.value; surl += "&doty=" + read_doty(); surl += "&rqdb=" + vDoc.document.forms["search_param"].rqdb.value; surl += "&dbnu=" + vDoc.document.forms["search_param"].dbnu.value; vDoc.location.href=surl; } // Functions for hex vals function isUnsafe(compareChar) // this function checks to see if a char is URL unsafe. // Returns bool result. True = unsafe, False = safe { if (unsafeString.indexOf(compareChar) == -1 && compareChar.charCodeAt(0) > 32 && compareChar.charCodeAt(0) < 123) { return false; } // found no unsafe chars, return false else { return true; } } function decToHex(num, radix) // part of the hex-ifying functionality { var hexString = ""; while (num >= radix) { temp = num % radix; num = Math.floor(num / radix); hexString += hexVals[temp]; } hexString += hexVals[num]; return reversal(hexString); } function reversal(s) // part of the hex-ifying functionality { var len = s.length; var trans = ""; for (i=0; i