var menuLeft=0;menuTop=0;
var ix, jx;
var Wpic=0;
var cLock=true;
var cCount=0;
var xxx;
var leftRef = "null", topRef = "null";
leftRef = ".left";
topRef = ".top";
var layerRef="null", styleSwitch="null";
if (document.layers) {
        layerRef="document.layers";
        styleSwitch="";
}else
{ if(document.all){
        layerRef="document.all";
        styleSwitch=".style";}
  else{layerRef="document.getElementById";
        styleSwitch=".style";}
}

function MM_reloadPage(init){
  if (init==true) with (navigator) {if ((document.layers)&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function checkBrowser(){
        this.ver=navigator.appVersion
        this.dom=document.getElementById?1:0
        this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
        this.ie4=(document.all && !this.dom)?1:0;
        this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
        this.ns4=(document.layers && !this.dom)?1:0;
        this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
        return this
}

bw=new checkBrowser()
var speed=1;
var speed1=1;
var speed2=1;
var speed3=1;
var speed4=1;
var loop, loop1, loop2, loop3, loop4, timer, timer1, timer2, timer3, timer4;

function makeObj(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'

        this.el=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.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight;
        this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight;
        this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth;
        this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth;
        this.left=goleft;
        this.right=goright;
/*        this.up=goup;
        this.down=godown;
        this.up1=goup1;
        this.down1=godown1;
        this.up3=goup3;
        this.down3=godown3;
        this.up4=goup4;
        this.down4=godown4;*/
        this.moveIt=moveIt;
        //this.x;
        //this.y;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}

function moveIt(x,y){
        this.x=x;this.y=y
        this.css.left=this.x
        this.css.top=this.y
}

function goright(move){
        if(this.x>(oCont.clipWidth-this.scrollWidth)){
          if (this.x<(ix-Xpic))
             {   noScroll();
             }
          else
             {
          this.moveIt(this.x-move,0);
         if(loop) setTimeout(this.obj+".right("+move+")",speed)
         };
         }
}

function goleft(move){
         if (this.x!=0)
         {
         if(this.x<0){
          if (this.x>(ix+Xpic))
             {   noScroll();}
          else
             {
                this.moveIt(this.x-move,0);
                if(loop) setTimeout(this.obj+".left("+move+")",speed)
             };}
          }
         else
             {noScroll();};
}


function scroll(speed){

        if((loaded!=false)&&(cLock!=false)){

                cLock=false;
                loop=true;
                ix=oContScroll.x;
                Xpic=66;
                if (speed>0){oContScroll.right(speed);}
                else {oContScroll.left(speed)};
        }
        else
         {
                 if ((ix==0)||(ix<-67*cCount))
                    {cLock=true;};
                 return(true);
        };}

function noScroll(){
        loop=false;
        cLock=true;
        if(timer) clearTimeout(timer);
}

function noScroll1(){
        loop1=false;
        if(timer1) clearTimeout(timer1);
}


var loaded, loaded1, loaded2, loaded3, loaded4;
function scrollInit(){
         s="Div";
        oCont=new makeObj(s);
        oContScroll=new makeObj('DivText',s);
        oContScroll.moveIt(0,0);
        if (document.layers || document.all){eval(layerRef+'["'+s+'"]'+styleSwitch+'.visibility="hidden"');}
        else {document.getElementById(s).style.visibility = "hidden"}
        loaded=true;

/*menuLeft = 296;
menuTop = 0;

        if(document.layers || document.all){(eval(layerRef+'["'+s+'"]'+styleSwitch+leftRef+'='+menuLeft));
        (eval(layerRef+'["'+s+'"]'+styleSwitch+topRef+'='+menuTop));        }
        else{
             document.getElementById(s).style.left = menuLeft;
             document.getElementById(s).style.top = menuTop;
}*/
        if (document.layers)
        {
         document.layers[s].clip.left = 323;
         document.layers[s].clip.right = 0;
         document.layers[s].clip.top = 524;
         document.layers[s].clip.bottom = 0;
        }
        if(document.layers || document.all){eval(layerRef+'["'+s+'"]'+styleSwitch+'.visibility="visible"');}
        else{document.getElementById(s).style.visibility = "visible";}
}