// Tabkey 0.2
// June 4, 2004
// by Alex Kunin <alx at oxygenworks.net>

window.Tabkey=[0];function _L(_j,_k){return _j>_k?_j:_k};function _z(_1){this.definition=this._1=_1;window.Tabkey[this._g()]=this;this._5='_tabkey_'+this._g()+'_';this._c='window.Tabkey['+this._g()+']';if(_1.dynamics){if(_1.dynamics.init)this._m=_1.dynamics.init;if(_1.dynamics.step)this._u=_1.dynamics.step}};$=_z.prototype;$._7=['normal','active','rollovered'];$._g=function(){return this._0=this._0||window.Tabkey.length};$._D=function(_0){return _0==0};$._G=function(_0){return _0==this._1.items.length-1};$._p=function(_5,_F,_C){return'<div style="visibility: hidden; position: absolute; left: 0px; top: 0px;"'+_C+' id="'+_5+'">'+_F+'</div>'};$._J=function(_3,_0){var _8=null,_w=_3;while(!_8&&_w>=0)_8=this._1[this._7[_w--]];return this._p(this._k(_3,_0),_8[(this._D(_0)&&'first')||(this._G(_0)&&'last')]||_8['middle'],'')};$._k=function(_3,_0){return this._5+_0+'_'+_3};$._l=function(_0){return this._k('ev',_0)};$._x=function(_5){return document.getElementById(_5)};$._A=function(_3,_0){return this._x(this._k(_3,_0))};$._I=function(_0){return this._x(this._l(_0))};$._B=function(){var _h='',_9={};for(var _0 in this._1.items){_9.index=_0;for(var _3 in this._7){_9.state=this._7._3;_h+=this._o(this._o(this._J(_3,_0),this._1.items[_0]),_9);if(this._1.items[_0].re&&document.location.href.match(this._1.items[_0].re))this._f=_0};_h+=this._p(this._l(_0),'<img src="'+this._1.blankImage+'" style="width: 100%; height: 100%;" />',this._K(_0))};document.write('<div id="'+this._5+'" style="position: relative; width: '+this._1.width+'px; height: '+this._1.height+'px; white-space: nowrap;">'+_h+'</div>');window.setTimeout(this._c+'.redraw(STAGE_INIT, '+this._f+')',1)};$.onmouseover=function(_0){this._d=_0;this._i(STAGE_ONMOUSEOVER,_0);return true};$.onmouseout=function(_0){this._d=-1;this._i(STAGE_ONMOUSEOUT,_0);return true};$.onclick=function(_0){this._i(STAGE_ONCLICK,_0);document.location.href=this._1.items[_0].url||'#';return true};$._e=function(_0,_s){return' on'+_s+'="return '+this._c+'.on'+_s+'('+_0+')"'};$._K=function(_0){return this._e(_0,'mouseover')+this._e(_0,'mouseout')+this._e(_0,'click')};var STAGE_INIT=0,STAGE_ONMOUSEOVER=1,STAGE_ONMOUSEOUT=2,STAGE_ONCLICK=3;$._m=function(_6,_q,_n){};$._u=function(_6){var _t=0;for(var i in _6){_6[i].left=_t;_t+=_6[i].width+this.definition.spacing};return 0};$._E=function(){var _y=this._u(this._4);for(var _0 in this._1.items){var _H=this._d==_0?2:(this._f==_0?1:0);for(var _3 in this._7){var _2=this._A(_3,_0);_2.style.left=this._4[_0].left+'px';_2.style.top=this._4[_0].top+'px';_2.style.visibility=_3==_H?'visible':'hidden'};var _2=this._I(_0);_2.style.left=this._4[_0].left+'px';_2.style.top=this._4[_0].top+'px';_2.style.width=this._4[_0].width+'px';_2.style.height=this._4[_0].height+'px';_2.style.visibility='visible'};if(_y)window.setTimeout(this._c+'._E()',_y)};$.redraw=$._i=function(_q,_n){if(!this._4){this._4=[];for(var _0 in this._1.items){var _2=this._A(0,_0);this._4[this._4.length]= {left:_2.offsetLeft,top:_2.offsetTop,width:_2.offsetWidth,height:_2.offsetHeight,isRollovered:this._d==_0,isActive:this._f==_0}}};this._m(this._4,_q,_n);this._E()};$._o=function(_j,_r){for(var _v in _r)_j=_j.replace('{'+_v+'}',_r[_v]);return _j};function GenerateTabkey(_1){ (new _z(_1))._B()}