/* javascript */ function doSearch( srchtext, sec ) { path = new String( document.forms[0].DBFilePath.value ); view = new String( "WebLibrarySearch" ); sc = new String( sec ); if( srchtext.length == 0 ) return false; if( sc.length == 0 || sc =="undefined" ) view = view + "Unrestricted"; else view = view + sc; parent.frames["Main"].document.location.href = path + view + "?SearchView&Query=" + srchtext + "&Start=1&Count=10"; return false; } function doAdvancedSearchAll() { path = new String( document.forms[0].DBFilePath.value ); view = new String( "WebLibrarySearch" ); sec = new String( document.forms[0].securityoption.value ); categ = new String( document.forms[0].category.value ); auth = new String( document.forms[0].author.value ); keyw = new String( document.forms[0].freetext.value ); srchtext = new String( "" ); if( ( categ.length == 0 ) && ( auth.length == 0 ) && ( keyw.length == 0 ) ) return false; if( categ.length > 0 ) categ = 'FIELD PageCategory="' + categ + '"'; if( auth.length > 0 ) auth = 'FIELD PageAuthors="' + auth + '"'; if( categ.length > 0 ) if( srchtext.length > 0 ) srchtext = srchtext + " AND " + categ; else srchtext = categ; if( auth.length > 0 ) if( srchtext.length > 0 ) srchtext = srchtext + " AND " + auth; else srchtext = auth; if( keyw.length > 0 ) if( srchtext.length > 0 ) srchtext = srchtext + " AND " + keyw; else srchtext = keyw; if( sec.length == 0 ) view = view + "Unrestricted"; else view = view + sec; parent.frames["Main"].document.location.href = path + view + "?SearchView&Query=" + srchtext + "&Start=1&Count=10"; return false; } function moveSearch( qry, startpos ) { path = new String( document.forms[0].DBFilePath.value ); view = new String( document.forms[0].ViewName.value ); srchtext = new String( qry ); if( srchtext.length == 0 ) return false; if( startpos <= 0 ) startpos = 1; parent.frames["Main"].document.location.href = path + view + "?SearchView&Query=" + srchtext + "&Start=" + startpos + "&Count=10"; return false; } function browseLibrary( view, section, sec ) { sn = new String( document.forms[0].Server_Name.value ); fp = new String( document.forms[0].DBFilePath.value ); vw = new String( view ); sctn = new String( section ); sc = new String( sec ); if( sctn.length == 0 ) return false; if( sctn == "*" ) sctn = ""; if( vw.length == 0 || vw == "undefined" ) vw = "Category"; if( sctn.length > 0 ) sctn = "?OpenView&RestrictToCategory=" + sctn; if( sc.length == 0 || sc == "undefined" ) sc = "Unrestricted"; parent.frames["Main"].document.location.href = "http://" + sn + fp + "WebLibraryBy" + vw + sec + sctn; parent.frames["Main"].focus(); return false; } function goToTop() { loc = new String( document.location.href ); if( loc.indexOf("#") != -1 ) loc = loc.slice(0,loc.indexOf("#")); document.location.href = loc + "#top" } function setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; }