1String.prototype.trim = function() { 2 return this.replace(/^\s+|\s+$/g,""); 3} 4String.prototype.ltrim = function() { 5 return this.replace(/^\s+/,""); 6} 7String.prototype.rtrim = function() { 8 return this.replace(/\s+$/,""); 9} 10 11function sayHi( ) { 12 alert('hi there'); 13} 14 15function enableFormElement(theForm, theElementName) { 16 theForm.elements[theElementName].disabled = false; 17} 18function disableFormElement(theForm, theElementName) { 19 theForm.elements[theElementName].disabled = true; 20} 21 22function getParameter ( queryString, parameterName ) { 23 // Add "=" to the parameter name (i.e. parameterName=value) 24 var parameterName = parameterName + "="; 25 if ( queryString.length > 0 ) { 26 // Find the beginning of the string 27 begin = queryString.indexOf ( parameterName ); 28 // If the parameter name is not found, skip it, otherwise return the value 29 if ( begin != -1 ) { 30 // Add the length (integer) to the beginning 31 begin += parameterName.length; 32 // Multiple parameters are separated by the "&" sign 33 end = queryString.indexOf ( "&" , begin ); 34 if ( end == -1 ) { 35 end = queryString.length 36 } 37 // Return the string 38 return unescape ( queryString.substring ( begin, end ) ); 39 } 40 // Return "null" if no parameter has been found 41 return "null"; 42 } 43} 44 45 46function getRequestParameter( name ) { 47 var retval = ""; 48 name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 49 var regexS = "[\\?&]"+name+"=([^&#]*)"; 50 var regex = new RegExp( regexS ); 51 var results = regex.exec( window.location.href ); 52 if( results != null ) 53 retval = results[1]; 54 return retval; 55} 56 57function makeRadioSelection(radioFormName, radioName, radioValue) { 58 radioForm = document.forms[radioFormName]; 59 var radioEltList = radioForm.elements[radioName]; 60 for (i=0; i<radioEltList.length; i++) { 61 if (radioEltList[i].value == radioValue) { 62 radioEltList[i].checked=true; 63 } else { 64 radioEltList[i].checked=false; 65 } 66 } 67} 68 69function setElementToColorById(eltId, colorName) { 70 var elt = document.getElementById(elementId); 71 elt.style.color = colorName; 72} 73 74function ensureLocation(locationRoot, locationSuffix) { 75 if (document.location.href.indexOf(locationRoot) == -1) { 76 document.location.href= locationRoot + locationSuffix; 77 } else { 78 } 79} 80 81function showHideById(idToShow, idToHide) { 82 document.getElementById(idToShow).style.display = "block"; 83 document.getElementById(idToHide).style.display = "none"; 84} 85 86function showById(idToShow) { 87 document.getElementById(idToShow).style.display = "block"; 88} 89 90function hideById(idToHide) { 91 document.getElementById(idToHide).style.display = "none"; 92} 93 94function hideByNameShowById(idToShow, nameToHide, tagNameOfHidden, directParentId) { 95 // What's needed for IE (no effect in Firefox) 96 var mainDiv = document.getElementById(directParentId); 97 var allReportSelectorsForIE = mainDiv.getElementsByTagName(tagNameOfHidden); 98 for (i=0; i<allReportSelectorsForIE.length; i++) { 99 if (allReportSelectorsForIE[i].name == nameToHide) { 100 allReportSelectorsForIE[i].style.display = "none"; 101 } 102 } 103 104 // What's needed for Firefox (no effect in ie) 105 var allReportSelectorsForFirefox = document.getElementsByName(nameToHide); 106 for (i=0; i<allReportSelectorsForFirefox.length; i++) { 107 allReportSelectorsForFirefox[i].style.display = "none"; 108 } 109 110 // Show div to show 111 var divToShow = document.getElementById(idToShow); 112 if (divToShow) { 113 divToShow.style.display = "block"; 114 } 115 return divToShow; 116} 117 118function checkAll(field) { 119 for (i = 0; i < field.length; i++) { 120 field[i].checked = true ; 121 } 122} 123function uncheckAll(field) { 124 if (field.length) { 125 for (i = 0; i < field.length; i++) { 126 field[i].checked = false ; 127 } 128 } 129} 130 131function openQuicklinksInNewWindow(absolutePathPart) { 132 var myWindow = window.open(absolutePathPart + "contentTiles/quickLinks.jsp", "quicklinks", "TOP=50,LEFT=50,WIDTH=600,HEIGHT=500"); 133 myWindow.focus(); 134} 135 136function openInTallNarrowWindow(href, windowname) { 137 var myWindow = window.open(href, windowname, "location=yes,TOP=50,LEFT=50,WIDTH=670,HEIGHT=1000,scrollbars=yes,resizable=yes"); 138 myWindow.focus(); 139} 140 141function openInRegularSizeWindow(href, windowname) { 142 var myWindow = window.open(href, windowname, "location=yes,TOP=50,LEFT=50,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes"); 143 myWindow.focus(); 144} 145 146function openInNewWindow(href, windowname) { 147 var myWindow = window.open(href, windowname, "location=yes,TOP=50,LEFT=50,WIDTH=670,HEIGHT=600,scrollbars=yes,resizable=yes"); 148 myWindow.focus(); 149} 150 151function openTrackingWindow(href) { 152 var myWindow = window.open(href, "trackingWindow", "TOP=50,LEFT=50,WIDTH=800,HEIGHT=600,resizable=yes,scrollbars=yes,location=yes"); 153 myWindow.focus(); 154} 155 156function openAttachmentWindow(href) { 157 var myWindow = window.open(href, "attachments", "TOP=50,LEFT=50,WIDTH=600,HEIGHT=500,resizable=yes,scrollbars=yes"); 158 myWindow.focus(); 159} 160 161function openShipMemo(id, profileId) { 162 location.replace("editCurrentProfileContactInfo.do?profileId=" + profileId + "&action=load"); 163 popShipMemo(id); 164} 165 166function popShipMemo(id) { 167 window.open('loadSupportTransaction.do?itemId=' + id, 168 "shipmemo", 169 "location=yes,TOP=50,LEFT=50,WIDTH=670,HEIGHT=600,scrollbars=yes,resizable=yes"); 170} 171 172function editSupportNote(id, profileId) { 173 location.replace("processSupportTransaction.do?action=load&profileId=" + profileId + "&id=" + id + "#" + id); 174 window.open('loadSupportTransaction.do?itemId=' + id, 175 "editsupportnote", 176 "location=yes,TOP=50,LEFT=50,WIDTH=875,HEIGHT=900,scrollbars=yes,resizable=yes"); 177} 178 179 180function confirmProfileIdChange() { 181 return confirm("Are you really want to change the profile id for this note? This function is only for advanced users."); 182} 183 184 185function confirmTicketIdChange() { 186 return confirm("Are you really want to change the ticket id for this note? This function is only for advanced users."); 187} 188 189//used for notes in the support center 190function initNotes(client) { 191 try { 192 var note = document.getElementById("noteStatus"); 193 if (note) { 194 if (document.cookie.indexOf(client+"noteIsOpen=yes")!=-1) { 195 document.getElementById("noteStatus").innerHTML = "A support note is currently open." 196 } else { 197 document.getElementById("noteStatus").innerHTML = " " 198 } 199 } 200 } 201 catch(err) { } 202} 203 204function newTestMessage(client, profileId, absolutePathPart) { 205 newSupportNote("entryType=test_email_functionality&profileId=" + profileId, client, absolutePathPart); 206} 207function newTranscription(contactMethod, client, profileId) { 208 newSupportNote("entryType=transcription&contactMethod=" + contactMethod + "&profileId=" + profileId, client); 209} 210function newNote(client, profileId) { 211 newSupportNote("entryType=support_note&profileId=" + profileId, client); 212} 213function newEmail(client, profileId) { 214 newSupportNote("entryType=initial_email&profileId=" + profileId, client); 215} 216function newShippingMemo(client, profileId) { 217 newSupportNote("entryType=shipping_memo&profileId=" + profileId, client); 218} 219function newFreightConfirmation(client, profileId) { 220 newSupportNote("entryType=freight_confirmation&profileId=" + profileId, client); 221} 222function newPurchaseOrder(client, profileId) { 223 newSupportNote("entryType=purchase_order&profileId=" + profileId, client); 224}
225function newSupportNote(additionalParameters, client, absolutePathPart) { 226// netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 227// alert("enable priviledge"); 228// const windowMediatorIID = Components.interfaces.nsIWindowMediator; 229// const windowMediator = Components.classes 230// ["@mozilla.org/appshell/window-mediator;1"].getService(windowMediatorIID) 231// const topWin = windowMediator.getMostRecentWindow("navigator:browser") 232// topWin.getBrowser().addTab("addSupportTransaction.do?forward=popup&" + additionalParameters) 233 234// netscape.security.PrivilegeManager.disablePrivilege("UniversalXPConnect") 235 236 if (!absolutePathPart) absolutePathPart = ""; 237 var isOpenCookie = document.cookie.indexOf(client + "noteIsOpen=yes"); 238 if (isOpenCookie!=-1) { 239 alert("You already have a note open! You will need to save it or close it before you can open a new note."); 240 } else { 241 var windowName = client + "note"; 242 var myWindow = 243 window.open(absolutePathPart + "addSupportTransaction.do?" + additionalParameters, 244 windowName, 245 "location=yes,TOP=50,LEFT=50,WIDTH=875,scrollbars=yes,resizable=yes"); 246 myWindow.focus(); 247 } 248} 249//used for notes in the support center 250function openNote(isNewProfile, client) { 251 var isOpenCookie = client + "noteIsOpen=yes"; 252 document.cookie=isOpenCookie; 253 opener.document.getElementById("noteStatus").innerHTML = "A support note is currently open."; 254 if (isNewProfile) { 255 opener.document.location.reload(); 256 } 257} 258//used for notes in the support center 259function closeNote(client) { 260 document.cookie=client + "noteIsOpen=no"; 261 opener.document.getElementById("noteStatus").innerHTML = " "; 262} 263 264//init the note...check message type et al 265function initMe(isNewProfile, client) { 266 openNote(isNewProfile, client); 267 checkMessageType(); 268 checkOk4Public(); 269} 270//checks the type of note (email or internal) 271function checkMessageType() { 272 if (document.getElementById("messageType") != null) { 273 if (document.getElementById("messageType").checked) { 274 document.getElementById("messTypeCue").innerHTML = "<img src='images/mail-out.gif' width='48' height='48' alt='Outbound Web Communication'>"; 275 document.getElementById("thisIsEmail").style.display = "block"; 276 document.getElementById("ok4public").checked = false; 277 document.getElementById("ok4public").disabled = false; 278 document.getElementById("submit").disabled = true; 279 } else { 280 document.getElementById("messTypeCue").innerHTML = "<img src='images/internalNote.gif' width='48' height='48' alt='Internal Note'>"; 281 document.getElementById("thisIsEmail").style.display = "none"; 282 document.getElementById("submit").disabled = false; 283 } 284 } 285} 286//checks if the agent has marked this note as ok for public 287function checkOk4Public() { 288 if (document.getElementById("ok4public").checked) { 289 document.getElementById("submit").disabled = false; 290 } else { 291 document.getElementById("submit").disabled = true; 292 } 293 294// alert("check ok for public"); 295/* 296 if (document.getElementById("messageType") != null) { 297 if (document.getElementById("messageType").checked) { 298 if (document.getElementById("ok4public").checked) { 299 document.getElementById("submit").disabled = false; 300 } else { 301 document.getElementById("submit").disabled = true; 302 } 303 } else { 304 document.getElementById("submit").disabled = false; 305 } 306 } */ 307// alert("done check ok for public"); 308} 309 310/* determine if old/new user, populate username if cookie exists */ 311/* 312function init() { 313 getView(); 314 loadUsername(); 315} 316*/ 317 318function loadUsername() { 319 if (getCookie("username") != null) { 320 document.getElementById("username").value = getCookie("username"); 321 document.getElementById("password").focus(); 322 } else { 323 document.getElementById("username").focus(); 324 } 325} 326 327function saveUsername(theForm) { 328 alert("saving username: " + theForm.username.value); 329 var expires = new Date(); 330 expires.setTime(expires.getTime() + 24 * 30 * 60 * 60 * 1000); // sets it for approx 30 days. 331 setCookie("username",theForm.username.value,expires,"/"); 332} 333 334function showNew() { 335 var oldUser = document.getElementById('old'); 336 var newUser = document.getElementById('new'); 337 var newRadio = document.getElementById('newRadio'); 338 var isNewUser = document.getElementById('isNewUser'); 339 340 oldUser.style.display='none'; 341 newUser.style.display='block'; 342 isNewUser.value = 'true'; 343 newRadio.checked = true; 344 //alert("isNewUser: "+isNewUser.value); 345} 346 347function showOld() { 348 var oldUser = document.getElementById('old'); 349 var newUser = document.getElementById('new'); 350 var isNewUser = document.getElementById('isNewUser'); 351 var oldRadio = document.getElementById('oldRadio'); 352 353 oldRadio.checked = true; 354 oldUser.style.display='block'; 355 newUser.style.display='none'; 356 isNewUser.value = 'false'; 357 //alert("isNewUser: "+isNewUser.value); 358} 359 360function emailPassword() { 361 var sendEmail = document.getElementById('sendEmailId'); 362 var password1 = document.getElementById('password1'); 363 var password2 = document.getElementById('password2'); 364 var password = document.getElementById('password'); 365 sendEmail.value='true'; 366 password1 = ''; 367 password2 = ''; 368 password3 = ''; 369 document.loginForm.submit() 370} 371 372function checkEnterNew(event){ 373 NS4 = (document.layers) ? true : false; var code = 0; 374 if (NS4) { 375 code = event.which; 376 } else { 377 code = event.keyCode; 378 if (code==13) { 379 clonePassword(); 380 document.loginForm.submit(); 381 } 382 } 383} 384 385function checkEnterOld(event){ 386 NS4 = (document.layers) ? true : false; var code = 0; 387 if (NS4) { 388 code = event.which; 389 } else { 390 code = event.keyCode; 391 if (code==13) 392 document.loginForm.submit(); 393 } 394} 395 396function getView() { 397 var password1 = document.getElementById('password1'); 398 var password2 = document.getElementById('password2'); 399 var password = document.getElementById('password'); 400 if ( password1.value.length > 0 ) { 401 password.value = ''; 402 showNew(); 403 } else if ( password2.value.lenth > 0 ) { 404 password.value = ''; 405 showNew(); 406 } else { 407 showOld(); 408 } 409} 410 411function resetNewUserPasswords() { 412 var password1 = document.getElementById('password1'); 413 var password2 = document.getElementById('password2'); 414 password1.value = ''; 415 password2.value = ''; 416} 417 418function resetOldUserPassword() { 419 var password = document.getElementById('password'); 420 password.value = ''; 421} 422 423function clonePassword() { 424 var password1 = document.getElementById('password1'); 425 var password = document.getElementById('password'); 426 password.value = password1.value; 427} 428 429function syncCCNumber() { 430 var ccNumber = document.getElementById('ccNumber'); 431 alert("ccnumber:" + ccNumber); 432 var maskedCcNumber = document.getElementById('maskedCcNumber'); 433 alert("maskedCcNumber:" + maskedCcNumber); 434 ccNumber.value = maskedCcNumber.value; 435} 436 437function checkoutCopyBillingToShipping(theForm) { 438 theForm.elements['sfname'].value = theForm.elements['fname'].value; 439 theForm.elements['slname'].value = theForm.elements['lname'].value; 440 theForm.elements['scompanyName'].value = theForm.elements['companyName'].value; 441 theForm.elements['saddr1'].value = theForm.elements['addr1'].value; 442 theForm.elements['saddr2'].value = theForm.elements['addr2'].value; 443 theForm.elements['scity'].value = theForm.elements['city'].value; 444 theForm.elements['szip'].value = theForm.elements['zip'].value; 445 theForm.elements['sstate'].value = theForm.elements['state'].value; 446 theForm.elements['sstate'].selectedIndex = theForm.elements['state'].selectedIndex; 447 theForm.elements['scountry'].value = theForm.elements['country'].value; 448 theForm.elements['scountry'].selectedIndex = theForm.elements['country'].selectedIndex; 449} 450function copyBillingToShipping(theForm) { 451// alert("copying billing to shipping"); 452 453 theForm.elements['shippingAddress.firstName'].value = theForm.elements['billingAddress.firstName'].value; 454 theForm.elements['shippingAddress.role'].value = theForm.elements['billingAddress.role'].value; 455 theForm.elements['shippingAddress.lastName'].value = theForm.elements['billingAddress.lastName'].value; 456 theForm.elements['shippingAddress.companyName'].value = theForm.elements['billingAddress.companyName'].value; 457 theForm.elements['shippingAddress.address1'].value = theForm.elements['billingAddress.address1'].value; 458 theForm.elements['shippingAddress.address2'].value = theForm.elements['billingAddress.address2'].value; 459 theForm.elements['shippingAddress.city'].value = theForm.elements['billingAddress.city'].value; 460 theForm.elements['shippingAddress.state'].value = theForm.elements['billingAddress.state'].value; 461 theForm.elements['shippingAddress.zip'].value = theForm.elements['billingAddress.zip'].value; 462 theForm.elements['shippingAddress.country'].value = theForm.elements['billingAddress.country'].value; 463 theForm.elements['shippingAddress.country'].selectedIndex = theForm.elements['billingAddress.country'].selectedIndex; 464// alert("done"); 465} 466function copyBillTo(theForm) { 467 var shipAddress1 = document.getElementById('shipAddress1'); 468 var billAddress1 = document.getElementById('billAddress1'); 469 shipAddress1.value = billAddress1.value; 470 471 var shipAddress2 = document.getElementById('shipAddress2'); 472 var billAddress2 = document.getElementById('billAddress2'); 473 shipAddress2.value = billAddress2.value; 474 475 var shipCity = document.getElementById('shipCity'); 476 var billCity = document.getElementById('billCity'); 477 shipCity.value = billCity.value; 478 479 var shipState = document.getElementById('shipState'); 480 var billState = document.getElementById('billState'); 481 shipState.value = billState.value; 482 483 var shipZip = document.getElementById('shipZip'); 484 var billZip = document.getElementById('billZip');
485 shipZip.value = billZip.value; 486 487 var shipCountry = document.getElementById('shipCountry'); 488 var billCountry = document.getElementById('billCountry'); 489 shipCountry.value = billCountry.value; 490 491 var isShipAddressChanged = document.getElementById('isShipAddressChanged'); 492 isShipAddressChanged.value = 'true'; 493 494} 495 496function emailChanged() { 497 var isEmailChanged = document.getElementById('isEmailChanged'); 498 isEmailChanged.value = 'true'; 499} 500 501function billAddressChanged() { 502 var isBillAddressChanged = document.getElementById('isBillAddressChanged'); 503 isBillAddressChanged.value = 'true'; 504} 505 506function shipAddressChanged() { 507 var isShipAddressChanged = document.getElementById('isShipAddressChanged'); 508 isShipAddressChanged.value = 'true'; 509} 510 511function paymentChanged() { 512 var isPaymentChanged = document.getElementById('isPaymentChanged'); 513 isPaymentChanged.value = 'true'; 514} 515 516function toggleBox(box) { 517 if (box.checked == true) { 518 box.checked = false; 519 } else { 520 box.checked = true; 521 } 522} 523 524function showEdit1Rows() { 525 var rows = null; 526 rows = document.getElementsByTagName("tr"); 527 for (var i = 0; i < rows.length; i++) { 528 if (!rows[i].className) { 529 continue; 530 } else { 531 if (rows[i].className == 'edit1'){ 532 rows[i].style.display = "block"; 533 } 534 if (rows[i].className == 'view1') { 535 rows[i].style.display = "none"; 536 } 537 } 538 } 539 var saveButton = document.getElementById('saveButton1'); 540 if (saveButton != null) 541 saveButton.style.display = "inline"; 542 var cancelButton = document.getElementById('cancelButton1'); 543 if (cancelButton != null) 544 cancelButton.style.display = "inline"; 545 var editButton = document.getElementById('editButton1'); 546 if (editButton != null) 547 editButton.style.display = "none"; 548} 549 550function showEdit2Rows() { 551 var rows = null; 552 rows = document.getElementsByTagName("tr"); 553 for (var i = 0; i < rows.length; i++) { 554 if (!rows[i].className) { 555 continue; 556 } else { 557 if (rows[i].className == 'edit2'){ 558 rows[i].style.display = "block"; 559 } 560 if (rows[i].className == 'view2') { 561 rows[i].style.display = "none"; 562 } 563 } 564 } 565 var saveButton = document.getElementById('saveButton2'); 566 if (saveButton != null) 567 saveButton.style.display = "inline"; 568 var cancelButton = document.getElementById('cancelButton2'); 569 if (cancelButton != null) 570 cancelButton.style.display = "inline"; 571 var editButton = document.getElementById('editButton2'); 572 if (editButton != null) 573 editButton.style.display = "none"; 574} 575function showEdit3Rows() { 576 var rows = null; 577 rows = document.getElementsByTagName("tr"); 578 for (var i = 0; i < rows.length; i++) { 579 if (!rows[i].className) { 580 continue; 581 } else { 582 if (rows[i].className == 'edit3'){ 583 rows[i].style.display = "block"; 584 } 585 if (rows[i].className == 'view3') { 586 rows[i].style.display = "none"; 587 } 588 } 589 } 590 var saveButton = document.getElementById('saveButton3'); 591 if (saveButton != null) 592 saveButton.style.display = "inline"; 593 var cancelButton = document.getElementById('cancelButton3'); 594 if (cancelButton != null) 595 cancelButton.style.display = "inline"; 596 var editButton = document.getElementById('editButton3'); 597 if (editButton != null) 598 editButton.style.display = "none"; 599} 600function showEdit4Rows() { 601 var rows = null; 602 rows = document.getElementsByTagName("tr"); 603 for (var i = 0; i < rows.length; i++) { 604 if (!rows[i].className) { 605 continue; 606 } else { 607 if (rows[i].className == 'edit4'){ 608 rows[i].style.display = "block"; 609 } 610 if (rows[i].className == 'view4') { 611 rows[i].style.display = "none"; 612 } 613 } 614 } 615 var saveButton = document.getElementById('saveButton4'); 616 if (saveButton != null) 617 saveButton.style.display = "inline"; 618 var cancelButton = document.getElementById('cancelButton4'); 619 if (cancelButton != null) 620 cancelButton.style.display = "inline"; 621 var editButton = document.getElementById('editButton4'); 622 if (editButton != null) 623 editButton.style.display = "none"; 624} 625function showEdit5Rows() { 626 var rows = null; 627 rows = document.getElementsByTagName("tr"); 628 for (var i = 0; i < rows.length; i++) { 629 if (!rows[i].className) { 630 continue; 631 } else { 632 if (rows[i].className == 'edit5'){ 633 rows[i].style.display = "block"; 634 } 635 if (rows[i].className == 'view5') { 636 rows[i].style.display = "none"; 637 } 638 } 639 } 640 var saveButton = document.getElementById('saveButton5'); 641 if (saveButton != null) 642 saveButton.style.display = "inline"; 643 var cancelButton = document.getElementById('cancelButton5'); 644 if (cancelButton != null) 645 cancelButton.style.display = "inline"; 646 var editButton = document.getElementById('editButton5'); 647 if (editButton != null) 648 editButton.style.display = "none"; 649} 650function showEdit6Rows() { 651 var rows = null; 652 rows = document.getElementsByTagName("tr"); 653 for (var i = 0; i < rows.length; i++) { 654 if (!rows[i].className) { 655 continue; 656 } else { 657 if (rows[i].className == 'edit6'){ 658 rows[i].style.display = "block"; 659 } 660 if (rows[i].className == 'view6') { 661 rows[i].style.display = "none"; 662 } 663 } 664 } 665 var saveButton = document.getElementById('saveButton6'); 666 if (saveButton != null) 667 saveButton.style.display = "inline"; 668 var cancelButton = document.getElementById('cancelButton6'); 669 if (cancelButton != null) 670 cancelButton.style.display = "inline"; 671 var editButton = document.getElementById('editButton6'); 672 if (editButton != null) 673 editButton.style.display = "none"; 674} 675function showEdit7Rows() { 676 var rows = null; 677 rows = document.getElementsByTagName("tr"); 678 for (var i = 0; i < rows.length; i++) { 679 if (!rows[i].className) { 680 continue; 681 } else { 682 if (rows[i].className == 'edit7'){ 683 rows[i].style.display = "block"; 684 } 685 if (rows[i].className == 'view7') { 686 rows[i].style.display = "none"; 687 } 688 } 689 }
690 var saveButton = document.getElementById('saveButton7'); 691 if (saveButton != null) 692 saveButton.style.display = "inline"; 693 var cancelButton = document.getElementById('cancelButton7'); 694 if (cancelButton != null) 695 cancelButton.style.display = "inline"; 696 var editButton = document.getElementById('editButton7'); 697 if (editButton != null) 698 editButton.style.display = "none"; 699} 700function hideEdit1Rows() { 701 var rows = null; 702 rows = document.getElementsByTagName("tr"); 703 for (var i = 0; i < rows.length; i++) { 704 if (!rows[i].className) { 705 continue; 706 } else { 707 if (rows[i].className == 'edit1'){ 708 rows[i].style.display = "none"; 709 } 710 if (rows[i].className == 'view1') { 711 rows[i].style.display = "block"; 712 } 713 } 714 } 715 var saveButton = document.getElementById('saveButton1'); 716 if (saveButton != null) 717 saveButton.style.display = "none"; 718 var cancelButton = document.getElementById('cancelButton1'); 719 if (cancelButton != null) 720 cancelButton.style.display = "none"; 721 var editButton = document.getElementById('editButton1'); 722 if (editButton != null) 723 editButton.style.display = "block"; 724} 725 726function hideEdit2Rows() { 727 var rows = null; 728 rows = document.getElementsByTagName("tr"); 729 for (var i = 0; i < rows.length; i++) { 730 if (!rows[i].className) { 731 continue; 732 } else { 733 if (rows[i].className == 'edit2'){ 734 rows[i].style.display = "none"; 735 } 736 if (rows[i].className == 'view2') { 737 rows[i].style.display = "block"; 738 } 739 } 740 } 741 var saveButton = document.getElementById('saveButton2'); 742 if (saveButton != null) 743 saveButton.style.display = "none"; 744 var cancelButton = document.getElementById('cancelButton2'); 745 if (cancelButton != null) 746 cancelButton.style.display = "none"; 747 var editButton = document.getElementById('editButton2'); 748 if (editButton != null) 749 editButton.style.display = "block"; 750} 751 752function hideEdit3Rows() { 753 var rows = null; 754 rows = document.getElementsByTagName("tr"); 755 for (var i = 0; i < rows.length; i++) { 756 if (!rows[i].className) { 757 continue; 758 } else { 759 if (rows[i].className == 'edit3'){ 760 rows[i].style.display = "none"; 761 } 762 if (rows[i].className == 'view3') { 763 rows[i].style.display = "block"; 764 } 765 } 766 } 767 var saveButton = document.getElementById('saveButton3'); 768 if (saveButton != null) 769 saveButton.style.display = "none"; 770 var cancelButton = document.getElementById('cancelButton3'); 771 if (cancelButton != null) 772 cancelButton.style.display = "none"; 773 var editButton = document.getElementById('editButton3'); 774 if (editButton != null) 775 editButton.style.display = "block"; 776} 777 778function hideEdit4Rows() { 779 var rows = null; 780 rows = document.getElementsByTagName("tr"); 781 for (var i = 0; i < rows.length; i++) { 782 if (!rows[i].className) { 783 continue; 784 } else { 785 if (rows[i].className == 'edit4'){ 786 rows[i].style.display = "none"; 787 } 788 if (rows[i].className == 'view4') { 789 rows[i].style.display = "block"; 790 } 791 } 792 } 793 var saveButton = document.getElementById('saveButton4'); 794 if (saveButton != null) 795 saveButton.style.display = "none"; 796 var cancelButton = document.getElementById('cancelButton4'); 797 if (cancelButton != null) 798 cancelButton.style.display = "none"; 799 var editButton = document.getElementById('editButton4'); 800 if (editButton != null) 801 editButton.style.display = "block"; 802} 803 804function hideEdit5Rows() { 805 var rows = null; 806 rows = document.getElementsByTagName("tr"); 807 for (var i = 0; i < rows.length; i++) { 808 if (!rows[i].className) { 809 continue; 810 } else { 811 if (rows[i].className == 'edit5'){ 812 rows[i].style.display = "none"; 813 } 814 if (rows[i].className == 'view5') { 815 rows[i].style.display = "block"; 816 } 817 } 818 } 819 var saveButton = document.getElementById('saveButton5'); 820 if (saveButton != null) 821 saveButton.style.display = "none"; 822 var cancelButton = document.getElementById('cancelButton5'); 823 if (cancelButton != null) 824 cancelButton.style.display = "none"; 825 var editButton = document.getElementById('editButton5'); 826 if (editButton != null) 827 editButton.style.display = "block"; 828} 829 830function hideEdit6Rows() { 831 var rows = null; 832 rows = document.getElementsByTagName("tr"); 833 for (var i = 0; i < rows.length; i++) { 834 if (!rows[i].className) { 835 continue; 836 } else { 837 if (rows[i].className == 'edit6'){ 838 rows[i].style.display = "none"; 839 } 840 if (rows[i].className == 'view6') { 841 rows[i].style.display = "block"; 842 } 843 } 844 } 845 var saveButton = document.getElementById('saveButton6'); 846 if (saveButton != null) 847 saveButton.style.display = "none"; 848 var cancelButton = document.getElementById('cancelButton6'); 849 if (cancelButton != null) 850 cancelButton.style.display = "none"; 851 var editButton = document.getElementById('editButton6'); 852 if (editButton != null) 853 editButton.style.display = "block"; 854} 855function hideEdit7Rows() { 856 var rows = null; 857 rows = document.getElementsByTagName("tr"); 858 for (var i = 0; i < rows.length; i++) { 859 if (!rows[i].className) { 860 continue; 861 } else { 862 if (rows[i].className == 'edit7'){ 863 rows[i].style.display = "none"; 864 } 865 if (rows[i].className == 'view7') { 866 rows[i].style.display = "block"; 867 } 868 } 869 }
870 var saveButton = document.getElementById('saveButton7'); 871 if (saveButton != null) 872 saveButton.style.display = "none"; 873 var cancelButton = document.getElementById('cancelButton7'); 874 if (cancelButton != null) 875 cancelButton.style.display = "none"; 876 var editButton = document.getElementById('editButton7'); 877 if (editButton != null) 878 editButton.style.display = "block"; 879} 880 881function checkForErrors() { 882 883 var errorDiv = document.getElementById('hasErrors'); 884 if (errorDiv != null) { 885 showEdit1Rows(); 886 showEdit2Rows(); 887 } 888} 889 890/* Product Gallery Reviews Pages */ 891function getFullReview(revID) { 892 try { 893 theURL = document.getElementById(revID+"Link").href; 894 window.location=theURL; 895 } 896 catch(err) { 897 return false; 898 } 899}
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.