//<![CDATA[

/**
*** Weblane Systems (C)2008 - Weblane Inf.Tech. www.weblane.it
*** Patric Hochreiter
*** Javascript Forge Main Library (excerption)
*** see also main page copyright Webgroup (http://www.webgroup.at)
**/

$bi = (window.ActiveXObject);
$bo = (window.opera);
$bs = (document.childNodes&&!document.all&&!navigator.taintEnabled);
$bk = (document.clientWidth);
$bf = (document.getBoxObjectFor);

function wlsElementControl(_) {
  this.N = typeof _=='object'?_.id:_;
  this.E = typeof _=='object'?_:document.getElementById(_);
  if(this.E==null){alert("There is no element with id '"+_+"'"); return false;}
  this.D = this.E.tagName=='DIV'?'block':'inline';
  this.Ov = 100; //opacity value to calc
  this.O = function (o) {
    this.Ov=o;
    if(parseInt(this.Ov)>=100) this.Ov=100;
    if($bi){
      if(this.Ov==100) this.E.style.removeAttribute("zoom", false);else this.E.style.zoom=1;
      this.E.style.filter='Alpha(opacity='+parseInt(this.Ov)+')';
    }
    else this.E.style.opacity=parseInt(this.Ov)/100;}
  this.Sd = 1; //shading direction
  this.Sv = 0; //void shading direction
  this.S = function (s) {this.Ov+=s*this.Sd;if(this.Ov<0){this.Ov=0;this.Sd=1;}else if(this.Ov>100){this.Ov=100;if(this.Sv)this.Sd=-1;}this.O(this.Ov);}
  this.V0 = function () {this.E.style.visibility='hidden';}
  this.V1 = function () {this.E.style.visibility='visible';}
  this.D0 = function () {this.E.style.display='none';}
  this.D1 = function () {this.E.style.display=this.D;}
  this.XY = function (_) {if(_.y!=undefined)this.E.style.top=parseInt(_.y)+'px';if(_.x!=undefined)this.E.style.left=parseInt(_.x)+'px';}
  this.SXY = function (_) {if(_.x!=undefined)this.E.style.width=_.x;if(_.y!=undefined)this.E.style.height=_.y;}
  this.T = function (_) {this.E.innerHTML=_;}
  this.$ = function (_,$) {if($!=undefined)this.E.style[_]=$;else return this.E.style[_];}
}
function wlsEM(_,f,v){for(var i=0;i<_.length;i++)if(_[i]){if(_[i].E)_[i][f](v); else wlsEM(_[i],f,v);}}
function wlsEMS(_,s,v){for(var i=0;i<_.length;i++)if(_[i]){if(_[i].E)_[i].$(s,v); else wlsEMS(_[i],s,v);}}


//]]>
