function getBrowserInfoCB()
{function CAPABILITIES()
{this.browserName=false;this.browserVersion=false;this.engine=false;this.engineVersion=false;this.cookies=false;this.MSIE=false;this.NETSCAPE=false;this.OPERA=false;this.GECKO=false;}
var caps=new CAPABILITIES();var temp=0;if(navigator)
{caps.browserName=navigator.appName;caps.engine=navigator.userAgent;caps.engineVersion=parseFloat(navigator.appVersion);if(navigator.cookieEnabled)
caps.cookies=navigator.cookieEnabled;else
{document.cookie="testCookieName=1234567; path=/";caps.cookies=document.cookie.indexOf("testCookieName")>-1;}
caps.OPERA=(navigator.userAgent.indexOf("Opera")>-1);if(!caps.OPERA)
{caps.MSIE=(navigator.appName.indexOf("Microsoft")>-1)&&(navigator.userAgent.indexOf("Opera")==-1);if(navigator.userAgent.indexOf("Gecko")>-1)
{caps.NETSCAPE=(navigator.userAgent.indexOf("Netscape")!=-1);caps.GECKO=!caps.NETSCAPE;}
else
caps.NETSCAPE=(navigator.appName.indexOf("Netscape")>-1);}
caps.browserVersion=caps.engineVersion;if(caps.OPERA)
{temp=navigator.userAgent.indexOf("Opera");caps.browserVersion=temp>-1?parseFloat(navigator.userAgent.substr(temp+6)):0;}
if(caps.MSIE)
{temp=navigator.userAgent.indexOf("MSIE");caps.browserVersion=temp>-1?parseFloat(navigator.userAgent.substr(temp+5)):0;caps.engineVersion=caps.browserVersion;}
if(caps.GECKO)
{temp=navigator.userAgent.indexOf("rv:");caps.browserVersion=(temp>-1)?parseFloat(navigator.userAgent.substr(temp+3)):0;}
if(caps.NETSCAPE&&(caps.engineVersion>=5))
{temp=navigator.userAgent.indexOf("Netscape/");caps.browserVersion=temp>-1?parseFloat(navigator.userAgent.substr(temp+9)):0;}
if(caps.OPERA&&(caps.browserName.indexOf('Opera')==-1))
{caps.browserName='Opera';caps.engineVersion=caps.browserVersion;}}
return caps;}
function getObjectCB(pID)
{if(document.all)
return document.all[pID]==null?false:document.all[pID];if(document.getElementById)
return document.getElementById(pID);if(document[pID])
return document[pID];return false;}
function setVisibilityCB(pObj,visible)
{if(pObj)
{if(pObj.visibility)
{pObj.visibility=visible?'show':'hide';return true;}
else if(pObj.style)
{pObj.style.visibility=visible?'visible':'hidden';return true;}}
return false;}
function setExistenceCB(pObj,existent)
{var bi=getBrowserInfoCB();if(bi.OPERA&&bi.browserVersion<7)
return false;if(pObj)
{if(pObj.style)
{pObj.style.display=existent?'block':'none';return true;}}
return false;}
function getAbsolutePositionCB(pObj)
{function point()
{this.x=0;this.y=0;}
var p=new point();if(pObj)
{if(pObj.x)
{p.x=pObj.x;p.y=pObj.y;return p;}
else if(pObj.getBoundingClientRect&&document.body&&document.body.clientLeft)
{var pObjRect=pObj.getBoundingClientRect();p.x=pObjRect.left-document.body.clientLeft;p.y=pObjRect.top-document.body.clientTop;return p;}
else if(pObj.offsetParent)
{while(pObj.offsetParent)
{p.x+=pObj.offsetLeft;p.y+=pObj.offsetTop;pObj=pObj.offsetParent;}
return p;}}
p.x=false;p.y=false;return p;}
function setPositionCB(pObj,x,y)
{if(pObj)
{if(pObj.left)
{pObj.left=x;pObj.top=y;return true;}
else if(pObj.style)
{pObj.style.left=x;pObj.style.top=y;return true;}}
return false;}
function getSizeCB(pObj)
{function point()
{this.width=-1;this.height=-1;}
var p=new point();if(pObj)
{if(pObj.offsetWidth)
{p.width=pObj.offsetWidth;p.height=pObj.offsetHeight;return p;}
else if(pObj.clip)
{p.width=pObj.clip.width;p.height=pObj.clip.height;return p;}
else if(pObj.style.pixelWidth)
{p.width=pObj.style.pixelWidth;p.height=pObj.style.pixelHeight;return p;}}
p.width=false;p.height=false;return p;}
function setSizeCB(pObj,width,height)
{if(width>0&&height>0&&pObj)
{if(pObj.style)
{pObj.style.overflow='hidden';pObj.style.width=width;pObj.style.height=height;if(pObj.style.pixelWidth)
{pObj.style.pixelWidth=width;pObj.style.pixelHeight=height;}
return true;}
else if(pObj.clip&&pObj.clip.width)
{pObj.clip.width=width;pObj.clip.height=height;return true;}}
return false;}
function getClipRectCB(pObj)
{function rect()
{this.top=-1;this.right=-1;this.bottom=-1;this.left=-1;}
var r=new rect();if(pObj)
{if(pObj.clip)
{r.top=pObj.clip.top;r.right=pObj.clip.right;r.bottom=pObj.clip.bottom;r.left=pObj.clip.left;return r;}
else if(pObj.style&&pObj.style.clip)
{var clipCS=pObj.style.clip;rep=/px/gi;clipCS=clipCS.replace(rep,"");rep=/,/gi;clipCS=clipCS.replace(rep,"");var clipCV=clipCS.split("rect(")[1].split(")")[0].split(" ");r.top=Number(clipCV[0]);r.right=Number(clipCV[1]);r.bottom=Number(clipCV[2]);r.left=Number(clipCV[3]);return r;}}
r.top=r.right=r.bottom=r.left=false;return r;}
function setClipRectCB(pObj,top,right,bottom,left)
{if(pObj)
{if(pObj.clip)
{pObj.clip.top=top
pObj.clip.right=right
pObj.clip.bottom=bottom
pObj.clip.left=left;return true;}
else if(pObj.style)
{pObj.style.clip="rect("+top+"px "+right+"px "+bottom+"px "+left+"px)";return true;}}
return false;}
function loadDocumentCB(pObj,pURL)
{var bi=getBrowserInfoCB();if(bi.OPERA&&bi.browserVersion<7)
return false;if(pObj)
{if(pObj.src)
{pObj.src=pURL;return true;}
else if(pObj.load)
return pObj.load(pURL);}
return false;}
function setContentCB(pObj,HTMLCode)
{if(pObj)
{if(pObj.innerHTML)
{pObj.innerHTML=HTMLCode;return true;}
else if(pObj.document&&document.layers)
{pObj.document.open();pObj.document.write(HTMLCode);pObj.document.close();return true;}}
return false;}
function getScrollOffsetCB(pWindow)
{function point()
{this.scrollLeft=-1;this.scrollTop=-1;}
var p=new point();var bi=getBrowserInfoCB();if(bi.OPERA&&bi.browserVersion<6)
{p.scrollLeft=false;p.scrollTop=false;return p;}
if(pWindow)
{if(pWindow.document.layers)
{p.scrollLeft=pWindow.pageXOffset;p.scrollTop=pWindow.pageYOffset;return p;}
else if(pWindow.document.body&&pWindow.document.body.scrollLeft!=null)
{p.scrollLeft=pWindow.document.body.scrollLeft;p.scrollTop=pWindow.document.body.scrollTop;return p;}}
p.scrollLeft=false;p.scrollTop=false;return p;}
function scrollPageCB(pWindow,scrollLeft,scrollTop)
{if(pWindow&&pWindow.scrollTo)
{pWindow.scrollTo(scrollLeft,scrollTop);return true;}
return false;}
function scrollPageByCB(pWindow,scrollLeft,scrollTop)
{if(pWindow&&pWindow.scrollBy)
{pWindow.scrollBy(scrollLeft,scrollTop);return true;}
return false;}
function getWindowPositionCB(pWindow)
{function point()
{this.x=-1;this.y=-1;}
var p=new point();if(pWindow&&pWindow.document)
{if(pWindow.screenX)
{p.x=pWindow.screenX;p.y=pWindow.screenY;return p;}
else if(pWindow.screenLeft)
{p.x=pWindow.screenLeft;p.y=pWindow.screenTop;return p;}
else if(pWindow.event&&pWindow.event.clientX)
{p.x=pWindow.event.screenX-pWindow.event.clientX;p.y=pWindow.event.screenY-pWindow.event.clientY;return p;}}
p.x=false;p.y=false;return p;}
function setWindowPositionCB(pWindow,x,y)
{if(pWindow&&pWindow.moveTo)
{pWindow.moveTo(x,y);return true;}
return false;}
function setWindowPositionByCB(pWindow,x,y)
{if(pWindow&&pWindow.moveBy)
{pWindow.moveBy(x,y);return true;}
return false;}
function getWindowSizeCB(pWindow)
{function point()
{this.width=-1;this.height=-1;}
var p=new point();if(pWindow&&pWindow.document)
{if(pWindow.innerWidth)
{p.width=pWindow.innerWidth;p.height=pWindow.innerHeight;return p;}
else if(pWindow.document.body&&pWindow.document.body.clientWidth!=null)
{p.width=pWindow.document.body.clientWidth;p.height=pWindow.document.body.clientHeight;return p;}}
p.width=false;p.height=false;return p;}
function setWindowSizeCB(pWindow,width,height)
{if(pWindow&&pWindow.resizeTo)
{pWindow.resizeTo(width,height);return true;}
return false;}
function setWindowSizeByCB(pWindow,width,height)
{if(pWindow&&pWindow.resizeBy)
{pWindow.resizeBy(width,height);return true;}
return false;}