/*______________
|       ______  |   U I Z E     J A V A S C R I P T     A P I
|     /      /  |   -----------------------------------------
|    /    O /   |    MODULE : Uize.Element Package (version 1.2.1)
|   /    / /    |    AUTHOR : Chris van Rensburg (http://www.tomkidding.com)
|  /    / /  /| |    ONLINE : http://www.tomkidding.com/uize/uize-js-api
| /____/ /__/_| | COPYRIGHT : (c)2004-2005 Chris van Rensburg
|           |__ |   LICENSE : Distributed under the terms of the GNU General Public License
|_______________|             http://www.gnu.org/licenses/gpl.txt
*/
(function(){if(typeof Uize=='undefined')Uize={};var _a=Uize.Element={},_b='undefined',_c=document,_d='string',_e=true,_f=false,_g=null,_h=navigator,_i=_h.userAgent.toLowerCase(),_j=_h.appName=='Microsoft Internet Explorer',_k=_i.indexOf('gecko')!= -1,_l='hidden';function _m(_n){return _n&&typeof _n=='object'&&((typeof _n.tagName==_d&&typeof _n.nodeType=='number')||_n.self===_n);}function _o(_n){
return _m(_n)?_n:(typeof _c.getElementById!=_b?_c.getElementById(_n):_g);}var _p=_g;function _q(_r){if(_p==_g){_p=[];if(document.body.innerHTML.match(/Uize_Element_id/i)!=_g){var _s=(typeof document.all!=_b&&document.all.length>0)?document.all:document.getElementsByTagName('*');for(var _t=0;_t<_s.length;_t++){var _n=_s[_t],_u=_v(_n,'Uize_Element_id');if(_u!=_g){if(typeof _p[_u]==_b){_p[_u]=[_n];}else{_p[_u][_p[_u].length]=_n;}}}}}var _n=(_p!=_g&&typeof _p[_r]!=_b)?_p[_r]:_g;if(_n==_g)_n=_c.getElementsByName(_r);if(_n.length==1){_n=_n[0];}else if(_n.length==0){_n=_o(_r);}return _n;}function _v(_n,_w){return(typeof _n[_w]!=_b)?_n[_w]:((typeof _n.attributes!=_b&&_n.attributes!=_g&&typeof _n.attributes.getNamedItem!=_b&&_n.attributes.getNamedItem(_w)!=_g)?_n.attributes.getNamedItem(_w).value:((typeof _x[_w]!=_b)?_x[_w]:_g));}function _y(_z){for(var _w in _z)_x[_w]=_z[_w];}function _A(_B,_C){if(typeof _C!=_b&&_C!=_g){_D(_C,function(_n){_n.innerHTML=_B});}else{document.write(_B);}}function _E(_n,_B,_F){_D(_n,
function(_n){var _G=_c.createElement('DIV');_G.innerHTML=_B;var _H=_G.childNodes,_I=0;while(_H.length>0){var _J=_H[0];if(_F!=='before'||_n.childNodes.length==_I){_n.appendChild(_J);}else{_n.insertBefore(_J,_n.childNodes[_I]);}_I++;}});}function _D(_n,_K){if(_n!=_g){var _L=typeof _n;if(_L==_d){_D(_q(_n),_K);}else if(_m(_n)){_K(_n);}else if((_L=='object'||_L=='function')&&typeof _n.length=='number'){for(var _M=0;_M<_n.length;_M++)_D(_n[_M],_K);}else if(_L=='object'){for(var _N in _n)_D(_n[_N],_K);}}}function _O(_n){var _P=[];_D(_n,function(_n){_P[_P.length]=_n});return _P;}function _Q(_n,_R){var _S='';_n=_a.getById(_n);if(_c.defaultView&&_c.defaultView.getComputedStyle&&_c.defaultView.getComputedStyle(_n,'')){_S=_c.defaultView.getComputedStyle(_n,'')[_R];}else if(_n.currentStyle){_S=_n.currentStyle.getAttribute(_R);}else{_S=_n.style[_R];}return _S;}function _T(_n){var _P={width:0,height:0};_n=_a.getById(_n);if(_n!=_g){_P.width=parseInt(_Q(_n,'width'));_P.height=parseInt(_Q(_n,'height'));
if(isNaN(_P.width)||_n.offsetWidth>_P.width)_P.width=_n.offsetWidth;if(isNaN(_P.height)||_n.offsetHeight>_P.height)_P.height=_n.offsetHeight;}return _P;}function _U(_V,_W,_X,_Y,_Z,_0,_1,_2){var _3=_V+_X-1,_4=_W+_Y-1,_5=_Z+_1-1,_6=_0+_2-1;var _P=((_W>=_0&&_W<=_6)||(_4>=_0&&_4<=_6)||(_W<_0&&_4>_6))&&((_V>=_Z&&_V<=_5)||(_3>=_Z&&_3<=_5)||(_V<_Z&&_3>_5));return _P;}function _7(_n,_8){var _9=0,_ba=0,_bb=0,_bc=0,_bd=null;if(_m(_n)){if(typeof _8=='undefined')_8=true;if(_n.tagName=='A'&&_n.childNodes.length==1&&_n.childNodes[0].tagName=='IMG')_n=_n.childNodes[0];var _be=null,_bf=typeof _n.style!='undefined',_bg=_bf?_n.style.visibility:'',_bh=_bg=='visible'||_8=='treat as visible'||((_bg==''||_bg=='inherit')&&_8),_bi=_be;if(_bi==null)_bi=_n;_be=_bi;while(typeof _bi.parentNode!='undefined'&&typeof _bi.parentNode!='unknown'&&_bi.parentNode!=null){if(_bd==null){if(_bi.style.visibility==='visible'){_bd=true;}else if(_bi.style.visibility==='hidden'){_bd=false;}}if(_bi==_be){
if(typeof _bi.offsetLeft!='undefined')_9+=_bi.offsetLeft;if(typeof _bi.offsetTop!='undefined')_ba+=_bi.offsetTop;_be=_bi.offsetParent;}if(_bi!=_c.body&&_bi!=_c.documentElement){if(_bi!=_n&&(_bi.scrollWidth>_bi.offsetWidth||_bi.scrollHeight>_bi.offsetHeight)){_9-=_bi.scrollLeft;_ba-=_bi.scrollTop;if(_j){_9+=_bi.clientLeft;_ba+=_bi.clientTop;}if(_bd!==false){var _bj=_7(_bi);if(!_U(_9,_ba,_n.offsetWidth,_n.offsetHeight,_bj.x,_bj.y,_bj.width,_bj.height)){_bd=false;}}}}_bi=_bi.parentNode;}if(_bd==null)_bd=true;_bd=_bd&&_U(_9,_ba,_n.offsetWidth,_n.offsetHeight,_c.body.scrollLeft,_c.body.scrollTop,_c.body.offsetWidth,_c.body.offsetHeight);if(_bb==0||_bc==0){if(_bh){if(typeof _n.offsetWidth!='undefined')_bb=_n.offsetWidth;if(typeof _n.offsetHeight!='undefined')_bc=_n.offsetHeight;}if((_bb==0||_bc==0)&&_n.tagName=='DIV'){var _bk=_n.childNodes;for(var _bl=0;_bl<_bk.length;_bl++){if(_bk[_bl].nodeName.charAt(0)!='#'){var _bm=_7(_bk[_bl],_bh);if(_bm.width!=0||_bm.height!=0){_bb=Math.max(_bb,_bm.right-_9+1);
_bc=Math.max(_bc,_bm.bottom-_ba+1);}}}}}}var _bn={x:_9,y:_ba,width:_bb,height:_bc,area:_bb*_bc,left:_9,top:_ba,right:_9+_bb-1,bottom:_ba+_bc-1,seen:_bd};return _bn;}function _bo(_n){var _bp='';if(typeof _n!=_b&&_n!=_g){if(typeof _n.innerText=='string'){_bp=_n.innerText.replace(/\r|\n|\r\n/g,'');}else if(_n.textContent=='string'){_bp=_n.textContent;}else{if(_n.nodeType==3)_bp=_n.data;if(typeof _n.childNodes!=_b&&_n.childNodes!=_g){var _bk=_n.childNodes;for(var _bl=0;_bl<_bk.length;_bl++)_bp+=_bo(_bk[_bl]);}}}return _bp;}function _bq(_br,_bs){return'Uize_Element_'+_br+'Handler'+((_bs<0)?'__':'')+Math.abs(_bs);}function _bt(_n,_br,_bu,_bv){if(typeof _bv!=_d)_bv='after';_D(_n,function(_n){if(typeof _n.Uize_Element_a==_b){_n.Uize_Element_a={};_n.Uize_Element_b={};}if(typeof _n.Uize_Element_a[_br]==_b){_n.Uize_Element_a[_br]=0;_n.Uize_Element_b[_br]= -1;_n[_bq(_br,--_n.Uize_Element_a[_br])]=(typeof _n[_br]=='function')?_n[_br]:function(){return _e};_bw(_n,_br,new Function('event',
'return (typeof Uize != \'undefined\' && Uize.Element) ? Uize.Element.execHandlers (this,event,\''+_br+'\') : false'));}if(_bv=='before'){_n[_bq(_br,--_n.Uize_Element_a[_br])]=_bu;}else{_n[_bq(_br,++_n.Uize_Element_b[_br])]=_bu;}});}function _bx(_n,_by){if(typeof _by!='boolean')_by=_e;_D(_n,function(_n){_n.style.visibility=_by?'inherit':_l});}function _bz(_n,_bA){_D(_n,function(_n){_n.style.cursor=_bA?(_j?'hand':'pointer'):'default';});}function _bw(_n,_bB,_bu){_D(_n,function(_n){if(_j){if(!_bC[_bB])_bC[_bB]=[];_bC[_bB].push(_n);}_n[_bB]=_bu;if(_bB=='onclick')_bz(_n,_e);});}function _bD(_n,_by){_by=_by!==_f;_bE(_n,{position:_by?'static':'absolute',visibility:_by?'inherit':_l});}function _bF(_bG){var _bH=(_k?.999:1)*_bG,_bI={opacity:_bH,'-moz-opacity':_bH,filter:'alpha(opacity='+Math.round(_bG*100)+')'};return _bI;}function _bJ(_bI){var _P='';for(var _bK in _bI)_P+=_bK+':'+_bI[_bK]+'; ';return _P;}function _bL(_bG){return _bJ(_bF(_bG));}function _bM(_n,_bG){_bE(_n,_bF(_bG));}function _bE(_n,_bI){_D(_n,
function(_n){for(var _bK in _bI)_n.style[_bK]=_bI[_bK];});}var _x={};_a.execHandlers=function(_bN,_bB,_br){_bN.Uize_Element_c=_e;var _bO=_bN.Uize_Element_a[_br],_bP=_bN.Uize_Element_b[_br];for(var _bs=_bP;_bs>=_bO;_bs--){var _bu=_bN[_bq(_br,_bs)],_bQ=(typeof _bu==_d)?eval(_bu):_bu(_bB,_bN);_bN.Uize_Element_c=_bN.Uize_Element_c&&typeof _bQ=='boolean'&&_bQ;}return _bN.Uize_Element_c;};if(_j){var _bC={},_bR=window.onunload;window.onunload=function(){for(var _bB in _bC){var _s=_bC[_bB];for(var _t=0;_t<_s.length;_t++){try{_s[_t][_bB]=null;}catch(_bS){}}}if(typeof _bR=='function')_bR();}}_a.addEventHandler=_bt;_a.asArray=_O;_a.doForAll=_D;_a.doRectanglesOverlap=_U;_a.getAttributeValue=_v;_a.getById=_o;_a.getByNameOrId=_q;_a.getCoords=_7;_a.getDimensions=_T;_a.getOpacityProperties=_bF;_a.getOpacityStr=_bL;_a.getStyleAttribute=_Q;_a.getText=_bo;_a.injectHtml=_E;_a.insertHtml=_A;_a.setAttributeDefaults=_y;_a.setOpacity=_bM;_a.setStyle=_bE;_a.show=_bx;_a.showClickable=_bz;_a.showInLayoutFlow=_bD;
_a.stylePropertiesAsStr=_bJ;_a.wireEvent=_bw;})();