view (Entry Nr. 67, by user 1 | edit) |
|
|
| function ge_view_getWidth()
{
if (self.innerWidth) // all but IE
return self.innerWidth;
if (document.documentElement && document.documentElement.clientWidth)
return document.documentElement.clientWidth; // IE6 strict
if (document.body) // other IE
return document.body.clientWidth;
}
function ge_view_getHeight()
{
if (self.innerHeight) // all but IE
return self.innerHeight;
if (document.documentElement && document.documentElement.clientHeight)
return document.documentElement.clientHeight; // IE6 strict
if (document.body) // other IE
return document.body.clientHeight;
}
function ge_view_getScrollX()
{
if (self.pageYOffset)
return self.pageXOffset; // all but IE
if (document.documentElement && document.documentElement.scrollTop)
return document.documentElement.scrollLeft; // IE6 strict
if (document.body)
return document.body.scrollLeft; // other IE
}
function ge_view_getScrollY()
{
if (self.pageYOffset)
return self.pageYOffset; // all but IE
if (document.documentElement && document.documentElement.scrollTop)
return document.documentElement.scrollTop; // IE6 strict
if (document.body)
return document.body.scrollTop; // other IE
}
// Return the height of the view's document
function ge_view_getDocumentHeight()
{
var scrollHeight = document.body.scrollHeight;
var offsetHeight = document.body.offsetHeight;
if (scrollHeight > offsetHeight) // all but Explorer Mac
{
return scrollHeight;
}
else // Explorer Mac; would also work in Explorer 6 Strict, Mozilla and Safari
{
return offsetHeight;
}
}
// Return the width of the view's document
function ge_view_getDocumentWidth()
{
var scrollWidth = document.body.scrollWidth;
var offsetWidth = document.body.offsetWidth;
if (scrollWidth > offsetWidth) // all but Explorer Mac
{
return scrollWidth;
}
else // Explorer Mac; would also work in Explorer 6 Strict, Mozilla and Safari
{
return offsetWidth;
}
} |
|
|
Create a new entry at this position
|
|
|