/** * x.js compiled from X 4.0 with XC 0.27b. * Distributed by GNU LGPL. For copyrights, license, documentation and more visit Cross-Browser.com * Copyright 2001-2005 Michael Foster (Cross-Browser.com) **/ function xDeprecate(a){"object"==typeof console&&"function"==typeof console.log&&console.log("DEPRECATED : "+a+"() is deprecated function.")}var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xIE6,xNN4,xUA=navigator.userAgent.toLowerCase(); if(window.opera){var i=xUA.indexOf("opera");if(-1!=i){var v=parseInt(xUA.charAt(i+6));xOp7Up=7<=v;xOp6Dn=7>v}}else"KDE"!=navigator.vendor&&document.all&&-1!=xUA.indexOf("msie")?(xIE4Up=4<=parseFloat(navigator.appVersion),xIE4=-1!=xUA.indexOf("msie 4"),xIE5=-1!=xUA.indexOf("msie 5"),xIE6=-1!=xUA.indexOf("msie 6")):document.layers&&(xNN4=!0);var xMac=-1!=xUA.indexOf("mac"),xFF=-1!=xUA.indexOf("firefox"); function xAddEventListener(a,b,d,e){xDeprecate("xAddEventListener");if(a=xGetElementById(a)){b=b.toLowerCase();if(!xIE4Up&&!xOp7Up&&a==window){if("resize"==b){window.xPCW=xClientWidth();window.xPCH=xClientHeight();window.xREL=d;xResizeEvent();return}if("scroll"==b){window.xPSL=xScrollLeft();window.xPST=xScrollTop();window.xSEL=d;xScrollEvent();return}}var f="e.on"+b+"=eL";a.addEventListener?a.addEventListener(b,d,e):a.attachEvent?a.attachEvent("on"+b,d):eval(f)}} function xResizeEvent(){xDeprecate("xResizeEvent");window.xREL&&setTimeout("xResizeEvent()",250);var a=xClientWidth(),b=xClientHeight();if(window.xPCW!=a||window.xPCH!=b)window.xPCW=a,window.xPCH=b,window.xREL&&window.xREL()}function xScrollEvent(){xDeprecate("xScrollEvent");window.xSEL&&setTimeout("xScrollEvent()",250);var a=xScrollLeft(),b=xScrollTop();if(window.xPSL!=a||window.xPST!=b)window.xPSL=a,window.xPST=b,window.xSEL&&window.xSEL()} function xAppendChild(a,b){xDeprecate("xAppendChild");return a.appendChild?a.appendChild(b):null} function xClientHeight(){xDeprecate("xClientHeight");var a=0;xOp6Dn?a=window.innerHeight:"CSS1Compat"==document.compatMode&&!window.opera&&document.documentElement&&document.documentElement.clientHeight?a=document.documentElement.clientHeight:document.body&&document.body.clientHeight?a=document.body.clientHeight:xDef(window.innerWidth,window.innerHeight,document.width)&&(a=window.innerHeight,document.width>window.innerWidth&&(a-=16));return a} function xClientWidth(){xDeprecate("xClientWidth");var a=0;xOp6Dn?a=window.innerWidth:"CSS1Compat"==document.compatMode&&!window.opera&&document.documentElement&&document.documentElement.clientWidth?a=document.documentElement.clientWidth:document.body&&document.body.clientWidth?a=document.body.clientWidth:xDef(window.innerWidth,window.innerHeight,document.height)&&(a=window.innerWidth,document.height>window.innerHeight&&(a-=16));return a} function xCreateElement(a){xDeprecate("xCreateElement");return document.createElement?document.createElement(a):null}function xDef(){xDeprecate("xDef");for(var a=0;ab?a:b}function xGetBodyHeight(){xDeprecate("xGetBodyHeight");var a=xClientHeight(),b=window.document.body.scrollHeight;return a>b?a:b} function xGetComputedStyle(a,b,d){xDeprecate("xGetComputedStyle");var e="undefined",f=document.defaultView;if(f&&f.getComputedStyle)(a=f.getComputedStyle(a,""))&&(e=a.getPropertyValue(b));else if(a.currentStyle){e=b.split("-");b=e[0];for(f=1;fb?0:Math.round(b):-1,d=xDef(a.style);if(a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase())b=xClientHeight();else if(d&&xDef(a.offsetHeight)&&xStr(a.style.height)){if(0<=b){var e=d=0,f=0,h=0;if("CSS1Compat"==document.compatMode){var g=xGetComputedStyle,d=g(a,"padding-top",1);null!==d?(e=g(a,"padding-bottom",1),f=g(a,"border-top-width",1),h=g(a,"border-bottom-width",1)):xDef(a.offsetHeight, a.style.height)&&(a.style.height=b+"px",d=a.offsetHeight-b)}b-=d+e+f+h;if(isNaN(b)||0>b)return null;a.style.height=b+"px"}b=a.offsetHeight}else d&&xDef(a.style.pixelHeight)&&(0<=b&&(a.style.pixelHeight=b),b=a.style.pixelHeight);return b}function xHex(a,b,d){xDeprecate("xHex");var e="",a=Math.ceil(a);d&&(e=d);a=a.toString(16);for(d=0;db?0:Math.round(b):-1,d=xDef(a.style);if(a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase())b=xClientWidth();else if(d&&xDef(a.offsetWidth)&&xStr(a.style.width)){if(0<=b){var e=d=0,f=0,h=0;if("CSS1Compat"==document.compatMode){var g=xGetComputedStyle,d=g(a,"padding-left",1);null!==d?(e=g(a,"padding-right",1),f=g(a,"border-left-width",1),h=g(a,"border-right-width",1)):xDef(a.offsetWidth, a.style.width)&&(a.style.width=b+"px",d=a.offsetWidth-b)}b-=d+e+f+h;if(isNaN(b)||0>b)return null;a.style.width=b+"px"}b=a.offsetWidth}else d&&xDef(a.style.pixelWidth)&&(0<=b&&(a.style.pixelWidth=b),b=a.style.pixelWidth);return b}function xZIndex(a,b){xDeprecate("xZIndex");if(!(a=xGetElementById(a)))return 0;a.style&&xDef(a.style.zIndex)&&(xNum(b)&&(a.style.zIndex=b),b=parseInt(a.style.zIndex));return b} function xStopPropagation(a){xDeprecate("xStopPropagation");a&&a.stopPropagation?a.stopPropagation():window.event&&(window.event.cancelBubble=!0)};