home *** CD-ROM | disk | FTP | other *** search
/ Computer Active Guide 2009 July / CAG7.ISO / Internetas / LogitechVidSetup.exe / Setup / UI / ptb / buttons.js < prev    next >
Encoding:
Text File  |  2010-05-11  |  1.7 KB  |  91 lines

  1. ∩╗┐    function onClickWindowsButton(elt)
  2.     {
  3.         var msg = 0;
  4.         var WM_APP = 0x8000;
  5.         
  6.         if (elt.id == "btnNext")
  7.         {
  8.             msg = WM_APP + 33;
  9.         }
  10.         else
  11.         if (elt.id == "btnPrev")
  12.         {
  13.             msg = WM_APP + 36;
  14.         }
  15.         else
  16.         if (elt.id == "btnCancel")
  17.         {
  18.             msg = WM_APP + 37;
  19.         }
  20.         else
  21.         if (elt.id == "btnExit")
  22.         {
  23.             msg = WM_APP + 38;
  24.         }
  25.         
  26.         if (msg != 0)
  27.         {
  28.             window.parent.external.SendParentMessage(msg, 0, 0);
  29.         }        
  30.     }
  31.     
  32.     function setButtonClassNames(o, classNameRoot)
  33.     {
  34.         var leftBtn = o.children.item(0);
  35.         var midBtn = leftBtn.nextSibling;
  36.         var rightBtn = midBtn.nextSibling;    
  37.         
  38.         if (leftBtn != null)
  39.             leftBtn.className = classNameRoot + "L";
  40.             
  41.         if (midBtn != null)
  42.         {
  43.             midBtn.className = classNameRoot + "M";
  44.             midBtn.children.item(0).className = classNameRoot + "Text";
  45.         }
  46.             
  47.         if (rightBtn != null)
  48.             rightBtn.className = classNameRoot + "R";
  49.     }
  50.  
  51.     function setButtonFocus(o)
  52.     {
  53.         setButtonClassNames(o, "gradBtnHover");
  54.     }
  55.     
  56.     function setBtnFocus(o)
  57.     {
  58.         var lt = o.firstChild;
  59.         var mid = lt.nextSibling;
  60.         var rt = mid.nextSibling;
  61.         
  62.         lt.className = "btnLb";
  63.         mid.className = "btnMb";
  64.         rt.className = "btnRb";
  65.     }
  66.     
  67.     function setButtonBlur(o)
  68.     {
  69.         setButtonClassNames(o, "gradBtnUp");
  70.     }
  71.     
  72.     function setButtonDown(o)
  73.     {
  74.         setButtonClassNames(o, "gradBtnDown");
  75.     }
  76.     
  77.     function setButtonUp(o)
  78.     {
  79.         setButtonClassNames(o, "gradBtnHover");
  80.     }
  81.     
  82.     function needEulaAgreement()
  83.     {
  84.         alert('Voc├¬ deve aceitar os termos e as condi├º├╡es da licen├ºa para prosseguir.');
  85.         var obj = document.getElementById('eula');
  86.         obj.focus();
  87.         obj.setActive();
  88.         
  89.         alert("number of frames:"+document.frames.length);
  90.     }
  91.