1 2 function MM_findObj(n, d) 3 { //v4.01 4 5 try 6 { 7 var p,i,x; 8 9 if(!d) 10 { 11 d=document; 12 } 13 14 if((p=n.indexOf("?"))>0&&parent.frames.length) 15 { 16 d=parent.frames[n.substring(p+1)].document; 17 n=n.substring(0,p); 18 } 19 20 if(!(x=d[n])&&d.all) x=d.all[n]; 21 22 for (i=0;!x&&i<d.forms.length;i++) 23 { 24 x=d.forms[i][n]; 25 } 26 27 for(i=0;!x&&d.layers&&i<d.layers.length;i++) 28 { 29 x=MM_findObj(n,d.layers[i].document); 30 } 31 32 if(!x && d.getElementById) x=d.getElementById(n); return x; 33 } 34 catch (err) //if this fails try jquery 35 { 36 return jQuery('#' + n); 37 } 38 39 } 40 41 function findObj(objId) 42 { 43 return MM_findObj(objId); 44 } 45 46 function toggleDropDown(checkBox,dropDownList,submitButton) 47 { 48 var mySubmitButton = $(submitButton); 49 var myDropDownList = $(dropDownList); 50 51 if(checkBox.checked) 52 { 53 myDropDownList.value = 1; 54 mySubmitButton.style.display = "inline"; 55 } 56 else 57 { 58 myDropDownList.value = 0; 59 mySubmitButton.style.display = "none"; 60 } 61 } 62 63 function toggleCheckBox(dropDownList,checkBox,submitButton) 64 { 65 var mySubmitButton = $(submitButton); 66 var myCheckBox = $(checkBox); 67 if(dropDownList.value < 1) 68 { 69 myCheckBox.checked = false; 70 mySubmitButton.style.display = "none"; 71 } 72 else 73 { 74 myCheckBox.checked = true; 75 mySubmitButton.style.display = "inline"; 76 } 77 } 78 79 //to disable the submit button 80 var firstClick; 81 firstClick = true; 82 function savedisable(btnObj, requestApplicationPath) 83 { 84 Page_ClientValidate(); //validate now 85 86 if(Page_IsValid) 87 { 88 if (firstClick) 89 { 90 //btnObj.value = "Searching..."; 91 92 //add the spinner 93 var spinner = new Image(); 94 spinner.src = requestApplicationPath+"/images/wait/spinner_red_yellow.gif"; 95 $('spinnerHolder').appendChild(spinner); 96 97 firstClick = false; //it's not the first click any more! 98 } 99 else 100 { 101 alert('Your request has been submited, please wait.'); 102 btnObj.disabled=true; 103 } 104 } 105 } 106 107 function expand() { 108 //for(x = 0; x < 50; x+5) { 109 // window.moveTo(screen.availWidth * -(x - 50) / 100, screen.availHeight * -(x - 50) / 100); 110 // window.resizeTo(screen.availWidth * x / 50, screen.availHeight * x / 50); 111 //} 112 //window.moveTo(0,0); 113 //window.resizeTo(screen.availWidth, screen.availHeight); 114 } 115 116 function addEvent(elm, evType, fn, useCapture) { 117 if (elm.addEventListener) { 118 elm.addEventListener(evType, fn, useCapture); 119 return true; 120 } 121 else if (elm.attachEvent) { 122 var r = elm.attachEvent('on' + evType, fn); 123 return r; 124 } 125 else { 126 elm['on' + evType] = fn; 127 } 128 } 129 130 function addLoadEvent(func) { 131 var oldonload = window.onload; 132 if (typeof window.onload != 'function') { 133 window.onload = func; 134 } else { 135 window.onload = function() { 136 if (oldonload) { 137 oldonload(); 138 } 139 func(); 140 } 141 } 142 } 143 144 function getElementsByClass(searchClass,node,tag) { 145 var classElements = new Array(); 146 if ( node == null ) 147 node = document; 148 if ( tag == null ) 149 tag = '*'; 150 var els = node.getElementsByTagName(tag); 151 var elsLen = els.length; 152 var pattern = new RegExp('(^|\\s)'+searchClass+'(\\s|$)'); 153 for (i = 0, j = 0; i < elsLen; i++) { 154 if ( pattern.test(els[i].className) ) { 155 classElements[j] = els[i]; 156 j++; 157 } 158 } 159 return classElements; 160 } 161 162 function toggle(obj) { 163 var el = document.getElementById(obj); 164 if ( el.style.display != 'none' ) { 165 el.style.display = 'none'; 166 } 167 else { 168 el.style.display = ''; 169 } 170 } 171 172 function insertAfter(parent, node, referenceNode) { 173 parent.insertBefore(node, referenceNode.nextSibling); 174 } 175 176 Array.prototype.inArray = function (value) { 177 var i; 178 for (i=0; i < this.length; i++) { 179 if (this[i] === value) { 180 return true; 181 } 182 } 183 return false; 184 }; 185 186 function $() { 187 var elements = new Array(); 188 for (var i = 0; i < arguments.length; i++) { 189 var element = arguments[i]; 190 if (typeof element == 'string') 191 element = document.getElementById(element); 192 if (arguments.length == 1) 193 return element; 194 elements.push(element); 195 } 196 return elements; 197 } 198 199 function flvFPW1(){ 200 var v1=arguments,v2=v1[2].split(","),v3=(v1.length>3)?v1[3]:false,v4=(v1.length>4)?parseInt(v1[4]):0,v5=(v1.length>5)?parseInt(v1[5]):0,v6,v7=0,v8,v9,v10,v11,v12,v13,v14,v15,v16;v11=new Array("width,left,"+v4,"height,top,"+v5);for (i=0;i<v11.length;i++){v12=v11[i].split(",");l_iTarget=parseInt(v12[2]);if (l_iTarget>1||v1[2].indexOf("%")>-1){v13=eval("screen."+v12[0]);for (v6=0;v6<v2.length;v6++){v10=v2[v6].split("=");if (v10[0]==v12[0]){v14=parseInt(v10[1]);if (v10[1].indexOf("%")>-1){v14=(v14/100)*v13;v2[v6]=v12[0]+"="+v14;}}if (v10[0]==v12[1]){v16=parseInt(v10[1]);v15=v6;}}if (l_iTarget==2){v7=(v13-v14)/2;v15=v2.length;}else if (l_iTarget==3){v7=v13-v14-v16;}v2[v15]=v12[1]+"="+v7;}}v8=v2.join(",");v9=window.open(v1[0],v1[1],v8);if (v3){v9.focus();}document.MM_returnValue=false;return v9; 201 } 202 203 function hideElementByClass(className) 204 { 205 var objArray = new Array(); 206 objArray = getElementsByClass(className, null, null); 207 objArray[0].style.display = "none"; 208 } 209 210 function showElementByClass(className) 211 { 212 var objArray = new Array(); 213 objArray = getElementsByClass(className, null, null); 214 objArray[0].style.display = "block"; 215 } 216 217 function getElementByClass(className) 218 { 219 var objArray = new Array(); 220 objArray = getElementsByClass(className, null, null); 221 return objArray[0]; 222 } 223 224 //alert("shared" + location.href); 225 226 /*-------------------------Bubble ToolTips----------------------------------*/ 227 function showToolTip(e,text){ 228 229 //alert('showToolTip'); 230 231 if(document.all)e = event; 232 233 var obj = document.getElementById('bubble_tooltip'); 234 var obj2 = document.getElementById('bubble_tooltip_content'); 235 obj2.innerHTML = text; 236 obj.style.display = 'block'; 237 var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop); 238 if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; 239 var leftPos = e.clientX - 100; 240 if(leftPos<0)leftPos = 0; 241 obj.style.left = leftPos + 'px'; 242 obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px'; 243 } 244 245 function hideToolTip() 246 { 247 document.getElementById('bubble_tooltip').style.display = 'none'; 248 } 249 /*-------------------------End Bubble ToolTips-----------------------------*/ 250 251 function showImageEditButtons(clientId) 252 { 253 findObj(clientId).style.display = "block"; 254 } 255 256 function hideImageEditButtons(clientId) 257 { 258 findObj(clientId).style.display = "none"; 259 } 260 261 function showClientObj(clientId) 262 { 263 //alert(clientId); 264 if(findObj(clientId).style.display == "none" || findObj(clientId).style.display == "") 265 { 266 findObj(clientId).style.display = "inline"; 267 } 268 else 269 { 270 findObj(clientId).style.display = "none"; 271 } 272 return false; 273 } 274 275 function hideClientObj(clientId) 276 { 277 findObj(clientId).style.display = "none"; 278 return false; 279 } 280 281 function toggleStyle(objClass, styleName, styleValue) 282 { 283 obj = getElementByClass(objClass); 284 eval("obj.style." + styleName + "='" + styleValue + "'"); 285 } 286 287 function setDropDownValueByClass(cssClass, aValue) 288 { 289 var objDropDown = getElementByClass(cssClass); 290 for (i = 0; i < objDropDown.length; i++) { 291 if (objDropDown[i].value == aValue) { 292 objDropDown[i].selected = true; 293 } 294 } 295 } 296 297 function highlight(field) 298 { 299 field.focus(); 300 field.select(); 301 } 302 303 function demoMatchClick(str, pattern) { 304 var re = new RegExp(pattern); 305 if (str.match(re)) { 306 alert("Successful match"); 307 } else { 308 alert("No match"); 309 } 310} 311 312function getSubstring(str, pattern, matchIndex) { 313 314 str = str.toLowerCase(); 315 316 var re = new RegExp(pattern); 317 318 var m = re.exec(str); 319 320 if (m == null) { 321 return 0; 322 } else { 323 var s = "Match at position " + m.index + ":\n"; 324 for (i = 0; i < m.length; i++) { 325 s = s + m[i] + "\n"; 326 } 327 return m[matchIndex]; 328 } 329} 330 331function revealModal(divID) 332{ 333 window.onscroll = function () { document.getElementById(divID).style.top = document.body.scrollTop; }; 334 document.getElementById(divID).style.display = "block"; 335 document.getElementById(divID).style.top = document.body.scrollTop; 336} 337 338function hideModal(divID) 339{ 340 document.getElementById(divID).style.display = "none"; 341} 342 343function getTrackingPage() 344{ 345 346} 347 348function trackEvent(category, eventName, eventDescription) 349{ 350 if(window.location.host == "localhost") 351 { 352 var str = "Category: " + category; 353 str += "EventName: " + eventName; 354 str += "EventDescription: " + eventDescription + " - " + window.location.pathname; 355 //alert(str); 356 } 357 else //check if site has Analytics include 358 { 359 if (typeof pageTracker != 'undefined') 360 { 361 pageTracker._trackEvent(category, eventName, eventDescription + " - " + window.location.pathname); 362 } 363 } 364} 365 366function rgbToHex(rgbString) // converts RGB to hex 367{ 368 //var rgbString = "rgb(0, 70, 255)"; // get this in whatever way. 369 var parts = rgbString 370 .match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/) 371 ; 372 // parts now should be ["rgb(0, 70, 255", "0", "70", "255"] 373 374 delete (parts[0]); 375 for (var i = 1; i <= 3; ++i) { 376 parts[i] = parseInt(parts[i]).toString(16); 377 if (parts[i].length == 1) parts[i] = '0' + parts[i];
378 } 379 var hexString = parts.join(''); // "0070ff" 380 return hexString; 381} 382 383 384function hideFrame() { 385 386 doDialog('siternityimagelibrary'); 387 388 389 jQuery('a#aToggleDockHosting.dockclose').css("display", "block"); 390 jQuery('a#aToggleDock.dockclose').css("display", "block"); 391 jQuery('a#button-tools').css("display", "block"); 392 393 jQuery('#divFrame').css("display", "none"); 394 document.getElementById("frmMain").src = GetWebsiteRoot() + '/_secure/_central/body/blankFrame.htm'; 395} 396 397function hideFrame_CK() { 398 399 //alert("hideFrame_CK"); 400 401 doDialog_CK('siternityimagelibrary'); //refresh the plugin 402 403 404 jQuery('a#aToggleDockHosting.dockclose').css("display", "block"); 405 jQuery('a#aToggleDock.dockclose').css("display", "block"); 406 jQuery('a#button-tools').css("display", "block"); 407 408 jQuery('#divFrame').css("display", "none"); 409 document.getElementById("frmMain").src = GetWebsiteRoot() + '/_secure/_central/body/blankFrame.htm'; 410 411 return true; 412 413} 414 415function doDialog_CK(commandName) 416{ 417 //alert("doDialog: " + commandName); 418 419 for ( var i in CKEDITOR.instances ){ 420 var currentInstance = i; 421 break; 422 } 423 var oEditor = CKEDITOR.instances[currentInstance]; 424 425 //var editorObj = eval("CKEDITOR.instances." + editorName); 426 //alert("Editor Obj:" + oEditor); 427 //editorObj.fire( 'siternityimagelibrary',''); 428 oEditor.execCommand(commandName); 429} 430 431 432function showFrame(url) 433{ 434 435 jQuery('a#aToggleDockHosting.dockclose').css("display", "none"); 436 jQuery('a#aToggleDock.dockclose').css("display", "none"); 437 jQuery('a#button-tools').css("display", "none"); 438 439 //iframe in div to end of body to keep outside yahoo grids 440 if(!(jQuery('#divFrame').length>0)) 441 { 442 var strHtml = ""; 443 444 strHtml +="\n<div id=\"divFrame\" style=\"display:none;width:99%; height:3000px;border:0px solid red;\">\n"; 445 strHtml +="\n<iframe id=\"frmMain\" name=\"frmCrop\" frameborder=\"0\" height=\"100%\" width=\"100%\" "; 446 strHtml +="src=\"" + GetWebsiteRoot() + "/_secure/_central/body/blankFrame.htm\">\n</iframe>\n"; 447 strHtml +="\n</div>"; 448 449 jQuery('body').append(strHtml); 450 } 451 452 //alert("appended"); 453 454 jQuery('#divFrame').css("display", "block"); 455 456 jQuery('#divFrame').css("position", "absolute"); 457 458 jQuery('#divFrame').css("background-color", "#FFFFFF"); 459 460 jQuery('#divFrame').css("top", "0px"); 461 462 jQuery('#divFrame').css("left", "0px"); 463 464 jQuery('#divFrame').css("width", "100%"); 465 466 467 jQuery('#divFrame').css("height", "1400px"); 468 469 jQuery('#divFrame').css("zIndex", "9999999999999999999999999999999999999999"); 470 471 jQuery('#divFrame').css("margin", "0px"); 472 473 jQuery('#divFrame').parent().css("overflow",""); 474 jQuery('#divFrame').parent().parent().css("overflow",""); 475 476 document.getElementById("frmMain").src = url; 477 478 //alert("appended 2"); 479} 480 481function GetLocalhostVirtualDirectory() 482{ 483 var url = window.location.href; 484 if(url.indexOf("localhost") > -1) 485 { 486 487 var reg = new RegExp("\/localhost\/([a-zA-Z-_.]*)"); 488 var ar = reg.exec(url); 489 var vDir = ar[1]; 490 if(vDir.indexOf("_secure") > -1) 491 { 492 return ""; 493 } 494 else 495 { 496 return ar[1]; 497 } 498 499 } 500 else 501 { 502 return ""; 503 } 504} 505 506function GetWebsiteRoot() 507{ 508 var url = window.location.href; 509 510 var root = ""; 511 512 if(url.indexOf("localhost") > -1) 513 { 514 root = ""; //"/" + GetLocalhostVirtualDirectory(); 515 } 516 else 517 { 518 root = "" ; 519 } 520 //alert(root); 521 return root; 522} 523 524 525 526/***********To Allow Users turn html table borders on and off using editor plug-in************/ 527 528/* 529Ioan 25 Sept 2015 530removed as this is adding an border inline style on all tables even when client sets no border from the editor 531not sure why this was added in the first place - but i've commented for now to make sure nothing else breaks 532 533if(typeof(jQuery) != 'undefined') 534{ 535 536 jQuery(document).ready(function () { 537 538 if (jQuery("table").attr("border") == "0" || jQuery("table").attr("border") == "") { 539 jQuery("td").css("border-width", "0px"); 540 jQuery("table").css("border-width", "0px"); 541 } 542 else { 543 544 jQuery("td").css("border-top", "0px solid #C0C0C0"); 545 jQuery("td").css("border-right", "0px solid #C0C0C0"); 546 jQuery("td").css("border-bottom", "1px solid #C0C0C0"); 547 jQuery("td").css("border-left", "1px solid #C0C0C0"); 548 jQuery("td").css("border-collapse", "collapse"); 549 550 jQuery("table").css("border", "1px solid #C0C0C0"); 551 jQuery("table").css("border-collapse", "collapse"); 552 553 554 } 555 556 });
557}*/
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.