window.addEventListener( "unload", function(){_sfImageCache = null;}, false );function SF_DOM( m_oPrams )
{
SF_DOMBase.call( this, m_oPrams );var self = this;this.EEventNames = 
{
Load : "load",
UnLoad : "unload",
Select : "onselect",
MouseDown : "mousedown",
MouseMove : "mousemove",
MouseUp : "mouseup",
MouseOver : "mouseover",
MouseOut : "mouseout",
KeyDown : "keydown",
KeyPress : "keypress",
KeyUp : "keyup",
Click : "click",
DoubleClick : "dblclick",
Scroll : "scroll",
Resize : "resize",
FocusOnTab : "keyup", 
WindowBlur : "blur",
ContextMenu : "contextmenu",
Submit : "submit",
Focus : "focus",
Change : "change" 
}
this.ExecCommandIDs[ this.EExecCommands.BackColor ] = "hilitecolor";this.IsMoz = function()
{
return true;}
this.IsFloaterDetached = function()
{
return true;}
this.GetElById = function( sID, oCont)
{
if (!oCont) oCont = document;if (oCont.getElementById)
{
return oCont.getElementById(sID);}
else
{
function fnOnTreeWalk(xdn)
{
return xdn.getAttribute && (sID == xdn.getAttribute("id"));}
var xdnRes = DOMWalk( oCont, fnOnTreeWalk );return xdnRes;} 
}
this.GetAttribute = function( oEl, sAttr )
{
return oEl.getAttribute( sAttr );}
this.IsElContaining = function( oEl, oCont )
{
return IsElContaining( oCont, oEl )
}
this.GetOffset = function( oEl, oCont )
{
var nX = 0, nY = 0;var oTopmostLayoutEl = self.GetTopmostLayoutEl();if( null == oCont )
{
oCont = oTopmostLayoutEl;}
var bPar = false;while (oEl && oEl != oCont && 
(!oCont || IsElContaining( oCont, oEl ))
)
{ 
if (bPar)
{
if( oEl.tagName != "TABLE" )
{
var oElStl = getComputedStyle( oEl, "" );nX += parseInt( oElStl.borderLeftWidth, 10 );nY += parseInt( oElStl.borderTopWidth, 10 );}
}
nX += oEl.offsetLeft;nY += oEl.offsetTop;var oParentEl = oEl.offsetParent;var oParEl = oEl.parentNode;while( oParEl &&
(( oParEl == oParentEl )||
(!oParentEl || IsElContaining( oParentEl, oParEl ) ) ) )
{
if( ( oParEl != oTopmostLayoutEl )&&
( null != oParEl.scrollLeft )&&( null != oParEl.scrollTop ) )
{
nX -= oParEl.scrollLeft;nY -= oParEl.scrollTop;}
oParEl = oParEl.parentNode;}
if( oParentEl && IsElContaining( oParentEl, oEl ) && ( oParentEl.tagName == "BODY" ) )
{
var oElStl = getComputedStyle( oEl, "" );if( oElStl && oElStl.position == "static" )
{
var oParElStl = getComputedStyle( oParentEl, "" );nX += parseInt( oParElStl.borderLeftWidth, 10 );nY += parseInt( oParElStl.borderTopWidth, 10 );}
} 
oEl = oParentEl;bPar = true;}
return { x: nX, y: nY };}
this.GetLostOffset = function( oSubEl )
{
var oXY = null;var oSubElOffPar = oSubEl.offsetParent;if (oSubElOffPar)
{
var sTag = oSubElOffPar.tagName;if
( sTag && "body" == sTag.toLowerCase() 
)
{
var oBody = document.body;var nBX = oBody.offsetLeft;var nBY = oBody.offsetTop;if (nBX < 0 || nBY < 0)
{
oXY = { x: -nBX, y: -nBY };}
}
}
return oXY;}
this.IsClipSlow = function()
{
return true;}
this.GetRTStyle = function( oEl )
{
return getComputedStyle( oEl, "");}
this.GetElementWidthMargin = function( oEl, bLeft )
{
var nRes = 0;if( oEl.tagName )
{
var oElSt = getComputedStyle( oEl, "" );nRes = bLeft ? parseInt( oElSt.marginLeft, 10) : parseInt( oElSt.marginRight, 10);}
return isNaN( nRes ) ? 0 : nRes;}
this.GetElementHeightMargin = function( oEl, bTop )
{
var nRes = 0;if( oEl.tagName )
{
var oElSt = getComputedStyle( oEl, "" );nRes = bTop ? parseInt( oElSt.marginTop, 10) : parseInt( oElSt.marginBottom, 10);} 
return isNaN( nRes ) ? 0 : nRes;}
this.SetMargin = function( oTargetEl, oSourceEl )
{
var oTargetSt = oTargetEl.style;var oSourceSt = getComputedStyle( oSourceEl, "" );oTargetSt.marginTop = oSourceSt.marginTop;oTargetSt.marginBottom = oSourceSt.marginBottom;oTargetSt.marginLeft = oSourceSt.marginLeft;oTargetSt.marginRight = oSourceSt.marginRight;}
this.GetTopmostLayoutEl = function()
{
var oEl;if( document.compatMode == "CSS1Compat" )
{
oEl = document.documentElement;}
else
{
oEl = document.body;}
return oEl;}
this.GetScrollbarWidth = function( oEl, bHorizontal )
{
var nRes = 0;var oElStl = getComputedStyle( oEl, "" );var nBorderWidth = bHorizontal ?
( parseInt( oElStl.borderTopWidth, 10 )+ parseInt( oElStl.borderBottomWidth, 10 ) ) :
( parseInt( oElStl.borderLeftWidth, 10 )+ parseInt( oElStl.borderRightWidth, 10 ) );if (bHorizontal)
nRes = oEl.offsetHeight - nBorderWidth - oEl.clientHeight;else
nRes = oEl.offsetWidth - nBorderWidth - oEl.clientWidth;return nRes;}
this.GetElementExtHeight = function( oEl, bTop )
{
var oElStl = getComputedStyle( oEl, "" );var nBY = parseInt( bTop ? oElStl.borderTopWidth : oElStl.borderBottomWidth, 10 );var nPY = parseInt( bTop ? oElStl.paddingTop : oElStl.paddingBottom, 10 );var nEH = nBY + nPY;return nEH;}
this.GetElementExtWidth = function( oEl, bLeft )
{
var oElStl = getComputedStyle( oEl, "" );var nBX = parseInt( bLeft ? oElStl.borderLeftWidth : oElStl.borderRightWidth, 10 );var nPX = parseInt( bLeft ? oElStl.paddingLeft : oElStl.paddingRight, 10 );var nEH = nBX + nPX ;return nEH;}
this.GetIsOffsetWidthDeviating = function()
{
return true;}
this.IsFocusedEl = function( oEl )
{
var bRes =( null != oEl.focus );return bRes;}
this.EventCancel = function( oEv, bKeyboardEvent, bReturnValue )
{
if (oEv)
{
oEv.stopPropagation();if(!bReturnValue)
{
oEv.preventDefault();}
}
}
this.IsCompleteMouseOut = function( oEl, oEv )
{
var bFromExternalEl = !( IsElContaining( oEl, oEv.explicitOriginalTarget ) )
return bFromExternalEl;}
this.GetEventSrcElement = function( oEv )
{
return oEv.explicitOriginalTarget;}
this.AttachEvent = function( sEventName, fn, oEl )
{
if( !oEl )
{
oEl = window;}
oEl.addEventListener( sEventName, fn, false );if( ( oEl == window )&&( self.EEventNames.Scroll == sEventName ) )
{
oEl.addEventListener( "DOMMouseScroll", fn, false );}
}
this.DetachEvent = function( sEventName, fn, oEl )
{
if( !oEl )
{
oEl = window;}
oEl.removeEventListener( sEventName, fn, false );}
this.AttachCustomEvent = function( sEventName, fn, oEl )
{
var oDom = this;function Run( oEv )
{
fn( oEv, oDom );}
if (!oEl)
{
oEl = self.GetTopmostLayoutEl();}
oEl.addEventListener( sEventName, Run , false );}
this.GetIsWindowBlur = function( oEv )
{
var sNodeName = oEv.explicitOriginalTarget.nodeName;return ( sNodeName == "HTML" );}
this.ClearAlign = function( oEl )
{
oEl.align = "";}
this.CalculateTabIndex = function( oEl )
{
var nMaxTabIndex = 0;function fnOnTreeWalk( xdn )
{
if( IsElPreceding( oEl, xdn ) )
{
if( xdn.tabIndex > nMaxTabIndex )
{
nMaxTabIndex = xdn.tabIndex;}
return false;}
else
{
return true;}
}
DOMWalk( document, fnOnTreeWalk );return nMaxTabIndex + 1;}
function DOMWalk( xdn, fn, oWalk )
{
var xdnRes = null;if (null == oWalk)
oWalk = document.createTreeWalker( xdn, NodeFilter.SHOW_ALL, null, true);if (oWalk.firstChild())
{
do
{
var xdnCur = oWalk.currentNode;if (fn( xdnCur ))
{
xdnRes = xdnCur;break;}
xdnRes = DOMWalk( xdnCur, fn, oWalk );if (xdnRes)
{
break;}
}
while( oWalk.nextSibling() );oWalk.parentNode();}
return xdnRes;}
function GetElRelationship( oEl, oOther, nCode )
{
var bRes = false;var nRes = oEl.compareDocumentPosition( oOther );bRes = (0 != (nCode & nRes));return bRes;}
function IsElContaining( oEl, oOther )
{
return GetElRelationship( oEl, oOther, oEl.DOCUMENT_POSITION_CONTAINED_BY );}
function IsElFollowing( oEl, oOther )
{
return GetElRelationship( oEl, oOther, oEl.DOCUMENT_POSITION_FOLLOWING );}
function IsElPreceding( oEl, oOther )
{
return GetElRelationship( oEl, oOther, oEl.DOCUMENT_POSITION_PRECEDING );}
}
function SF_CSS( m_oParams )
{
SF_CSSBase.call( this, m_oParams );var self = this;this.FiltersSupported = function()
{
return false;}
this.SetOpacity = function ( oEl, nIdx )
{
oEl.style.opacity = nIdx / 100;}
this.SetFocusSetting = function( oEl, oValue )
{
var oRes = null;if( oEl )
{
var oElStl = getComputedStyle( oEl, "" );if( oElStl && ( oElStl.MozUserFocus != "none" ) )
{
oRes = oElStl.MozUserFocus;oEl.style.MozUserFocus = ( oValue ) ? oValue : "ignore";}
}
return oRes;}
this.TransExpand = function( oEl, nDurSec, sFilt )
{
return false;}
this.TransCollapse = function( oEl, nDurSec, sFilt )
{
return false;}
}
