--- a/scripts/volume.js Sun Nov 23 23:43:59 2008 -0500
+++ b/scripts/volume.js Sun Nov 23 23:49:20 2008 -0500
@@ -95,7 +95,7 @@
box.appendChild(field);
$(box)
- .css('top', (( $(window).Height() / 2 ) - ( $(box).Height() / 2 )) + 'px')
+ .css('top', (( getHeight() / 2 ) - ( $(box).Height() / 2 )) + 'px')
.css('left', (( $(document.body).Width() / 2 ) - ( $(box).Width() / 2 )) + 'px');
$(box).fadeIn(250);
@@ -137,3 +137,29 @@
}
}
});
+
+function getHeight() {
+ var myHeight = 0;
+ if( typeof( window.innerWidth ) == 'number' ) {
+ myHeight = window.innerHeight;
+ } else if( document.documentElement &&
+ ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
+ myHeight = document.documentElement.clientHeight;
+ } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
+ myHeight = document.body.clientHeight;
+ }
+ return myHeight;
+}
+
+function getWidth() {
+ var myWidth = 0;
+ if( typeof( window.innerWidth ) == 'number' ) {
+ myWidth = window.innerWidth;
+ } else if( document.documentElement &&
+ ( document.documentElement.clientWidth || document.documentElement.clientWidth ) ) {
+ myWidth = document.documentElement.clientWidth;
+ } else if( document.body && ( document.body.clientWidth || document.body.clientWidth ) ) {
+ myWidth = document.body.clientWidth;
+ }
+ return myWidth;
+}