JAVASCRIPT   81
contexto
Guest on 3rd May 2022 02:49:24 AM


  1. <!--
  2.  
  3. ///////////////////////////////////////////////////////////////////////////////
  4. //   ..:: realMenu v1.27 ::..
  5. // copyright © jordan neill
  6. // Script featured on JavaScript Kit
  7. //
  8. // change the menuItems array with your options and set the urls to link to
  9. //  use addMenuItem("Text to show", "Url To Link To"); to make an item
  10. //  use addMenuItem("Text", Url", "Img To Show"); to make an item with an image
  11. //  use addMenuItem(); to indicate a separator bar
  12. //  you can use html tags in the text, eg, <i>, <b> or <u>
  13. //
  14. // images used should be 16x16 transparent gifs
  15. ///////////////////////////////////////////////////////////////////////////////
  16.  
  17.  
  18.  menuItems = new Array();
  19.  menuItemNum = 0;
  20.  
  21.  function addMenuItem(text, url, img){
  22.   if(img) menuItems[menuItemNum] = new Array(text, url, img);
  23.   else if(text) menuItems[menuItemNum] = new Array(text, url);
  24.   else menuItems[menuItemNum] = new Array();
  25.   menuItemNum++;
  26.  }
  27.  
  28.  menuWidth = 217;//menu width
  29.  
  30.  menuHeight = 279;//menu height
  31.  
  32.  menuDelay = 0;//delay before menu appears
  33.  
  34.  menuSpeed = 20;//speed which menu appears (lower=faster)
  35.  
  36.  menuOffset = 0;//offset of menu from mouse pointer
  37.  
  38.  
  39.  
  40. addMenuItem("Imprimir","action:WebPrintPage()");
  41.  addMenuItem();
  42.  addMenuItem("Página Inicial" href=../../sumario.html"l");
  43.  addMenuItem("Página Anterior","action:WebBack()");
  44.  addMenuItem("Página Seguinte","action:WebNext()");
  45.  addMenuItem();
  46.  addMenuItem("Atualizar a Página","action:WebRefresh()");
  47.  addMenuItem();
  48.  addMenuItem("Maximizar o Programa","action:ApplicationMaximize()");
  49.  addMenuItem("Minimizar o Programa","action:ApplicationMinimize()");
  50.  addMenuItem("Fechar o Programa","action:ApplicationExit()");
  51.  addMenuItem();
  52.  addMenuItem("Sobre o Diário Fiscal","action:ShowFormAbout()// addMenuItem();
  53. e//addMenuItem("JavaScript Kit","http://javascriptkit.com");
  54. // addMenuItem();
  55. // addMenuItem("Dynamic Drive","http://www.dynamicdrive.com");
  56. // addMenuItem("Freewarejava.com","http://freewarejava.com");
  57. // addMenuItem();
  58. // addMenuItem("CNN","http://www.cnn.com");
  59. // addMenuItem("ABC News","http://www.abcnews.com");
  60. // addMenuItem("MSNBC","http://www.msnbc.com");
  61. om")///////////////////////////////////////////////////////////////////////////////
  62. /// do not edit the code below, it is required for the menu to work correctly
  63. e///////////////////////////////////////////////////////////////////////////////
  64. /////
  65.  
  66.  
  67.  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)
  68.   isIe = 1;
  69.  else
  70.   isIe = 0;
  71.  
  72.   if(isIe){
  73.   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;">';
  74.   for(m=0;m<menuItems.length;m++){
  75.    if(menuItems[m][0] && menuItems[m][2])
  76.     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>';
  77.    else if(menuItems[m][0])
  78.     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>';
  79.    else
  80.     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>';
  81.   }
  82.   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>';
  83.  
  84.   menuPopup = window.createPopup();
  85.   menuPopup.document.body.innerHTML = menuContent;
  86.  }
  87.  
  88.  function showMenu(){
  89.   menuXPos = event.clientX + menuOffset;
  90.   menuYPos = event.clientY + menuOffset;
  91.  
  92.   menuXIncrement = menuWidth / menuSpeed;
  93.   menuYIncrement = menuHeight / menuSpeed;
  94.  
  95.   menuTimer = setTimeout("openMenu(0,0)", menuDelay);
  96.  
  97.   return false;
  98.  }
  99.  
  100.  
  101.  function openMenu(height, width){
  102.   iHeight = height;
  103.   iWidth = width;
  104.  
  105.   menuPopup.show(menuXPos, menuYPos, iWidth, iHeight, document.body);
  106.  
  107.   if(iHeight < menuHeight)
  108.    menuTimer = setTimeout("openMenu(iHeight + menuYIncrement, iWidth + menuXIncrement)", 1);
  109.   else
  110.    clearTimeout(menuTimer);
  111.  }
  112.  
  113.  
  114.  if(isIe) document.oncontextmenu = showMe//-->

Raw Paste

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