1var doc='';�var sty='';�var htm='';�var bType = new bTypeClass();�var screen_width = screen.width;�var screen_height = screen.height;�var preventClear=false;�var isMobile = false;�var isTablet = false;�var userAgent = navigator.userAgent.toLowerCase();��if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) � || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(userAgent.substr(0,4))) { � isMobile = true;�}�isMobile = isMobile || $(window).width() < 720;�isTablet = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(userAgent);�//alert(isTablet)�//console.log("screen.width:" + isMobile)��var CLOSE_DIV = "<div class='errClose'><a href='javascript:hideShowDiv( \"errDiv\",false)'>Close X</a> </div>"��� //For todays date;� Date.prototype.today = function() {� return ((this.getDate() < 10) ? "0" : "") + this.getDate() + "/" + (((this.getMonth() + 1) < 10) ? "0" : "") + (this.getMonth() + 1) + "/" + this.getFullYear();� };� // For the time now� Date.prototype.timeNow = function() {� return ((this.getHours() < 10) ? "0" : "") + this.getHours() + ":" + ((this.getMinutes() < 10) ? "0" : "") + this.getMinutes() + ":" + ((this.getSeconds() < 10) ? "0" : "") + this.getSeconds();� };� function timeNowStr() {� var newDate = new Date();� return (newDate.today() + "-" + newDate.timeNow());� }� function errorConsole(funcName, err) {� // console.log(err)� isWin8 = false;� errLine = (!isWin8) ? ', line:' + err.lineNumber : "";� text = 'ERR: in:' + funcName + errLine + ', err:' + err.message;� text = text.replace('line:undefined', '');� var newDate = new Date();� var theTime = "" + newDate.timeNow();� console.log('[' + theTime + '] CMS: ' + text);� }�� �//<<<<<<<<<<<<<<<<<<<<<<function isEmailAddress >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>�function isEmailAddress(email)�{� var result = false� var theStr = new String(email)� var index = theStr.indexOf("@");� if (index > 0)� {� var pindex = theStr.indexOf('.',index);� if ((pindex > index+1) && (theStr.length > pindex+1))� result = true;� }� return result;�}�//<<<<<<<<<<<<<<<<<<<<<<function popupWindow >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>�function popupWindow(the_page,the_width,the_height) {� window.open(the_page,"","status=no,menubar=no,scrollbars=yes,resizable=no,width="
1+ the_width + ",height=" + the_height);�}��//---------------------------------- function execSearch -------------------------------�function execSearch(view){�� var form = document.forms[0];�� var path = form.WebDbName.value;� var query = encodeURIComponent(form.Search[form.Search.selectedIndex].text);� � urlReturn = '/' + path + '/' + view + '?SearchView&Query=' + '(' + query + ')';� � location.href = urlReturn;��}�//---------------------------------- Hide/Show function -------------------------------�function hideShowDiv( identifier,show){� var thisLayer;� try {� var tmp = document.getElementById( identifier );� thisLayer = tmp.style;� }� catch (e) {� var toEval = doc + '["'+identifier+'"]'+sty;� thisLayer = eval(toEval);� }� � try {� thisLayer.display = (!show) ? "none" : "block";� }� catch (e) {}�}��function hideShow( identifier,show){� var thisLayer;� var reqHeight;� try {� var tmp = document.getElementById( identifier );� thisLayer = tmp.style;� reqHeight = tmp.scrollHeight;� }� catch (e) {� thisLayer = eval(doc + '["'+identifier+'"]'+sty);� reqHeight = eval(doc+'["'+identifier+'"].scrollHeight')� }� try {� if(!show) {� thisLayer.visibility = 'hidden';� thisLayer.height = 1;� } else {� thisLayer.visibility = 'visible';� thisLayer.height = reqHeight;� }� }� catch (e) {}�}�/*---------------------------------- Common function ------------------------------- */�function Left(str, n){� if (n <= 0)� return "";� else if (n > String(str).length)� return str;� else� return String(str).substring(0,n);�}�function Right(str, n){� if (n <= 0)� return "";� else if (n > String(str).length)� return str;� else {� var iLen = String(str).length;� return String(str).substring(iLen, iLen - n);� }�}��function trim(aStr) {� return aStr.replace(/^\s{1,}/, "").replace(/\s{1,}$/, "");�}��String.prototype.fulltrim = function() {� return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g," ").replace(/\s+/g," ");�}��function inStr(sourceStr, keyStr){� try {� return (sourceStr.indexOf(keyStr) > -1);� }� catch (e){� return false;� }�}��function strLeft(sourceStr, keyStr){� return (sourceStr.indexOf(keyStr) == -1 | keyStr=='') ? '' : sourceStr.split(keyStr)[0];�}��function strRight(sourceStr, keyStr){� idx = sourceStr.indexOf(keyStr);� return (idx == -1 | keyStr=='') ? '' : sourceStr.substr(idx+ keyStr.length);�}��function rightBack(sourceStr, keyStr){� arr = sourceStr.split(keyStr);� return (sourceStr.indexOf(keyStr) == -1 | keyStr=='') ? '' : arr.pop();�}��function leftBack(sourceStr, keyStr){� arr = sourceStr.split(keyStr);� arr.pop();� return (keyStr==null | keyStr=='') ? '' : arr.join(keyStr);�}��function middle(sourceStr, keyStrLeft, keyStrRight){� return strLeft(strRight(sourceStr,keyStrLeft), keyStrRight);�}��/*---------------------------------- Query String Object ------------------------------- */�function Querystring(qs) { // optionally pass a querystring to parse� this.params = new Object()� this.get=Querystring_get� if (qs == null) {� var theRef = unescape(location.href);� if (theRef.indexOf("!") > -1) � qs = strRight(theRef, "!");� else� qs = location.search.substring(1,location.search.length); � }� if (qs.length == 0) return�� // Turn <plus> back to <space>� // See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1� qs = qs.replace(/\+/g, ' ')� var args = qs.split('&') // parse out name/value pairs separated via &� � // split out each name=value pair� for (var i=0;i<args.length;i++) {� var value;� var pair = args[i].split('=')� var name = unescape(pair[0])�� if (pair.length == 2)� value = unescape(pair[1])� else� value = name� name = name.toLowerCase();� //alert(name + ":" + value) � this.params[name] = value� }�}��function Querystring_get(key, default_) {� // This silly looking line changes UNDEFINED to NULL� if (default_ == null) default_ = null;� key = key.toLowerCase();� var value=this.params[key]� if (value==null) value=default_;� � return value�}�//---------------------------------- Get basic values from combos -------------------------------�function getRadioValue(obj) {� if(!obj) return "";� var objLength = obj.length;� if(objLength == undefined)� if(obj.checked)� return obj.value;� else� return "";
1� for(var i = 0; i < objLength; i++) {� if(obj[i].checked) {� return obj[i].value;� }� }� return "";�}��function getCheckedValue(obj) {� if(!obj) return "";� var objLength = obj.length;� � if(objLength == undefined)� if(obj.checked)� return obj.value;� else� return "";� var retVal = ""� for(var i = 0; i < objLength; i++) {� if(obj[i].checked) {� retVal = retVal + obj[i].value + "|";� }� }� return retVal;�}��//---------------------------------- get cur date time -------------------------------�function getCurTime () {� var curtime = new Date();�� var day = curtime.getDate();� var month = curtime.getMonth();� var year = curtime.getYear();� var curhour =curtime.getHours();� var curmin = curtime.getMinutes();�� var months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");� var time = "";� � time = (curhour < 10 ? "0" : "") + curhour + ":" + (curmin < 10 ? "0" : "") + curmin ;� � return (day + " " + months[month] + " " + year + ", " + time);�}���//------------------------------- select a combo from a value --------------------------�function selectVal(selObj, val) {� var index;� var found = false;�� for (index = 0; index < selObj.length; index++) {� if (val == selObj[index].value || val == selObj[index].text) {� found = true;� break;� }� }� if (found == false)� index = 0;�� selObj.selectedIndex = index;�}��//---------------------------------- read and set cookies -------------------------------�/* function readCookie(name)�{� var nameEQ = name + "=";� var ca = document.cookie.split(';');� for(var i=0;i < ca.length;i++)� {� var c = ca[i];� while (c.charAt(0)==' ') c = c.substring(1,c.length);� if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);� }� return null;�} */��function readCookie( check_name ) {� // first we'll split this cookie up into name/value pairs� // note: document.cookie only returns name=value, not the other components� var a_all_cookies = document.cookie.split( ';' );� var a_temp_cookie = '';� var cookie_name = '';� var cookie_value = '';� var b_cookie_found = false; // set boolean t/f default f�� for ( i = 0; i < a_all_cookies.length; i++ ) {� // now we'll split apart each name=value pair� a_temp_cookie = a_all_cookies[i].split( '=' );�� // and trim left/right whitespace while we're at it� cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');�� // if the extracted name matches passed check_name� if ( cookie_name == check_name ) {� b_cookie_found = true;� // we need to handle case where cookie has no value but exists (no = sign, that is):� if ( a_temp_cookie.length > 1 )� cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );� // note that in cases where cookie is initialized but no value, null is returned� return cookie_value;� break;� }� a_temp_cookie = null;� cookie_name = '';� }� if ( !b_cookie_found ) return null;�}�function setCookie( name, value, expires, path, domain, secure ) {� // set time, it's in milliseconds� var today = new Date();� today.setTime( today.getTime() );�� // if the expires variable is set, make the correct� // expires time, the current script below will set� // it for x number of days, to make it for hours,� // delete * 24, for minutes, delete * 60 * 24� if ( expires ) expires = expires * 1000 * 60 * 60 ;� var expires_date = new Date( today.getTime() + (expires) );�� document.cookie = name + "=" +escape( value ) +� (( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +� (( path ) ? ";path=" + path : "" ) +� (( domain ) ? ";domain=" + domain : "" ) +� (( secure ) ? ";secure" : "" );�}��function deleteCookie(name) {� document.cookie = encodeURIComponent(name) + "=deleted; expires=" + new Date(0).toUTCString();�}��function showPopHelpClose( html) {� //config.Width = 120;� Tip(html, WIDTH, 120, PADDING, 6, BGCOLOR, '#E1FFEB',FADEIN, 400,FADEIN, 300, CLICKCLOSE, true, CLICKSTICKY, true)�}��function showHelpClose( html ) {� var dbpath = document.getElementById("dbpath").innerHTML;� var inp = html;� inp = inp.replace(/'/g,"\\'");� inp = inp.replace(/<p>/g,"");� inp = inp.replace(/<\/p>/g,"<br>");� document.write( "<a onmouseout='UnTip()' href='javascript:void(0);' onmouseover=\"showPopHelpClose('" + inp + "')\"><img src='/" + dbpath + "/info.gif!openimageresource'></a>")�}��function islandsHandles() {� var changedOnce = false;� var bodyTextDiv = document.getElementById("BodyText");� var bodyText = bodyTextDiv.innerHTML;� var replVal;� var lookFor;� var islandList;� var repItems;� var scripts="";� var dims;� var playDims;� var plParts;� var highLightClip = "";� //deal with normal HTML islands� /*� try {� var islandList = document.getElementById("ISLANDS").innerHTML;� if (islandList != "") { � islandsItems = islandList.split( "#" ); � for (i=0;i<islandsItems.length; i++) {� lookFor = "#ISLAND:" + islandsItems[i] + "#";� replVal = document.getElementById("ISLAND:" + islandsItems[i]).innerHTML;� if (replVal != "") changedOnce = true;� bodyText = bodyText.replace( lookFor, replVal) ;� }� }� }� catch (e) {}� */� //deal with video islands� /*try {� var islandList = document.getElementById("VIDEOISLANDS").innerHTML;� if (islandList != "") { � islandsItems = islandList.split( "#" );� for (i=0;i<islandsItems.length; i++) {� lookFor = "#VIDEO:" + islandsItems[i] + "#";� repItems = document.getElementById("VIDEO:" + islandsItems[i]).innerHTML;� � dims = "";
1� if (xmlItem(repItems, "w")!= "") dims = "width:" + xmlItem(repItems, "w") + "px;height:" + xmlItem(repItems, "h") + "px;";� � replVal = "<div id='player_i" + i + "' class='vid-islands' href='" + xmlItem(repItems, "clip") + "' style='background-image:url(\"" + xmlItem(repItems, "atta") + "\");background-size: 100%;" + dims + "'>"; � try {� playDims = 78;� playDims = parseInt(xmlItem(repItems, "h")) / 4;� playDims = (playDims > 78) ? 78 : playDims;� playDims = (playDims < 20) ? 20 : playDims;� }� catch (e){}� replVal += "<img src='" + xmlItem(repItems, "p") + "' style='width:" + playDims + "px;padding-left:" + ((parseInt(xmlItem(repItems, "w"))-playDims)/2) + "px;padding-top:" + ((parseInt(xmlItem(repItems, "h"))-playDims)/2) + "px;'></div>";� � replVal += "<script>flowplayer('player_i" + i + "',{src:'/flowplayer/flowplayer.swf', wmode: 'opaque'}, {";� replVal += "clip:{autoPlay: true, autoBuffering: true, eventCategory: '" + xmlItem(repItems, "clipcode") + "' }, plugins: {";� if ( xmlItem(repItems, "ga")!= "") replVal += "gatracker: { url: 'flowplayer.analytics.swf', events: { all: true }, debug: false, accountId: '" + xmlItem(repItems, "ga") + "'}"� replVal += "}, " + xmlItem(repItems, "ops") + " }).ipad();</script>";� � changedOnce = true;� bodyText = bodyText.replace( lookFor, replVal) ;� }� }� }� catch (e) {} */� � //deal with play list� try {� var plParams = document.getElementById("pl-params").innerHTML;� if (plParams != "") {� var PL = xmlItem(plParams, "plist");� plParts = PL.split(":");� highLightClip = vidSel_lastClicked(plParts[0]);� if (highLightClip != "") vidSel_remember(highLightClip, plParts[0]);� }�� }
1� catch (e) {}� � if (changedOnce) {� insertAndExecute("BodyText", bodyText);� � }� bodyTextDiv.style.visibility = ""; //clear to display�}�function srchVidsTop(obj) {� var dbpath = document.getElementById("dbpath").innerHTML;� if (obj.value != "") location.href = "/" + dbpath + "/srchvids?openform&srch=" + obj.value;�}�/* =========================== handling a search box =================================== */�var defaultSearchStr = "Enter keywords"; �function enterSrchFld( obj ){ � if (obj.value == defaultSearchStr) obj.value="" �} ��function exitSrchFld(obj) { � //If user exits test for blank field � if (obj.value == "") obj.value = defaultSearchStr �}��function checkSrchFld(obj) { � var vSrchfld = obj.value; � if (vSrchfld == '' | vSrchfld == defaultSearchStr ) { � alert('Please enter a valid search query'); � obj.focus(); � return false; � } � return true;�}�function srchSiteTop(obj) {� var dbpath = document.getElementById("dbpath").innerHTML;� if (obj.value != "") location.href = "/" + dbpath + "/srchsite?openform&srch=" + obj.value;�}�function makeNiceURLs() {� //this routine relies on a hidden html span called url-conversion� try {� //alert("making nice")� var ucs = document.getElementById("url-conversion").innerHTML;� ucs = ucs.toLowerCase();� var OPEN_DOC = "opendocument";� var hrf;� var lst;� if (ucs != "@") {� lst = strLeft( ucs, "@")� var urlSource = lst.split( "#" );� lst = strRight( ucs, "@")� var urlTarget = lst.split( "#" );� var allLinks = document.links;� for (var i=0; i<allLinks.length; i++) {� hrf = allLinks[i].href.toLowerCase();� if (hrf.indexOf("javascript") == -1) { //do not change links with javascript� for (j=0;j<urlSource.length; j++) hrf = hrf.replace(urlSource[j], urlTarget[j]);� if (hrf.indexOf(OPEN_DOC) > -1 && strRight(hrf, OPEN_DOC) == "") {� hrf = strLeft( hrf, OPEN_DOC);� backStr = Right(hrf, 1);� if (backStr == "!" || backStr == "?" )� hrf = Left(hrf, hrf.length-1);� else {� backStr = Right(hrf, 3);� if (Left(backStr, 1)=="%") hrf = Left(hrf, hrf.length-3);� }� }� allLinks[i].href = hrf;� }� }� }� }� catch (e) {}�}�function urlOpenObject( url ) {� storage = window.sessionStorage;� var prefJump = "";� if (storage != null) {� url = url.toLowerCase();� var navObject = rightBack( url, "/" )� if (navObject.indexOf("?") > -1) navObject = strLeft( navObject, "?");� if (navObject.indexOf("!") > -1) navObject = strLeft( navObject, "!");� //alert(navObject)� if (storage[navObject] != null && storage[navObject] != "") prefJump = storage[navObject];� }� location.href = (prefJump) != "" ? prefJump : url;�}�function xmlItem( xml, itemName) {� return strLeft(strRight(xml, "<" + itemName + ">"), "</" + itemName + ">");�}�function insertAndExecute(id, markup) {� var sOld, sNew, scripts;� var s;� var el = document.getElementById(id);� if (el) {� s = document.createElement('script');� el.innerHTML = markup;� scripts = el.getElementsByTagName('script');�� for (var i=0, iLen=scripts.length; i<iLen; i++) {� sOld = scripts[i];� sNew = s.cloneNode(true);� sNew.type = sOld.type;�� if (sOld.src) {� sNew.src = sOld.src;� } else {� sNew.text = sOld.text;� }� sOld.parentNode.replaceChild(sNew, sOld);� }� }�}��function bTypeClass() {� // Loads all possible parameters of the used browser and platform used� var agent = navigator.userAgent.toLowerCase();� this.major = parseInt(navigator.appVersion);� this.minor = parseFloat(navigator.appVersion);�� this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));� this.ns2 = (this.ns && (this.major == 3));� this.ns3 = (this.ns && (this.major == 3));� this.ns4b = (this.ns && (this.minor < 4.04));� this.ns4 = (this.ns && (this.major >= 4));� this.ie = (agent.indexOf("msie") != -1);� this.ie3 = (this.ie && (this.major == 2));� this.ie4 = (this.ie && (this.major = 4));� this.ie5 = (this.ie && (this.major >= 5));� this.op3 = (agent.indexOf("opera") != -1);� this.win = (agent.indexOf("win")!=-1);� this.mac = (agent.indexOf("mac")!=-1);� this.unix = (agent.indexOf("x11")!=-1);� this.firefox = (agent.indexOf("firefox")!=-1);� this.safari = (agent.indexOf("safari")!=-1);� }�function setDOM(){� // this function loads the variables, to build up the DOM� // layers and images are approached differently, depending on the type of browser� if(bType.firefox || bType.s
1afari) {� doc = "document.all";� sty = ".style";� htm = ".document"}� else if(bType.ns4) {� doc = "document";� sty = "";� htm = ".document"} � else if(bType.ie4) {� doc = "document.all";� sty = ".style";� htm = ""}� else {� doc = "document.all";� sty = ".style";� htm = ".document"} � � }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.