function lib_bwcheck()
{ //Browsercheck (needed)
    this.ver=navigator.appVersion
    this.agent=navigator.userAgent
    this.dom=document.getElementById?1:0
    this.opera5=this.agent.indexOf("Opera 5")>-1
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
    this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
    this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;
    this.ie7=(this.ver.indexOf("MSIE 8")>-1 && this.dom && !this.opera5)?1:0;
    this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
    this.ie=this.ie4||this.ie5||this.ie6||this.ie7
    this.mac=this.agent.indexOf("Mac")>-1
    this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
    this.ns4=(document.layers && !this.dom)?1:0;
    this.bw=(this.ie7 ||this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
    this.win9x = ((this.agent.indexOf('95') > 0 || this.agent.indexOf('98') > 0)  && this.agent.indexOf('win') > 0);
    return this
}
var bw=new lib_bwcheck()

/*** Please note that there are no effects available in ns4 and ie4, or explorers on the Mac! ***/

if(document.layers){ //NS4 resize fix...
    scrX= innerWidth; scrY= innerHeight;
    onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}

//object constructor...
function scrollerobj(obj,nest){
    nest=(!nest) ? "":'document.'+nest+'.'
    this.elm=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
    this.doc = bw.ns4?document.layers[obj].document:0
    this.obj = obj+'scrollerobj'; eval(this.obj+'=this')
    this.x = (bw.ns4||bw.opera5)?this.css.left:this.elm.offsetLeft
    this.y = (bw.ns4||bw.opera5)?this.css.top:this.elm.offsetTop
    this.w = (bw.ie4||bw.ie5||bw.ie6||bw.ie7||bw.ns6)?this.elm.offsetWidth:bw.ns4?this.elm.clip.width:bw.opera5?this.css.pixelWidth:0
    this.h = (bw.ie4||bw.ie5||bw.ie6||bw.ie7||bw.ns6)?this.elm.offsetHeight:bw.ns4?this.elm.clip.height:bw.opera5?this.css.pixelHeight:0
}

//object methods...
scrollerobj.prototype.moveTo = function(x,y){
    if(x!=null){this.x=x; this.css.left=x}
    if(y!=null){this.y=y; this.css.top=y}
}
scrollerobj.prototype.moveBy = function(x,y){this.moveTo(this.x+x,this.y+y)}
scrollerobj.prototype.hideIt = function(){this.css.visibility='hidden'}
scrollerobj.prototype.showIt = function(){this.css.visibility='visible'}

scrollerobj.prototype.clipTo = function(t,r,b,l){
 if(bw.ns4){
    this.css.clip.top=t;
    this.css.clip.right=r;
    this.css.clip.bottom=b;
    this.css.clip.left=l;
  }else{
    if(t<0)t=0;if(r<0)r=0;if(b<0)b=0;if(b<0)b=0;
    this.css.clip="rect("+t+","+r+","+b+","+l+")";
  }
}

/****************************************************************
Slide methods...
****************************************************************/
scrollerobj.prototype.slide = function(target, acceleration, time, fn){
    this.slideFn= fn?fn:null;
    this.moveTo(0,activeScroll.h);
//    if (bw.ie4&&!bw.mac) this.css.filter = 'alpha(opacity=100)';
    if (bw.ns6) this.css.MozOpacity = 1;
    this.showIt();
    this.doSlide(target, acceleration, time);
}
scrollerobj.prototype.doSlide = function(target, acceleration, time){
    this.step = Math.round(this.y*acceleration);
    if (this.step<1) this.step = 1;
    if (this.step>this.y) this.step = this.y;
    this.moveBy(0, -this.step);
    if (this.y>target) this.slideTim = setTimeout(this.obj+'.doSlide('+target+','+acceleration+','+time+')', time);
    else {
        eval(this.slideFn);
        this.slideFn = null;
    }
}

scrollerobj.prototype.slidedown = function(target, acceleration, time, fn){
    this.slideFn2= fn?fn:null;
    this.moveTo(0,0);
//    if (bw.ie4&&!bw.mac) this.css.filter = 'alpha(opacity=100)';
    if (bw.ns6) this.css.MozOpacity = 1;
    this.showIt();
    this.doSlidedown(target, acceleration, time);
}
scrollerobj.prototype.doSlidedown = function(target, acceleration, time){
    this.step = Math.round((target-this.y)*acceleration);
    if (this.step<5) this.step = 5;
    if (this.step>target) this.step = target;
    this.moveBy(0, this.step);
    if (this.y<target) this.slideTim = setTimeout(this.obj+'.doSlidedown('+target+','+acceleration+','+time+')', time);
    else {
        eval(this.slideFn2);
        this.slideFn2 = null;
    }
}

/****************************************************************
Opacity methods...
****************************************************************/
scrollerobj.prototype.blend= function(vis, fn){
    if (bw.ie5||bw.ie6||bw.ie7 && !bw.mac) {
        if (vis=='visible') this.css.filter= 'blendTrans(duration=0.9)';
        else this.css.filter= 'blendTrans(duration=0.6)';
        this.elm.onfilterchange = function(){ eval(fn); };
        this.elm.filters.blendTrans.apply();
        this.css.visibility= vis;
        this.elm.filters.blendTrans.play();
    }
    else if (bw.ns6 || bw.ie&&!bw.mac){
        this.css.visibility= 'visible';
        vis=='visible' ? this.fadeTo(100, 7, 40, fn) : this.fadeTo(0, 9, 40, fn);
    }
    else {
        this.css.visibility= vis;
        eval(fn);
    }
}

scrollerobj.prototype.op= 100;
scrollerobj.prototype.opacityTim= null;
scrollerobj.prototype.setOpacity= function(num){
    this.css.filter= 'alpha(opacity='+num+')';
    this.css.MozOpacity= num/100;
    this.op= num;
}
scrollerobj.prototype.fadeTo= function(target, step, time, fn){
    clearTimeout(this.opacityTim);
    this.opacityFn= fn?fn:null;
    this.op = target==100 ? 0 : 100;
    this.fade(target, step, time);
}
scrollerobj.prototype.fade= function(target, step, time){
    if (Math.abs(target-this.op)>step){
        target>this.op? this.setOpacity(this.op+step):this.setOpacity(this.op-step);
        this.opacityTim= setTimeout(this.obj+'.fade('+target+','+step+','+time+')', time);
    }
    else {
        this.setOpacity(target);
        eval(this.opacityFn);
        this.opacityFn= null;
    }
}

scrollerobj.prototype.write= function(text) {
    if (bw.ns4) {
        var mylayer = this.doc;
        mylayer.open();
        mylayer.write(text);
        mylayer.close();
    }
    else this.elm.innerHTML = text;
}

var message="";
function blured() {
    for (a in document.links) document.links[a].onfocus = document.links[a].blur;
    if (document.all) {(message);return false;}
}

//if (document.layers) {
//        window.captureEvents(Event.MOUSEDOWN);
//        window.onmousedown=clickNS;
//} else
//        document.onmouseup=clickNS;document.oncontextmenu=blured;


function clickNS(e){
         if  (document.layers||(document.getElementById&&!document.all)){
              if (e.which==2||e.which==3){
                      (message);
                      return false;
              }
         }
}
