





function Sniffer(){
var agent=navigator.userAgent.toLowerCase();
this.major=parseInt(navigator.appVersion);
this.minor=parseFloat(navigator.appVersion);
this.ns=((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible')==-1)));
this.ns4=(this.ns && (this.major==4));
this.ff=(this.ns && (this.major>=5));
this.ns4b=(this.ns && (this.minor<4.04));
this.ie=(agent.indexOf("msie")!=-1);
this.ie4=(this.ie && (this.major>=4));
this.win=(agent.indexOf("win")!=-1);
this.mac=(agent.indexOf("mac")!=-1);
}
var is=new Sniffer();

function findPosition(obj) {
var curleft = 0;
var curtop = 0;
if (obj) {
if (obj.offsetParent) {
while (obj.offsetParent) {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
if(is.ie && obj.nodeName=="TD"){
brd=obj.offsetParent.border;

if(brd!="" && brd!="0"){
curleft++;
curtop++;
}
}
obj = obj.offsetParent;
}
} else if (obj.x) {
curleft += obj.x;
curtop += obj.y;
}
}
return {left: curleft, top: curtop};
}

function getObjectHeight(obj) {
return obj.offsetHeight;
}

function getObjectWidth(obj) {
return obj.offsetWidth;
}

function getObjectSize(obj) {
return { width: obj.offsetWidth, height: obj.offsetHeight };
}

function getScrollPosition() {
var scrOfX = 0, scrOfY = 0;
if( typeof( window.pageYOffset ) == 'number' ) {

scrOfY = window.pageYOffset;
scrOfX = window.pageXOffset;
} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {

scrOfY = document.body.scrollTop;
scrOfX = document.body.scrollLeft;
} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {

scrOfY = document.documentElement.scrollTop;
scrOfX = document.documentElement.scrollLeft;
}
return {left: scrOfX, top: scrOfY};
}

function getInnerSize() {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {

myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {

myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {

myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
return { width: myWidth, height: myHeight };
}

function getScrollBottomRightPosition() {
var sz = getInnerSize();
var pos = getScrollPosition();
var bt = sz.height + pos.top - 1;
var rt = sz.width + pos.left - 1;
return { right: rt, bottom: bt };
}


var _SR_;
if(_SR_ != null) _SR_.notify("dom.js");
