scripts/volume.js
changeset 59 a4ca1e7c0073
parent 58 05a69bab5f10
child 60 acc7755e15b6
equal deleted inserted replaced
58:05a69bab5f10 59:a4ca1e7c0073
    93     .attr('size', '7')
    93     .attr('size', '7')
    94     .css('text-align', 'center');
    94     .css('text-align', 'center');
    95   box.appendChild(field);
    95   box.appendChild(field);
    96   
    96   
    97   $(box)
    97   $(box)
    98     .css('top',  (( $(window).Height() / 2 ) - ( $(box).Height() / 2 )) + 'px')
    98     .css('top',  (( getHeight() / 2 ) - ( $(box).Height() / 2 )) + 'px')
    99     .css('left', (( $(document.body).Width() / 2 ) - ( $(box).Width() / 2 )) + 'px');
    99     .css('left', (( $(document.body).Width() / 2 ) - ( $(box).Width() / 2 )) + 'px');
   100   
   100   
   101   $(box).fadeIn(250);
   101   $(box).fadeIn(250);
   102   field.focus();
   102   field.focus();
   103   field.onkeyup = function(e)
   103   field.onkeyup = function(e)
   135       {
   135       {
   136         volume_custom_form();
   136         volume_custom_form();
   137       }
   137       }
   138     }
   138     }
   139   });
   139   });
       
   140 
       
   141 function getHeight() {
       
   142   var myHeight = 0;
       
   143   if( typeof( window.innerWidth ) == 'number' ) {
       
   144     myHeight = window.innerHeight;
       
   145   } else if( document.documentElement &&
       
   146       ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
       
   147     myHeight = document.documentElement.clientHeight;
       
   148   } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
       
   149     myHeight = document.body.clientHeight;
       
   150   }
       
   151   return myHeight;
       
   152 }
       
   153 
       
   154 function getWidth() {
       
   155   var myWidth = 0;
       
   156   if( typeof( window.innerWidth ) == 'number' ) {
       
   157     myWidth = window.innerWidth;
       
   158   } else if( document.documentElement &&
       
   159       ( document.documentElement.clientWidth || document.documentElement.clientWidth ) ) {
       
   160     myWidth = document.documentElement.clientWidth;
       
   161   } else if( document.body && ( document.body.clientWidth || document.body.clientWidth ) ) {
       
   162     myWidth = document.body.clientWidth;
       
   163   }
       
   164   return myWidth;
       
   165 }