JAVASCRIPT   10

unix

Guest on 14th May 2022 01:50:01 AM

  1. function stoperror(){
  2. return true
  3. }
  4. window.onerror=stoperror
  5.  
  6. //////////////////
  7.  
  8. function comando(param)
  9. {
  10. if (param=="paste") document.form1.campo.focus();
  11. document.execCommand(param);
  12.  
  13. }
  14.  
  15. ///////////////////
  16.  
  17. /* New: Variable searchhi_string to keep track of words being searched. */
  18. var searchhi_string = '';
  19.  
  20. /* http://www.kryogenix.org/code/browser/searchhi/ */
  21. /* Modified 20021006 to fix query string parsing and add case insensitivity */
  22. function highlightWord(node,word) {
  23.         // Iterate into this nodes childNodes
  24.         if (node.hasChildNodes) {
  25.                 var hi_cn;
  26.                 for (hi_cn=0;hi_cn<node.childNodes.length;hi_cn++) {
  27.                         highlightWord(node.childNodes[hi_cn],word);
  28.                 }
  29.         }
  30.  
  31.         // And do this node itself
  32.         if (node.nodeType == 3) { // text node
  33.                 tempNodeVal = node.nodeValue.toLowerCase();
  34.                 tempWordVal = word.toLowerCase();
  35.                 if (tempNodeVal.indexOf(tempWordVal) != -1) {
  36.                         pn = node.parentNode;
  37.                         if (pn.className != "searchword") {
  38.                                 // word has not already been highlighted!
  39.                                 nv = node.nodeValue;
  40.                                 ni = tempNodeVal.indexOf(tempWordVal);
  41.                                 // Create a load of replacement nodes
  42.                                 before = document.createTextNode(nv.substr(0,ni));
  43.                                 docWordVal = nv.substr(ni,word.length);
  44.                                 after = document.createTextNode(nv.substr(ni+word.length));
  45.                                 hiwordtext = document.createTextNode(docWordVal);
  46.                                 hiword = document.createElement("span");
  47.                                 hiword.className = "searchword";
  48.                                 hiword.appendChild(hiwordtext);
  49.                                 pn.insertBefore(before,node);
  50.                                 pn.insertBefore(hiword,node);
  51.                                 pn.insertBefore(after,node);
  52.                                 pn.removeChild(node);
  53.                         }
  54.                 }
  55.         }
  56. }
  57.  
  58. function unhighlightWord(node,word) {
  59.         // Iterate into this nodes childNodes
  60.         if (node.hasChildNodes) {
  61.                 var hi_cn;
  62.                 for (hi_cn=0;hi_cn<node.childNodes.length;hi_cn++) {
  63.                         highlightWord(node.childNodes[hi_cn],word);
  64.                 }
  65.         }
  66.  
  67.         // And do this node itself
  68.         if (node.nodeType == 3) { // text node
  69.                 tempNodeVal = node.nodeValue.toLowerCase();
  70.                 tempWordVal = word.toLowerCase();
  71.                 if (tempNodeVal.indexOf(tempWordVal) != -1) {
  72.                         pn = node.parentNode;
  73.                         if (pn.className == "searchword") {
  74.                                 prevSib = pn.previousSibling;
  75.                                 nextSib = pn.nextSibling;
  76.                                 nextSib.nodeValue = prevSib.nodeValue + node.nodeValue + nextSib.nodeValue;
  77.                                 prevSib.nodeValue = '';
  78.                                 node.nodeValue = '';
  79.                         }
  80.                 }
  81.         }
  82. }
  83.  
  84. function unhighlight(node) {
  85.         // Iterate into this nodes childNodes
  86.         if (node.hasChildNodes) {
  87.                 var hi_cn;
  88.                 for (hi_cn=0;hi_cn<node.childNodes.length;hi_cn++) {
  89.                         unhighlight(node.childNodes[hi_cn]);
  90.                 }
  91.         }
  92.  
  93.         // And do this node itself
  94.         if (node.nodeType == 3) { // text node
  95.                 pn = node.parentNode;
  96.                 if( pn.className == "searchword" ) {
  97.                         prevSib = pn.previousSibling;
  98.                         nextSib = pn.nextSibling;
  99.                         nextSib.nodeValue = prevSib.nodeValue + node.nodeValue + nextSib.nodeValue;
  100.                         prevSib.nodeValue = '';
  101.                         node.nodeValue = '';
  102.                 }
  103.         }
  104. }
  105.  
  106. function googleSearchHighlight() {
  107.         if (!document.createElement) return;
  108.         ref = document.referrer;
  109.         ref = ref.replace(/\/search\/web\//,'?search&q='); // Most WebCrawler searches
  110.         if (ref.indexOf('?') == -1) return;
  111.         qs = ref.substr(ref.indexOf('?')+1);
  112.         qsa = qs.split('#');
  113.         qs = qsa[0];
  114.         qs = qs.replace(/(^|&)p=Q&ts=e&/,'&'); // Most Eurekster searches
  115.         qs = qs.replace(/(^|&)query=/,'&q='); // Most Lycos searches
  116.         qs = qs.replace(/(^|&)key=/,'&q='); // Most Walhello searches
  117.         qs = qs.replace(/(^|&)keywords=/i,'&q='); // Most Overture searches
  118.         qs = qs.replace(/(^|&)searchfor=/,'&q='); // Most Mysearch.com searches
  119.         qs = qs.replace(/(^|&)qt=/,'&q='); // Most Acoona.com searches
  120.         qs = qs.replace(/(^|&)s=/,'&q='); // Most Technirati GET searches
  121.         qsa = qs.split('&');
  122.         for (i=0;i<qsa.length;i++) {
  123.                 qsip = qsa[i].split('=');
  124.                 if (qsip.length == 1) continue;
  125.                 if (qsip[0] == 'q' || qsip[0] == 'p' || qsip[0] == 'w') { // q= for Google, p= for Yahoo, w= for Eurekster
  126.                         // Trim leading and trailing spaces after unescaping
  127.                         qsip[1] = unescape(qsip[1]).replace(/^\s+|\s+$/g, "");
  128.                         if( qsip[1] == '' ) continue;
  129.                         phrases = qsip[1].replace(/\+/g,' ').split(/\"/);
  130.                         for(p=0;p<phrases.length;p++) {
  131.                                 phrases[p] = unescape(phrases[p]).replace(/^\s+|\s+$/g, "");
  132.                                 if( phrases[p] == '' ) continue;
  133.                                 if( p % 2 == 0 ) words = phrases[p].replace(/([+,()]|%(29|28)|\W+(AND|OR)\W+)/g,' ').split(/\s+/);
  134.                                 else { words=Array(1); words[0] = phrases[p]; }
  135.                                 for (w=0;w<words.length;w++) {
  136.                                         if( words[w] == '' ) continue;
  137.                                         highlightWord(document.getElementsByTagName("body")[0],words[w]);
  138.                                         if( p % 2 == 0 ) searchhi_string = searchhi_string + ' ' + words[w];
  139.                                         else searchhi_string = searchhi_string + ' "' + words[w] + '"';
  140.                                 }
  141.                         }
  142.  
  143.                 }
  144.         }
  145. }
  146.  
  147. // Everything form this point on is modified to allow for highlighting
  148. // of terms found in the REQUEST URI
  149. function localSearchHighlight(searchStr, tryQ) {
  150.         if (!document.createElement) return;
  151.      if (searchStr == '') return;
  152.         if (searchStr.indexOf('?') == -1) qs = searchStr.substr(0);
  153.         else qs = searchStr.substr(1);
  154.         qsa = qs.split('&');
  155.         for (i=0;i<qsa.length;i++) {
  156.                 qsip = qsa[i].split('=');
  157.                 if (qsip.length == 1) continue;
  158.                 if (qsip[0] == 'h' || ( tryQ && ( qsip[0] == 'q' || qsip[0] == 'p' ) ) ) { // be careful about ghost highlights
  159.                         // Trim leading and trailing spaces after unescaping
  160.                         qsip[1] = unescape(qsip[1]).replace(/^\s+|\s+$/g, "");
  161.                         if( qsip[1] == '' ) continue;
  162.                         phrases = qsip[1].replace(/\+/g,' ').split(/\"/);
  163.                         // Use this next line if you would like to force the script to always
  164.                         // search for phrases. See below as well!!!
  165.                         //phrases = new Array(); phrases[0] = ''; phrases[1] = qsip[1].replace(/\+/g,' ');
  166.                         for(p=0;p<phrases.length;p++) {
  167.                                 phrases[p] = unescape(phrases[p]).replace(/^\s+|\s+$/g, "");
  168.                                 if( phrases[p] == '' ) continue;
  169.                                 if( p % 2 == 0 ) words = phrases[p].replace(/([+,()]|%(29|28)|\W+(AND|OR)\W+)/g,' ').split(/\s+/);
  170.                                 else { words=Array(1); words[0] = phrases[p]; }
  171.                                 for (w=0;w<words.length;w++) {
  172.                                         if( words[w] == '' ) continue;
  173.                                         highlightWord(document.getElementsByTagName("body")[0],words[w]);
  174.                                         if( p % 2 == 0 ) searchhi_string = searchhi_string + ' ' + words[w];
  175.                                         else searchhi_string = searchhi_string + ' "' + words[w] + '"';
  176.                                         // As before, use this next line if forcing phrase searching
  177.                                         //else searchhi_string = searchhi_string + ' ' + words[w];
  178.                                 }
  179.                         }
  180.                 }
  181.         }
  182. }
  183.  
  184. function postSearchHighlight() {
  185.         // Trim any leading or trailing space
  186.         // (this is an overkill way of getting rid of the leading
  187.         //  space that always is present in searchhi_string)
  188.         searchhi_string = searchhi_string.replace(/^\s+|\s+$/g, "");
  189.  
  190.         // In MSIE, sometimes the dynamic generation of the spans
  191.         // for the highlighting takes the anchor out of focus.
  192.         // Here, we put it back in focus.
  193.         if( location.hash.length > 1 ) location.hash = location.hash;
  194. }
  195.  
  196. function SearchHighlight() {
  197.      // This logic should allow pages to use themselves as search
  198.      // engines while not ghosting old searches on current results.
  199.      if( document.createElement ) {
  200.           var docrefpage = document.referrer.split('?',2);
  201.           var locrefpage = location.href.split('?',1);
  202.  
  203.           // Check to see if the referrer looks like it has search terms
  204.           //   In the special case when the referrer *IS* this page,
  205.           //   ignore the referrer.
  206.           if( ( docrefpage[0].toUpperCase() != locrefpage[0].toUpperCase() )
  207.               &&
  208.               ( ( docrefpage[1] && docrefpage[1].match(/(^|&)(p=Q&ts=e&|query=|key=|keywords=|searchfor=|qt=|q=)/) )
  209.                 || document.referrer.match(/\/search\/web\//) ) )
  210.           {
  211.                // Look to location (via "h" field) *AND* referrer
  212.                   googleSearchHighlight();
  213.                   localSearchHighlight(location.search);
  214.           } else {
  215.                // Look to location *ONLY* for highlighting
  216.                var locsearch = location.search;
  217.                if( locsearch.indexOf('?') == -1 ) {
  218.                     // Found no GET string, so look to pathname in
  219.                     // last effort to match something
  220.                     locsearch = locsearch.replace(/\/search\//,'?search&q='); // Most WebCrawler searches
  221.                }
  222.                   localSearchHighlight(location.search, 1);
  223.           }
  224.           postSearchHighlight();
  225.      }
  226. }
  227.  
  228. function SmartHighlight()
  229. {
  230.         // This function is like SearchHighlight()
  231.         // but it detects a page refresh and toggles highlighting
  232.         // on each refresh. This gives a quick way to turn off
  233.         // highlighting (and quickly turn it on after).
  234.  
  235.         var today = new Date();
  236.         var now = today.getUTCSeconds();
  237.  
  238.         var cookie = document.cookie;
  239.         var cookieArray = cookie.split('; ');
  240.  
  241.         // Get timestamp stored in cookie
  242.         for (var loop=0; loop < cookieArray.length; loop++){
  243.                 var nameValue = cookieArray[loop].split("=");
  244.                 if (nameValue[0].toString() == 'SHTS'){
  245.                         var cookieTime = parseInt( nameValue[1] );
  246.                 }
  247.                 else if (nameValue[0].toString() == 'SHTSP'){
  248.                         var cookieName = nameValue[1];
  249.                 }
  250.         }
  251.  
  252.         // If we got a cookie, the cookie is from this page,
  253.         // and the cookie's time is very close to now, then
  254.         // this must be a page refresh (or very similar)
  255.         // so we don't want to highlight. (the 5 second threshold
  256.         // may need to be adjusted for slower browsers/pages/etc.)
  257.         if( cookieName &&
  258.                 cookieTime &&
  259.                 cookieName == escape(location.href) &&
  260.                 Math.abs(now - cookieTime) < 5 )
  261.         {
  262.                 // Refresh detected, so don't highlight
  263.  
  264.                 // Disable refresh detection for this run;
  265.                 // this is what allows us to toggle the highlighting
  266.                 // back *ON* on the next refresh
  267.                 searchhi_unl = 0;
  268.         }
  269.         else
  270.         {
  271.                 // This is not a refresh, so highlight
  272.                 SearchHighlight();
  273.         }
  274.  
  275. }
  276.  
  277. function SmartHLUnload()
  278. {
  279.         if( searchhi_unl > 0 )
  280.         {
  281.                 // Turn refresh detection on so that if this
  282.                 // page gets quickly loaded, we know it's a refresh
  283.                 var today = new Date();
  284.                 var now = today.getUTCSeconds();
  285.                 document.cookie = 'SHTS=' + now + ';';
  286.                 document.cookie = 'SHTSP=' + escape(location.href) + ';';
  287.         }
  288.         else
  289.         {
  290.                 // Refresh detection has been disabled
  291.                 document.cookie = 'SHTS=;';
  292.                 document.cookie = 'SHTSP=;';
  293.         }
  294. }
  295.  
  296. function NotRefreshHL()
  297. {
  298.         // This is not a refresh. It's probably a submit
  299.         // with the same search string, so disable refresh
  300.         // detection on this go around.
  301.         searchhi_unl = 0;
  302.         return true;
  303. }
  304.  
  305. // By default, turn refresh detection on
  306. var searchhi_unl = 1;
  307.  
  308. // window.onload = SearchHighlight;
  309. // window.onload = SmartHighlight;
  310. // window.onunload = SmartHLUnload;
  311.  
  312. ///////////////////////
  313.  
  314. <!--
  315.             function loadSearchHighlight()
  316.             {
  317.               SmartHighlight();
  318.               document.searchhi.h.value = searchhi_string;
  319.               if( location.hash.length > 1 ) location.hash = location.hash;
  320.             }
  321.             // -->
  322.  
  323. ////////////////////////
  324.  
  325. var tagAlvo = new Array('p'); //pega todas as tags p//
  326. var tamanhos = new Array('10px','12px','14px','16px','18px','20px','22px','24px','26px');
  327. var tamanhoInicial = 2;
  328. function mudaTamanho( idAlvo,acao ){
  329.   if (!document.getElementById) return
  330.   var selecionados = null,tamanho = tamanhoInicial,i,j,tagsAlvo;
  331.   tamanho += acao;
  332.   if ( tamanho < 0 ) tamanho = 0;
  333.   if ( tamanho > 6 ) tamanho = 6;
  334.   tamanhoInicial = tamanho;
  335.   if ( !( selecionados = document.getElementById( idAlvo ) ) ) selecionados = document.getElementsByTagName( idAlvo )[ 0 ];
  336.   selecionados.style.fontSize = tamanhos[ tamanho ];
  337.   for ( i = 0; i < tagAlvo.length; i++ ){
  338.     tagsAlvo = selecionados.getElementsByTagName( tagAlvo[ i ] );
  339.     for ( j = 0; j < tagsAlvo.length; j++ ) tagsAlvo[ j ].style.fontSize = tamanhos[ tamanho ];
  340.   }
  341. }
  342.  
  343. ////////////////////////
  344.  
  345. <!--
  346.  
  347. ///////////////////////////////////////////////////////////////////////////////
  348. //   ..:: realMenu v1.27 ::..
  349. // copyright © jordan neill 2000
  350. // Script featured on JavaScript Kit (http://javascriptkit.com)
  351. //
  352. // change the menuItems array with your options and set the urls to link to
  353. //  use addMenuItem("Text to show", "Url To Link To"); to make an item
  354. //  use addMenuItem("Text", Url", "Img To Show"); to make an item with an image
  355. //  use addMenuItem(); to indicate a separator bar
  356. //  you can use html tags in the text, eg, <i>, <b> or <u>
  357. //
  358. // images used should be 16x16 transparent gifs
  359. ///////////////////////////////////////////////////////////////////////////////
  360.  
  361.  
  362.  menuItems = new Array();
  363.  menuItemNum = 0;
  364.  
  365.  function addMenuItem(text, url, img){
  366.   if(img) menuItems[menuItemNum] = new Array(text, url, img);
  367.   else if(text) menuItems[menuItemNum] = new Array(text, url);
  368.   else menuItems[menuItemNum] = new Array();
  369.   menuItemNum++;
  370.  }
  371.  
  372.  menuWidth = 217;//menu width
  373.  
  374.  menuHeight = 279;//menu height
  375.  
  376.  menuDelay = 0;//delay before menu appears
  377.  
  378.  menuSpeed = 20;//speed which menu appears (lower=faster)
  379.  
  380.  menuOffset = 0;//offset of menu from mouse pointer
  381.  
  382.  
  383.  
  384. addMenuItem("Imprimir","action:WebPrintPage()");
  385.  addMenuItem();
  386.  addMenuItem("Página Inicial" href=../../sumario.html"l");
  387.  addMenuItem("Página Anterior","action:WebBack()");
  388.  addMenuItem("Página Seguinte","action:WebNext()");
  389.  addMenuItem();
  390.  addMenuItem("Atualizar a Página","action:WebRefresh()");
  391.  addMenuItem();
  392.  addMenuItem("Maximizar o Programa","action:ApplicationMaximize()");
  393.  addMenuItem("Minimizar o Programa","action:ApplicationMinimize()");
  394.  addMenuItem("Fechar o Programa","action:ApplicationExit()");
  395.  addMenuItem();
  396.  addMenuItem("Sobre o Diário Fiscal","action:ShowFormAbout()// addMenuItem();
  397. em(///////////////////////////////////////////////////////////////////////////////
  398. /// do not edit the code below, it is required for the menu to work correctly
  399. e///////////////////////////////////////////////////////////////////////////////
  400. /////
  401.  
  402.  
  403.  if(window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE") + 5, window.navigator.appVersion.indexOf("MSIE") + 8) >= 5.5)
  404.   isIe = 1;
  405.  else
  406.   isIe = 0;
  407.  
  408.   if(isIe){
  409.   menuContent = '<table id="rightMenu" width="0" height="0" cellspacing="0" cellpadding="0" style="font:menu;color:menutext;"><tr height="1"><td style="background:#000066" colspan="4"></td><td style="background:#000066"></td></tr><tr height="1"><td style="background:#000066"></td><td style="background:threedhighlight" colspan="2"></td><td style="background:threedshadow"></td><td style="background:#000066"></td></tr><tr height="10"><td style="background:#000066"></td><td style="background:threedhighlight"></td><td style="background:#DCDFEA"><table cellspacing="0" cellpadding="0" nowrap style="font:menu;color:menutext;cursor:default;">';
  410.   for(m=0;m<menuItems.length;m++){
  411.    if(menuItems[m][0] && menuItems[m][2])
  412.     menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'#DCDFEA\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:#DCDFEA" width="1" nowrap></td><td width="21" nowrap><img src="' + menuItems[m][2] + '"></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:#DCDFEA" width="1" nowrap></td></tr>';
  413.    else if(menuItems[m][0])
  414.     menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'#DCDFEA\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:#DCDFEA" width="1" nowrap></td><td width="21" nowrap></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:#DCDFEA" width="1" nowrap></td></tr>';
  415.    else
  416.     menuContent += '<tr><td colspan="5" height="4"></td></tr><tr><td colspan="5"><table cellspacing="0"><tr><td width="2" height="1"></td><td width="0" height="1" style="background:threedshadow"></td><td width="2" height="1"></td></tr><tr><td width="2" height="1"></td><td width="100%" height="1" style="background:threedhighlight"></td><td width="2" height="1"></td></tr></table></td></tr><tr><td colspan="5" height="3"></td></tr>';
  417.   }
  418.   menuContent += '</table></td><td style="background:threedshadow"></td><td style="background:#C6D1DC"></td></tr><tr height="1"><td style="background:#000066"></td><td style="background:threedhighlight"></td><td style="background:#DCDFEA"></td><td style="background:threedshadow"></td><td style="background:#000066"></td></tr><tr height="1"><td style="background:#000066"></td><td style="background:threedshadow" colspan="3"></td><td style="background:#000066"></td></tr><tr height="1"><td style="background:#000066" colspan="5"></td></tr></table>';
  419.  
  420.   menuPopup = window.createPopup();
  421.   menuPopup.document.body.innerHTML = menuContent;
  422.  }
  423.  
  424.  function showMenu(){
  425.   menuXPos = event.clientX + menuOffset;
  426.   menuYPos = event.clientY + menuOffset;
  427.  
  428.   menuXIncrement = menuWidth / menuSpeed;
  429.   menuYIncrement = menuHeight / menuSpeed;
  430.  
  431.   menuTimer = setTimeout("openMenu(0,0)", menuDelay);
  432.  
  433.   return false;
  434.  }
  435.  
  436.  
  437.  function openMenu(height, width){
  438.   iHeight = height;
  439.   iWidth = width;
  440.  
  441.   menuPopup.show(menuXPos, menuYPos, iWidth, iHeight, document.body);
  442.  
  443.   if(iHeight < menuHeight)
  444.    menuTimer = setTimeout("openMenu(iHeight + menuYIncrement, iWidth + menuXIncrement)", 1);
  445.   else
  446.    clearTimeout(menuTimer);
  447.  }
  448.  
  449.  
  450.  if(isIe) document.oncontextmenu = showMe//-->
  451. /////////////////////////////
  452. /////
  453.  
  454. function CallPrint(strid)
  455. {
  456.  var prtContent = document.getElementById(strid);
  457.  var WinPrint = window.open('letf=0,top=0,width=640,height=480,toolbar=0,scrollbars=0,status=0'tus=0');
  458.  WinPrint.document.write(prtContent.innerHTML);
  459.  WinPrint.document.close();
  460.  WinPrint.focus();
  461.  WinPrint.print();
  462.  WinPrint.close();
  463.  prtContent.innerHTML=strOldOn///////////////////////////
  464. /////
  465. var NS4 = (document.layers);
  466. var IE4 = (document.all);
  467. var win = this;
  468. var n = 0;
  469. function findInPage(str)
  470. {
  471. var txt, i, found;
  472. if (str == "")
  473. return false;
  474. if (NS4) {
  475. if (!win.find(str))
  476. while(win.find(str, false, true))
  477. n++;
  478. else
  479. n++;
  480. if (n == 0) alert(str + " não existe nesta página.");
  481. }
  482. if (IE4) {
  483. txt = win.document.body.createTextRange();
  484. for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
  485. txt.moveStart("character", 1);
  486. txt.moveEnd("textedit");
  487. }
  488. if (found) {
  489. txt.moveStart("character", -1);
  490. txt.findText(str);
  491. txt.select();
  492. txt.scrollIntoView();
  493. n++;
  494. }
  495. else {
  496. if (n > 0) {
  497. n = 0;
  498. findInPage(str);
  499. }
  500. else
  501. alert(str + " não existe nesta página.");
  502. }
  503. }
  504. return//////////////////////////////
  505. /////////
  506. function exibe(id) {
  507.         if(document.getElementById(id).style.display=="none") {
  508.                 document.getElementById(id).style.display = "inline";
  509.         }
  510.         else {
  511.                 document.getElementById(id).style.display = "no///////////////////////////////
  512. /////////
  513. <!--
  514. function setVariables() {
  515. if (navigator.appName == "Netscape") {
  516. v=".top=";
  517. dS=";
  518. sD="nt.";
  519. sD="";
  520. y="window.pageYOffset";
  521. }
  522. else {
  523. v=".pixelTop=";
  524. dS="";
  525. sD=".style";
  526. y="document.body.scrollTop";
  527.    }
  528. }
  529. function checkLocation() {
  530. object="object1";
  531. yy=eval(y);
  532. eval(dS+object+sD+v+yy);
  533. setTimeout("checkLocation(//   -->

Raw Paste


Login or Register to edit or fork this paste. It's free.