// CodeThatSDK - JavaScript SDK // Version: 2.2.3 (12.09.04.1) // Copyright (c) 2003-04 by CodeThat.Com // http://www.codethat.com/ function Undef(o){ return typeof(o)=='undefined'||o===''||o==null};function Def(o){ return!Undef(o)};function Und(o){ return typeof(o)=='undefined'};function pI(s){ return parseInt(s)};function pB(v,d){ return Und(v)?d:v&&v!='false'};function dw(s){document.write(s)};if(!Array.prototype.push){Array.prototype.push=function(){var i,a=arguments;for(i=0;i=0;t.mac=n.indexOf('mac')>=0;t.DOM=document.getElementById?true:false;t.dynDOM=document.createElement&&document.addEventListener;t.khtml=nv.vendor=='KDE';var idx=n.indexOf('opera');t.opera=idx!=-1;if(t.opera){t.vers=parseFloat(n.substr(idx+6));t.major=Math.floor(t.vers);t.opera5=t.major==5;t.opera6=t.major==6;t.opera7=t.major==7;t.opera7up=t.vers>=7;}t.oldOpera=t.opera5||t.opera6;idx=n.indexOf('msie');if(idx>=0&&!t.opera&&!t.khtml){t.vers=parseFloat(n.substr(idx+5));t.ie3down=t.vers<4;t.ie=t.ie4up=document.all&&document.all.item&&!t.ie3down;t.ie5up=t.ie&&t.DOM;t.ie55up=t.ie&&t.vers>=5.5;t.ie6up=t.ie&&t.vers>=6}t.cm=document.compatMode;t.css1cm=t.cm=='CSS1Compat';t.nn4=nv.appName=="Netscape"&&!t.DOM&&!t.opera;if(t.nn4)t.vers=parseFloat(nv.appVersion);t.moz=t.nn6up=t.gecko=n.indexOf('gecko')!=-1;if(t.gecko)t.vers=parseFloat(n.substr(n.indexOf('rv:')+3));t.nn7up=t.gecko&&t.vers>1;t.hj=n.indexOf('hotjava')!=-1;t.aol=n.indexOf('aol')!=-1;t.aol4up=t.aol&&t.ie4up;t.major=Math.floor(t.vers);t.old=t.oldOpera||t.nn4;t.supp=t.supported=t.old||t.opera7up||t.ie||t.moz||t.DOM};var ua=new UA();function CEvent(e){var t=this;t._e=e;t.x=ua.nn4||ua.moz?e.pageX:ua.oldOpera?e.clientX:e.clientX+document.body.scrollLeft;t.y=ua.nn4||ua.moz?e.pageY:ua.oldOpera?e.clientY:e.clientY+document.body.scrollTop;t.offsetX=ua.nn4||ua.moz?e.layerX:e.offsetX;t.offsetY=ua.nn4||ua.moz?e.layerY:e.offsetY;t.screenX=e.screenX;t.screenY=e.screenY;t.target=ua.ie?e.srcElement:e.target;t.key=ua.nn4||ua.moz?e.which:e.keyCode;t.alt=ua.nn4?e.modifiers&Event.ALT_MASK:e.altKey;t.ctrl=ua.nn4?e.modifiers&Event.CONTROL_MASK:e.ctrlKey;t.shift=ua.nn4?e.modifiers&Event.SHIFT_MASK:e.shiftKey;t.spec=t.alt||t.ctrl||t.shift;var b=ua.nn4||ua.moz?e.which:e.button;t.b_left=b==1;t.b_mid=ua.nn4||ua.moz?b==2:b==4;t.b_right=ua.nn4||ua.moz?b==3:b==2};function CCodeThat(id){this._id=id;this._c=0;this.pre={};this.sz=[];this.ld=[];};{var CTp=CCodeThat.prototype;CTp.findLayer=function(name,parent){ return this.findElement(name,parent)};CTp.findElement=function(name,parent){if(ua.DOM) return document.getElementById(name);else if(ua.ie4up) return document.all[name];else{var set=Undef(parent)?document:parent.document;if(Undef(set[name])){var i,el,len=set.layers.length;if(len==0) return;else{for(i=0;i<\/script>')};CTp.path=function(p){this._path=p};CTp.regEventHandler=function(e,h,obj){if(Undef(obj))obj=document;e=e.toLowerCase();if(ua.nn4){var name=e.toUpperCase();obj.captureEvents(Event[name]);}var f=typeof(h)=="function"?function(e){var ev=ua.ie?window.event:e;if(Def(ev))ev=new CEvent(ev); return h(ev)}:typeof(h)=="string"?new Function("e","var ev=ua.ie?window.event:e;if (Def(ev)) ev=new CEvent(ev);"+h):null;obj["on"+e]=f};CTp.clearEventHandler=function(e,obj){if(Undef(obj))obj=document;e=e.toLowerCase();if(ua.nn4){var name=e.toUpperCase();obj.releaseEvents(Event[name]);}obj["on"+e]=null};CTp.setResizeHandler=CTp.setOnResize=function(h,b){var s=this.sz,id=this._id;if(!s.length){if(ua.oldOpera){var _h=new Function(id+".saveWinSize();"+id+".checkSize()");b?_h():this.setOnLoad(_h)}else{s[0]=window.onresize;window.onresize=new Function(id+'.onresize()')}}s.push(h)};CTp.setOnLoad=function(h){var l=this.ld;if(!l.length){l[0]=window.onload;window.onload=new Function(this._id+".onload()");}l.push(h)};CTp.checkSize=function(){var t=this;if(t.getWinHeight()!=t._WH||t.getWinWidth()!=t._WW){t.saveWinSize();t.onresize()}t._resTO=setTimeout(t._id+'.checkSize()',1500)};CTp.call=function(a){for(var i=0;i#"+id+"{"+st+"}";src+=(a?'<':'=0;i-=2)src+=' on'+ev[i-1]+'="'+ev[i]+'"'; return src+">"+(html||'')+'":"div>")};function CT_createLayer(id,w,h,t,l,a,v,css,bgc,bgi,cl,o,d,st,z,al,ev,html,p){var id=id||CodeThat.newID();var src=CT_lrSource(id,w,h,t,l,a,v,css,bgc,bgi,cl,o,d,st,z,al,ev,html);var parent=p||document.body;if(!CodeThat.loaded)dw(src);else if(ua.ie)parent.insertAdjacentHTML("BeforeEnd",src);else if(ua.dynDOM){var lr=document.createElement('DIV');lr.setAttribute('id',id);if(Def(css))lr.setAttribute('className',css);lr.setAttribute('style',CT_lrStyle(w,h,t,l,a,v,bgc,bgi,cl,o,d,st,z,al));lr.innerHTML=html;if(Def(ev))for(var i=ev.length-1;i>=0;i-=2)lr.addEventListener(ev[i-1],new Function(ev[i]),0);parent.appendChild(lr)}else return; return id};function CLayer(){var a=arguments,t=this;t._ex=false;if(a.length==2&&typeof(a[0])=='number'){t._w=parseInt(a[0]);t._h=parseInt(a[1])}else if(a.length>=1&&typeof a[0]=='string')t.assignLayer(CodeThat.findLayer(a[0],a[1]));t._id=t._id||CodeThat.newID();t._HTML='';t._ev=[];};{var CLp=CLayer.prototype;CLp.assignLayer=function(oLr){var t=this;if(Undef(oLr))oLr=t._id;oLr=CT_el(oLr);t._lr=oLr[0];t._st=oLr[1];t._ex=1; return t};CLp.setHTML=function(s){this._HTML=s;if(this._ex)CT_HTML(this._lr,s)};CLp.appendHTML=function(s){this.setHTML(this._HTML+s)};CLp.clear=function(){this.setHTML('')};CLp.setVisible=function(v){this._v=v;if(this._ex)CT_vis(this._lr,v)};CLp.show=function(){this.setVisible(1)};CLp.hide=function(){this.setVisible(0)};CLp.showAt=function(x,y){CT_showAt(this._lr,x,y)};CLp.setZIndex=function(z){this._z=z;if(this._ex)CT_z(this._lr,z)};CLp.setWidth=function(w){this._w=w;if(this._ex)CT_setWidth(this._lr,w);};CLp.setHeight=function(h){this._h=h;if(this._ex)CT_setHeight(this._lr,h)};CLp.resize=CLp.setSize=function(w,h){this.setHeight(h);this.setWidth(w)};CLp.setTop=function(y){this._t=y;if(this._ex)CT_setTop(this._lr,y)};CLp.setLeft=function(x){this._l=x;if(this._ex)CT_setLeft(this._lr,x)};CLp.moveTo=CLp.setPos=function(x,y){var t=this;t._l=x;t._t=y;if(t._ex)CT_moveTo(t._lr,x,y)};CLp.setRel=function(r){this._rel=r};CLp.moveRel=function(dx,dy){this.moveTo(this.getLeft()+dx,this.getTop()+dy)};CLp.setCSS=function(css){this._css=css;if(this._ex)CT_css(this._lr,css)};CLp.setID=function(id){if(!this._ex)this._id=id||CodeThat.newID();};CLp.setBgColor=function(c){this._bgC=c;if(this._ex)CT_setBgColor(this._lr,c)};CLp.setBgImage=function(url){this._bgI=url;if(this._ex)CT_setBgImage(this._lr,url)};CLp.clip=function(x,y,w,h){this._cl=[y,x+w,y+h,x];if(this._ex)CT_clip(this._lr,x,y,w,h)};CLp.setDisplay=function(d){this._dsp=d;if(this._ex)CT_display(this._lr,d)};CLp.setOverflow=function(o){this._ov=o;if(this._ex)CT_overflow(this._lr,o)};CLp.addEventHandler=function(ev,src){this._ev.push([ev.toLowerCase(),src]);};CLp.clearHandlers=function(){this._ev=[]};CLp.setAlpha=function(a){this._al=a;if(this._ex)CT_al(this._lr,a)};CLp.addStyle=function(st){this._sty=st};CLp.object=function(){ return this._lr};CLp.getHTML=function(){ return this._HTML};CLp.getVisible=function(){ return this._ex?CT_getVis(this._lr):this._v};CLp.getWidth=function(){var t=this;if(t._ex&&(!ua.nn4||Undef(t._w)))t._w=CT_getWidth(t._lr); return t._w};CLp.getHeight=function(){var t=this;if(t._ex&&(!ua.nn4||Undef(t._h)))t._h=CT_getHeight(t._lr); return t._h};CLp.getSize=function(){ return[this.getWidth(),this.getHeight()]};CLp.getContentWidth=function(){ return this._ex?CT_getContentWidth(this._lr):this._w};CLp.getContentHeight=function(){ return this._ex?CT_getContentHeight(this._lr):this._h};CLp.getTop=function(){ return this._ex?CT_getTop(this._lr):this._t};CLp.getLeft=function(){ return this._ex?CT_getLeft(this._lr):this._l};CLp.getPos=function(){ return[this.getLeft(),this.getTop()]};CLp.getAbsoluteTop=function(){ return this._ex?CT_getAbsTop(this._lr):this._t};CLp.getAbsoluteLeft=function(){ return this._ex?CT_getAbsLeft(this._lr):this._l};CLp.getAbsolutePos=function(){ return[this.getAbsoluteLeft(),this.getAbsoluteTop()]};CLp.getID=function(){ return this._ex?this._lr.id||this._lr.name:this._id};CLp.getCSS=function(){ return this._ex?this._lr.className:this._css};CLp.remapEv=function(){var i,e=this._ev,ev=[];for(i=0;is.length-1)break;if(s.charAt(index)=='<'){index++;if(s.charAt(index)=='?'){index=s.indexOf('>',index)+1}else if(s.charAt(index)=='/'){close=true;index=s.indexOf('>',index)+1}else if(s.substr(index,3)=='!--'){index=s.indexOf('-->',index)+3}else if(s.substr(index,8)=='![CDATA['){index+=8;var end=s.indexOf(']]>',index);var charnode=new CNode("CHARDATA","",tag);charnode.value=s.substr(index,end-index);tag.subitems.push(charnode);index=end+3}else if(s.charAt(index)=='!'){index=s.indexOf('>',index)+1}else{var tagname=this.getCharname(s,index);if(tagname==null||tagname.length==0){ return null}else{index+=tagname.length;index=this.skipWhitespaces(s,index);var newtag=new CNode("ELEMENT",tagname,tag);while(s.charAt(index)!='/'&&s.charAt(index)!='>'){var paramname=this.getCharname(s,index);var param=new CNode("PARAMETER",paramname,newtag);newtag.parameters.push(param);index+=paramname.length;index=this.skipWhitespaces(s,index);if(s.charAt(index)!='='){}index++;index=this.skipWhitespaces(s,index);if(s.charAt(index)!='\"'){}index++;var paramend=s.indexOf("\"",index);param.value=this.processValue(s.substr(index,paramend-index));index=this.skipWhitespaces(s,paramend+1)}tag.subitems.push(newtag);index=s.indexOf('>',index)+1;if(s.charAt(index-2)=='/'){}else{index=this.parse(s,index,newtag)}}}}else{var end=s.indexOf('<',index);var charnode=new CNode("CHARDATA","",tag);charnode.value=this.processValue(s.substr(index,end-index));tag.subitems.push(charnode);index=end}} return index};CXp.skipWhitespaces=function(str,begin){var c,i=begin;while(i'||c=='<'||c=='='||c==' '))++i; return str.substr(begin,i-begin)};CXp.processValue=function(str){var a=[];a=str.split("<");str=a.join("<");a=str.split(">");str=a.join(">");a=str.split(""");str=a.join("\"");a=str.split("'");str=a.join("\'");a=str.split("&");str=a.join("&"); return str};CXp.toObject=function(node){node=node||this.tree;var i,o;if(node.parameters.length==0&&node.subitems.length==1&&node.subitems[0].type=='CHARDATA')o=node.subitems[0].value;else{o={};for(i=0;i