diff -r d2af8a210f5d -r 8e4fe6f3337d thd/web/js/uc.base.js --- a/thd/web/js/uc.base.js Wed Jun 01 14:07:43 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -var uc = uc || {}; - -//retourne vrai si IE -uc.navigatorIsIeNoCollision = function (){ -return navigator.appName.substring( 0,5 ).toUpperCase() == 'MICRO'; -} - -uc.calculeOffsetLeft = function(r){ -return uc.calculeOffset(r,"offsetLeft") -} - -uc.calculeOffsetTop = function(r){ -return uc.calculeOffset(r,"offsetTop") -} - -uc.calculeOffset = function(element,attr){ - var offset=0; - while(element){ - offset+=element[attr]; - element=element.offsetParent - } - return offset -} - - -uc.returnDocumentSize = function () { - var myWidth = 0, myHeight = 0; - if( typeof( window.innerWidth ) == 'number' ) { - //Non-IE - myWidth = window.innerWidth; - myHeight = window.innerHeight; - } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { - //IE 6+ in 'standards compliant mode' - myWidth = document.documentElement.clientWidth; - myHeight = document.documentElement.clientHeight; - } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { - //IE 4 compatible - myWidth = document.body.clientWidth; - myHeight = document.body.clientHeight; - } - var result = new Array(myWidth,myHeight); - return result; -} - - -uc.getDocScrollTop = function(){ - if(document.body.scrollTop){ - ltop = document.body.scrollTop; - }else{ - ltop = document.documentElement.scrollTop; - } -return ltop; -} - -uc.getDocScrollLeft = function(){ - if(document.body.scrollLeft){ - ltop = document.body.scrollLeft; - }else{ - ltop = document.documentElement.scrollLeft; - } -return ltop; -} \ No newline at end of file