      var strMenuVisible;
      var objMenuVisible;
      var idMenuTimer;

      function verifyCompatibleBrowser() {
        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.ie4=(document.all && !this.dom && !this.opera5)?1:0;
        this.ie=this.ie4||this.ie5||this.ie6
        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.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
            return this
      }

      var bw=new verifyCompatibleBrowser();
      var NS=(document.layers);

      function MoveArea(x,y) {
            this.x=x;
            this.y=y
            this.css.left=this.x
            this.css.top=this.y
      }

      function MoveAreaDown(move) {
            if((this.y - move) > objContainer.clipHeight - this.scrollHeight) {
                  this.MoveArea(0, this.y - move)
                  objSlider.MoveArea(2, objSlider.y+scrollMove)
                  if(loop) setTimeout(this.obj+'.down('+move+')',speed)
            }else {
                  objSlider.MoveArea(2, objDownControl.y - (parseInt(objSlider.css.height)+5))
                  objScroller.MoveArea('', intScrollerUpperBound);
            }
      }

      function MoveAreaUp(move) {
            if(this.y - move <0) {
                  this.MoveArea(0,this.y-move)
                  objSlider.MoveArea(2,objSlider.y-scrollMove)
                  if(loop) setTimeout(this.obj+'.up('+move+')',speed)
            }else {
                  objScroller.MoveArea('', intScrollerLowerBound);
                  objSlider.MoveArea(2, 15)
            }
      }

      function MoveAreaRight(move) {
            //alert('this.x='+this.x+',this.scrollWidth='+this.scrollWidth+',objGallery.clipWidth='+objGallery.clipWidth)
            if(this.x > galleryWidth-this.scrollWidth-20) {
                  this.MoveArea(this.x-move,0)
                  if(loop) setTimeout(this.obj+'.right('+move+')',speed)
            }
      }

      function MoveAreaLeft(move) {
            if(this.x<0) {
                  this.MoveArea(this.x-move,0)
                  if(loop) setTimeout(this.obj+'.left('+move+')',speed)
            }
      }

      function ConstructObject(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.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth
            this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
            this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth
            this.up=MoveAreaUp;
            this.down=MoveAreaDown;
            this.left=MoveAreaLeft;
            this.right=MoveAreaRight;
            this.MoveArea=MoveArea;
            this.evnt=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.layers.'+obj):0;
            this.ref=bw.dom||bw.ie4?document:this.css.document;

            this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0;

            this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0

            this.w=this.evnt.offsetWidth||this.css.clip.width||this.ref.width||this.css.pixelWidth||0;


            this.h=this.evnt.offsetHeight||this.css.clip.height||this.ref.height||this.css.pixelHeight||0
            this.c=0 //Clip values
            if((bw.dom || bw.ie4) && this.css.clip) {
              this.c=this.css.clip; this.c=this.c.slice(5,this.c.length-1);
              this.c=this.c.split(' ');
                for(var i=0;i<4;i++) {this.c[i]=parseInt(this.c[i])}
            }
            this.ct=this.css.clip.top||this.c[0]||0;
            this.cr=this.css.clip.right||this.c[1]||this.w||0
            this.cb=this.css.clip.bottom||this.c[2]||this.h||0;
            this.cl=this.css.clip.left||this.c[3]||0
            this.obj=obj+'Object'
            eval(this.obj+'=this')
            return this
      }

      function ResetTimer() {
            window.clearInterval(idMenuTimer);
            idMenuTimer=window.setInterval('MenuOff()',20);
      }

      function getTop(ii) {
            var i=(typeof(ii)=='string') ? document.images[ii] : ii;
            if(NS) {
                  return(i.y);
            } else {
                  yPos=i.offsetTop;
                  tempEl=i.offsetParent;
                  while (tempEl!=null) {
                        yPos+=tempEl.offsetTop;
                        tempEl=tempEl.offsetParent;
                  }
            }
            return(yPos);
      }

      function getLeft(ii) {
            var i=(typeof(ii)=='string') ? document.images[ii] : ii;
            if(NS) {
                  return(i.x);
            } else {
                  xPos=i.offsetLeft;
                  tempEl=i.offsetParent;
                  while (tempEl!=null) {
                        xPos+=tempEl.offsetLeft;
                        tempEl=tempEl.offsetParent;
                  }
            }
            return(xPos);
      }

      function getWidth(ii) {
            var i=(typeof(ii)=='string') ? document.images[ii] : ii;
            return(i.width);
      }

      function getHeight(ii) {
            var i=(typeof(ii)=='string') ? document.images[ii] : ii;
            return(i.height);
      }

      function MenuOn(objTD,strMenuName) {
	        window.clearInterval(idMenuTimer);
            objMenu=new ConstructObject(strMenuName);
            objMenu.css.left=getLeft(objTD);
            objMenu.css.visibility='visible';
            objMenuVisible=objTD;
            if (strMenuVisible) {
                  if (strMenuVisible!=strMenuName) {
                        objMenu =new ConstructObject(strMenuVisible);
                        objMenu.css.visibility='hidden';
                  }
            }
            strMenuVisible=strMenuName;
      }

      function MenuStayOn(strMenuName) {
	  
            window.clearInterval(idMenuTimer);
      }

      function MenuOff() {
            window.clearInterval(idMenuTimer);
            if (strMenuVisible) {
                  objMenu=new ConstructObject(strMenuVisible);
                  objMenu.css.visibility='hidden';
            }
      }

      function SubMenuOn(objDiv) {
            objDiv.style.backgroundColor='#FF0000';
            objDiv.style.border='#FF0000 1px solid';
      }

      function SubMenuOff(objDiv) {
            objDiv.style.backgroundColor='#B4DAFE';
            objDiv.style.border='#E0F0FF 1px solid';
      }

      function Initialize() {
            objToUse=new ConstructObject('PageFooter');
            //alert(getLeft(objToUse));
            //objColumnRight=new ConstructObject('PageColumnRight');
            //objPageColumnLeft.css.h=getTop(objColumnRight);
            //objPageColumnLeft.css.clipHeight=getTop(objColumnRight);
      }
