/* Compiled from X 4.18 by XC 1.06 on 13Jul07 */
function xEvent(evt){var e=evt||window.event;if(!e)return;this.type=e.type;this.target=e.target||e.srcElement;this.relatedTarget=e.relatedTarget;/*@cc_on if(e.type=='mouseover')this.relatedTarget=e.fromElement;else if(e.type=='mouseout')this.relatedTarget=e.toElement;@*/if(xDef(e.pageX)){this.pageX=e.pageX;this.pageY=e.pageY;}else if(xDef(e.clientX)){this.pageX=e.clientX+xScrollLeft();this.pageY=e.clientY+xScrollTop();}if(xDef(e.offsetX)){this.offsetX=e.offsetX;this.offsetY=e.offsetY;}else if(xDef(e.layerX)){this.offsetX=e.layerX;this.offsetY=e.layerY;}else{this.offsetX=this.pageX-xPageX(this.target);this.offsetY=this.pageY-xPageY(this.target);}this.keyCode=e.keyCode||e.which||0;this.shiftKey=e.shiftKey;this.ctrlKey=e.ctrlKey;this.altKey=e.altKey;if(typeof e.type=='string'){if(e.type.indexOf('click')!=-1){this.button=0;}else if(e.type.indexOf('mouse')!=-1){this.button=e.button;/*@cc_on if(e.button&1)this.button=0;else if(e.button&4)this.button=1;else if(e.button&2)this.button=2;@*/}}}xLibrary={version:'4.18',license:'GNU LGPL',url:'http://cross-browser.com/'};function xAddEventListener(e,eT,eL,cap){if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if(e.addEventListener)e.addEventListener(eT,eL,cap||false);else if(e.attachEvent)e.attachEvent('on'+eT,eL);else{var o=e['on'+eT];e['on'+eT]=typeof o=='function'?function(v){o(v);eL(v);}:eL;}}function xCamelize(cssPropStr){var i,c,a=cssPropStr.split('-');var s=a[0];for(i=1;i<a.length;++i){c=a[i].charAt(0);s+=a[i].replace(c,c.toUpperCase());}return s;}function xClientHeight(){var v=0,d=document,w=window;if((!d.compatMode||d.compatMode=='CSS1Compat')&&!w.opera&&d.documentElement&&d.documentElement.clientHeight){v=d.documentElement.clientHeight;}else if(d.body&&d.body.clientHeight){v=d.body.clientHeight;}else if(xDef(w.innerWidth,w.innerHeight,d.width)){v=w.innerHeight;if(d.width>w.innerWidth)v-=16;}return v;}function xClientWidth(){var v=0,d=document,w=window;if((!d.compatMode||d.compatMode=='CSS1Compat')&&!w.opera&&d.documentElement&&d.documentElement.clientWidth){v=d.documentElement.clientWidth;}else if(d.body&&d.body.clientWidth){v=d.body.clientWidth;}else if(xDef(w.innerWidth,w.innerHeight,d.height)){v=w.innerWidth;if(d.height>w.innerHeight)v-=16;}return v;}function xDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}return true;}function xFirstChild(e,t){e=xGetElementById(e);var c=e?e.firstChild:null;while(c){if(c.nodeType==1&&(!t||c.nodeName.toLowerCase()==t.toLowerCase())){break;}c=c.nextSibling;}return c;}function xGetComputedStyle(e,p,i){if(!(e=xGetElementById(e)))return null;var s,v='undefined',dv=document.defaultView;if(dv&&dv.getComputedStyle){s=dv.getComputedStyle(e,'');if(s)v=s.getPropertyValue(p);}else if(e.currentStyle){v=e.currentStyle[xCamelize(p)];}else return null;return i?(parseInt(v)||0):v;}function xGetElementById(e){if(typeof(e)=='string'){if(document.getElementById)e=document.getElementById(e);else if(document.all)e=document.all[e];else e=null;}return e;}function xGetElementsByTagName(t,p){var list=null;t=t||'*';p=p||document;if(typeof p.getElementsByTagName!='undefined'){list=p.getElementsByTagName(t);if(t=='*'&&(!list||!list.length))list=p.all;}else{if(t=='*')list=p.all;else if(p.all&&p.all.tags)list=p.all.tags(t);}return list||new Array();}function xHasPoint(e,x,y,t,r,b,l){if(!xNum(t)){t=r=b=l=0;}else if(!xNum(r)){r=b=l=t;}else if(!xNum(b)){l=r;b=t;}var eX=xPageX(e),eY=xPageY(e);return(x>=eX+l&&x<=eX+xWidth(e)-r&&y>=eY+t&&y<=eY+xHeight(e)-b);}function xHeight(e,h){if(!(e=xGetElementById(e)))return 0;if(xNum(h)){if(h<0)h=0;else h=Math.round(h);}else h=-1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){h=xClientHeight();}else if(css&&xDef(e.offsetHeight)&&xStr(e.style.height)){if(h>=0){var pt=0,pb=0,bt=0,bb=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pt=gcs(e,'padding-top',1);if(pt!==null){pb=gcs(e,'padding-bottom',1);bt=gcs(e,'border-top-width',1);bb=gcs(e,'border-bottom-width',1);}else if(xDef(e.offsetHeight,e.style.height)){e.style.height=h+'px';pt=e.offsetHeight-h;}}h-=(pt+pb+bt+bb);if(isNaN(h)||h<0)return;else e.style.height=h+'px';}h=e.offsetHeight;}else if(css&&xDef(e.style.pixelHeight)){if(h>=0)e.style.pixelHeight=h;h=e.style.pixelHeight;}return h;}function xLeft(e,iX){if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.left)){if(xNum(iX))e.style.left=iX+'px';else{iX=parseInt(e.style.left);if(isNaN(iX))iX=xGetComputedStyle(e,'left',1);if(isNaN(iX))iX=0;}}else if(css&&xDef(e.style.pixelLeft)){if(xNum(iX))e.style.pixelLeft=iX;else iX=e.style.pixelLeft;}return iX;}function xMoveTo(e,x,y){xLeft(e,x);xTop(e,y);}function xNextSib(e,t){e=xGetElementById(e);var s=e?e.nextSibling:null;while(s){if(s.nodeType==1&&(!t||s.nodeName.toLowerCase()==t.toLowerCase())){break;}s=s.nextSibling;}return s;}function xNum(){for(var i=0;i<arguments.length;++i){if(isNaN(arguments[i])||typeof(arguments[i])!='number')return false;}return true;}function xPageX(e){var x=0;e=xGetElementById(e);while(e){if(xDef(e.offsetLeft))x+=e.offsetLeft;e=xDef(e.offsetParent)?e.offsetParent:null;}return x;}function xPageY(e){var y=0;e=xGetElementById(e);while(e){if(xDef(e.offsetTop))y+=e.offsetTop;e=xDef(e.offsetParent)?e.offsetParent:null;}return y;}function xRemoveEventListener(e,eT,eL,cap){if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if(e.removeEventListener)e.removeEventListener(eT,eL,cap||false);else if(e.detachEvent)e.detachEvent('on'+eT,eL);else e['on'+eT]=null;}function xScrollLeft(e,bWin){var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollLeft)offset=w.document.documentElement.scrollLeft;else if(w.document.body&&xDef(w.document.body.scrollLeft))offset=w.document.body.scrollLeft;}else{e=xGetElementById(e);if(e&&xNum(e.scrollLeft))offset=e.scrollLeft;}return offset;}function xScrollTop(e,bWin){var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollTop)offset=w.document.documentElement.scrollTop;else if(w.document.body&&xDef(w.document.body.scrollTop))offset=w.document.body.scrollTop;}else{e=xGetElementById(e);if(e&&xNum(e.scrollTop))offset=e.scrollTop;}return offset;}function xSlideTo(e,x,y,uTime){if(!(e=xGetElementById(e)))return;if(!e.timeout)e.timeout=25;e.xTarget=x;e.yTarget=y;e.slideTime=uTime;e.stop=false;e.yA=e.yTarget-xTop(e);e.xA=e.xTarget-xLeft(e);if(e.slideLinear)e.B=1/e.slideTime;else e.B=Math.PI/(2*e.slideTime);e.yD=xTop(e);e.xD=xLeft(e);var d=new Date();e.C=d.getTime();if(!e.moving)_xSlideTo(e);}function _xSlideTo(e){if(!(e=xGetElementById(e)))return;var now,s,t,newY,newX;now=new Date();t=now.getTime()-e.C;if(e.stop){e.moving=false;}else if(t<e.slideTime){setTimeout("_xSlideTo('"+e.id+"')",e.timeout);s=e.B*t;if(!e.slideLinear)s=Math.sin(s);newX=Math.round(e.xA*s+e.xD);newY=Math.round(e.yA*s+e.yD);xMoveTo(e,newX,newY);e.moving=true;}else{xMoveTo(e,e.xTarget,e.yTarget);e.moving=false;if(e.onslideend)e.onslideend();}}function xStr(s){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='string')return false;}return true;}function xTop(e,iY){if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.top)){if(xNum(iY))e.style.top=iY+'px';else{iY=parseInt(e.style.top);if(isNaN(iY))iY=xGetComputedStyle(e,'top',1);if(isNaN(iY))iY=0;}}else if(css&&xDef(e.style.pixelTop)){if(xNum(iY))e.style.pixelTop=iY;else iY=e.style.pixelTop;}return iY;}function xWidth(e,w){if(!(e=xGetElementById(e)))return 0;if(xNum(w)){if(w<0)w=0;else w=Math.round(w);}else w=-1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){w=xClientWidth();}else if(css&&xDef(e.offsetWidth)&&xStr(e.style.width)){if(w>=0){var pl=0,pr=0,bl=0,br=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pl=gcs(e,'padding-left',1);if(pl!==null){pr=gcs(e,'padding-right',1);bl=gcs(e,'border-left-width',1);br=gcs(e,'border-right-width',1);}else if(xDef(e.offsetWidth,e.style.width)){e.style.width=w+'px';pl=e.offsetWidth-w;}}w-=(pl+pr+bl+br);if(isNaN(w)||w<0)return;else e.style.width=w+'px';}w=e.offsetWidth;}else if(css&&xDef(e.style.pixelWidth)){if(w>=0)e.style.pixelWidth=w;w=e.style.pixelWidth;}return w;}
/* Application */
if(top.location!=document.location)top.location=document.location;function xPage(sRoot,bLeft,bRight,bVTb){this.siteRoot=sRoot;this.left=bLeft;this.right=bRight;this.onLoad=function(){if(!this.downgrade){if(bLeft)initializeCollapsible('h3','leftColumn');if(bVTb)vtbInit();eqCol();var e=xGetElementById('footerTopLink');if(e)e.onclick=topBtnOnClick;}};this.onUnload=function(){};this.downgrade=false;if(document.getElementById||document.all){this.downgrade=false;}}function eqCol(){var lc=xGetElementById('leftColumn');var lch=xHeight(lc);var rc=xGetElementById('rightColumn');rc=xFirstChild(rc);if(lch>xHeight(rc)){xHeight(rc,lch);}}var useFixedVtb=typeof window.XMLHttpRequest!='undefined';function xNewEle(p,n,cls,h,t,clk,movr,mout){var e=document.createElement('DIV');if(e&&p){e.id=cls+n;e.className=cls;if(h){e.appendChild(document.createTextNode(h));}if(t)e.title=t;e=p.appendChild(e);if(clk)e.onclick=clk;if(movr)e.onmouseover=movr;if(mout)e.onmouseout=mout;}return e;}function vtbInit(bLeft,bRight){var rc=xGetElementById('rightColumn');var tb=xNewEle(document.getElementsByTagName('body')[0],1,'xToolbar');tb.floatOffset=xPageY('leftColumn');var b=xNewEle(tb,1,'xButton','^','Top of Page',topBtnOnClick,btnOnMouseover,btnOnMouseout);b=xNewEle(tb,2,'xButton','>','Hide',clpsBtnOnClick,btnOnMouseover,btnOnMouseout);b.clpsColor='#ffc';b.clpsEle=rc;b.collapsed=false;b=xNewEle(tb,3,'xButton','m','Menu',pumBtnOnClick,btnOnMouseover,btnOnMouseout);pumInit();vtbWinOnResize(1);xAddEventListener(window,'resize',winOnResize,false);if(!useFixedVtb){xAddEventListener(window,'scroll',vtbWinOnScroll,false);}}function clpsBtnOnClick(){clpsBtnDoClick(this,this.collapsed);}function clpsBtnDoClick(thisEle,bShow){var d,t,w,h;var lc=xGetElementById('leftColumn');var rc=xGetElementById('rightColumn');if(bShow){d='block';t='Hide';w='70';h='>';}else{d='none';t='Show';w='94';h='<';}t+=' Side Panel';rc.style.display=d;lc.style.width=w+'%';thisEle.firstChild.data=h;thisEle.title=t;thisEle.collapsed=!bShow;}function topBtnOnClick(){if(window.scrollTo)window.scrollTo(0,0);else if(window.scroll)window.scroll(0,0);else location.href='#topofpg';return false;}function btnOnMouseover(){this.className='xButtonHover';}function btnOnMouseout(){this.className='xButton';}function winOnResize(){if(!winOnResize.tmr){winOnResize.tmr=setTimeout("vtbWinOnResize();winOnResize.tmr=null;",500);}}winOnResize.tmr=null;function vtbWinOnResize(init){var tb=xGetElementById('xToolbar1');var lc=xGetElementById('leftColumn');var pm=xGetElementById('xPopupMenu1');var cw=xClientWidth();var y=xPageY(lc);if(useFixedVtb){if(init==1){tb.style.position='fixed';tb.style.zIndex='100';tb.style.visibility='visible';pm.style.position='fixed';pm.style.zIndex='101';}xMoveTo(tb,cw-xWidth(tb)-2,y);xMoveTo(pm,cw-xWidth(pm)-6,y+36);}else{xMoveTo(tb,cw-xWidth(tb)-2,y);if(init==1)tb.style.visibility='visible';else vtbWinOnScroll();}eqCol();}function winOnScroll(){if(!winOnScroll.tmr){winOnScroll.tmr=setTimeout("vtbWinOnScroll();winOnScroll.tmr=null;",500);}}winOnScroll.tmr=null;function vtbWinOnScroll(){var tb=xGetElementById('xToolbar1');xSlideTo(tb,xPageX(tb),xScrollTop()+tb.floatOffset,800);}function pumInit(){var i;var aH=xGetElementsByTagName('H3',xGetElementById('leftColumn'));var pm=xNewEle(document.getElementsByTagName('body')[0],1,'xPopupMenu');pm.style.visibility='hidden';xWidth(pm,150);pm.style.zIndex=100;var s="<div class='mnuBox'>";s+="<h4>Page Menu</h4>";for(i=0;i<aH.length;++i){aH[i].id='lnk'+i;s+="<p><a href='#"+'lnk'+i+"'>"+aH[i].firstChild.data+"</a></p>";}s+='</div>';s+="<div class='mnuBox'>";s+='<h4>Site Menu</h4>';var r="<p><a href='"+pgObj.siteRoot+"/";s+=r+"x/lib/' title='X Library Viewer'>XV</a></p>";s+=r+"x/docs/xc_reference.php' title='X Library Compiler'>XC</a></p>";s+=r+"toys/' title='Demos and Applications'>Demos</a></p>";s+=r+"talk/' title='Articles and Documentation'>Docs</a></p>";s+=r+"forums/' title='X Library Community'>Forums</a></p>";s+=r+"' title='Cross-Browser.com'>Home</a></p>";s+=r+"contact.php' title='Contact Mike'>Contact</a></p>";s+=r+"downloads/' title='Get X!'>Downloads</a></p>";s+='</div>';pm.innerHTML=s;}function pumBtnOnClick(){var pm=xGetElementById('xPopupMenu1');if(!useFixedVtb){xMoveTo(pm,xClientWidth()-xWidth(pm)-6,xPageY(this));}pm.style.visibility='visible';xAddEventListener(document,'mousemove',pumDocOnMousemove,false);}function pumDocOnMousemove(ev){var e=new xEvent(ev);var pm=xGetElementById('xPopupMenu1');var hp;if(useFixedVtb)hp=xHasPoint(pm,ev.clientX,ev.clientY,-10);else hp=xHasPoint(pm,e.pageX,e.pageY,-10);if(!hp){pm.style.visibility='hidden';xRemoveEventListener(document,'mousemove',pumDocOnMousemove,false);}}function initializeCollapsible(sTagName,sParentId){var i,icon,headings,p;p=xGetElementById(sParentId)||document;headings=p.getElementsByTagName(sTagName);for(i=0;i<headings.length;i++){icon=document.createElement('div');icon.collapsibleSection=xNextSib(headings[i]);icon.onclick=iconOnClick;icon.onclick();icon.onmouseover=iconOnMouseover;icon.onmouseout=iconOnMouseout;headings[i].appendChild(icon);}}function iconOnClick(){var section=this.collapsibleSection;if(section.style.display!='block'){section.style.display='block';this.className='CollapseIcon';this.title='Click to collapse';}else{section.style.display='none';this.className='ExpandIcon';this.title='Click to expand';}}function iconOnMouseover(){this.collapsibleSection.style.backgroundColor='#CFD4E6';}function iconOnMouseout(){this.collapsibleSection.style.backgroundColor='transparent';}

