function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(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 MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}

function tmt_divSplitHorizOut(tl,dur,incr){
	var nn4=(document.layers)?true:false;transNo=parseInt(16);arHidden=new Array(1,3,14,16);
	var t=(document.getElementById)?tmt_findObj(tl):MM_findObj(tl);
	if(document.all&&t){t.style.filter="revealTrans(duration="+dur+",transition=16)";endState="hidden";
	for(i=0;i<arHidden.length;i++){if(arHidden[i]==transNo){endState="visible";t.style.visibility="hidden";}}
	t.filters.revealTrans.apply();t.style.visibility=endState;t.filters.revealTrans.play();return;}
	if(navigator.appName=='Netscape'&&t){intval=100;if(incr==0){
    if(nn4){t.origLeft=t.clip.left;t.origTop=t.Top=t.clip.top;t.origRight=t.clip.right;
    t.origBottom=t.Bottom=t.clip.bottom;t.Height=t.clip.height;}else{
    t.style.overflow='hidden';t.Top=0;t.Bottom=t.Height=t.offsetHeight;}
    mSecs=dur*1000;visits=(mSecs/intval);fullH=t.Height;halfH=fullH/2;
    increment=halfH/visits;t.Top+=halfH;t.Bottom-=halfH;
    if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;t.visibility="show";}else{
    t.style.clip="rect("+t.Top+"px auto "+t.Bottom+"px auto)";
    t.style.visibility='visible';}t.Top-=increment;t.Bottom+=increment;
    if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
    t.style.clip="rect("+t.Top+"px auto "+t.Bottom+"px auto)";}}else{
	t.Top-=increment;t.Bottom+=increment;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px auto "+t.Bottom+"px auto)";}}
	if((t.Top-t.origTop)<=increment){
	if(nn4){t.clip.top=t.origTop;t.clip.bottom=t.origBottom;}else{
	t.style.clip="rect(auto)";}}else{
	setTimeout('tmt_divSplitHorizOut("'+tl+'",'+dur+','+increment+')',intval);}}
}

function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v3.0
  //Copyright 1998 Macromedia, Inc. All rights reserved.
  var i,j,aLayer,retVal,curDrag=null,NS=(navigator.appName=='Netscape'), curLeft, curTop;
  if (!document.all && !document.layers) return false;
  retVal = true; if(!NS && event) event.returnValue = true;
  if (MM_dragLayer.arguments.length > 1) {
    curDrag = MM_findObj(objName); if (!curDrag) return false;
    if (!document.allLayers) { document.allLayers = new Array();
      with (document) if (NS) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
        for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
          with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
      } else for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i];}
    curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
    curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
    curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
    curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
    curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
    curDrag.MM_oldZ = (NS)?curDrag.zIndex:curDrag.style.zIndex;
    curLeft= (NS)?curDrag.left:curDrag.style.pixelLeft; curDrag.MM_startL = curLeft;
    curTop = (NS)?curDrag.top:curDrag.style.pixelTop; curDrag.MM_startT = curTop;
    curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop -cU;
    curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop +cD;
    curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
    document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
    if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  } else {
    var theEvent = ((NS)?objName.type:event.type);
    if (theEvent == 'mousedown') {
      var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
      var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
      var maxDragZ=null; document.MM_maxZ = 0;
      for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
        var aLayerZ = (NS)?aLayer.zIndex:aLayer.style.zIndex;
        if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
        var isVisible = (((NS)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
        if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
          var parentL=0; var parentT=0;
          if (!NS) { parentLayer = aLayer.parentElement;
            while (parentLayer != null && parentLayer.style.position) {
              parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
              parentLayer = parentLayer.parentElement; } }
          var tmpX=mouseX-(((NS)?pageX:style.pixelLeft+parentL)+MM_hLeft);
          var tmpY=mouseY-(((NS)?pageY:style.pixelTop +parentT)+MM_hTop);
          var tmpW = MM_hWidth;  if (tmpW <= 0) tmpW += ((NS)?clip.width :offsetWidth);
          var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS)?clip.height:offsetHeight);
          if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
              || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
      if (curDrag) {
        document.onmousemove = MM_dragLayer; if (NS) document.captureEvents(Event.MOUSEMOVE);
        curLeft = (NS)?curDrag.left:curDrag.style.pixelLeft;
        curTop = (NS)?curDrag.top:curDrag.style.pixelTop;
        MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
        document.MM_curDrag = curDrag;  curDrag.MM_SNAPPED=false;
        if(curDrag.MM_toFront) {
          eval('curDrag.'+((NS)?'':'style.')+'zIndex=document.MM_maxZ+1');
          if (!curDrag.MM_dropBack) document.MM_maxZ++; }
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mousemove') {
      if (document.MM_curDrag) with (document.MM_curDrag) {
        var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
        var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
        newLeft = mouseX-MM_oldX; newTop  = mouseY-MM_oldY;
        if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
        if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
        if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
        if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
        MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
        if (NS) {left = newLeft; top = newTop;}
        else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
        if (MM_dragJS) eval(MM_dragJS);
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mouseup') {
      document.onmousemove = null;
      if (NS) document.releaseEvents(Event.MOUSEMOVE);
      if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
      if (document.MM_curDrag) with (document.MM_curDrag) {
        if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
            (Math.pow(MM_targL-((NS)?left:style.pixelLeft),2)+
             Math.pow(MM_targT-((NS)?top:style.pixelTop),2))<=MM_tol) {
          if (NS) {left = MM_targL; top = MM_targT;}
          else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
          MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
        if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
        if(MM_dropBack) {if (NS) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
        retVal = false; if(!NS) event.returnValue = false; }
      document.MM_curDrag = null;
    }
    if (NS) document.routeEvent(objName);
  } return retVal;
}

function tmt_divBoxIn(tl,dur,incr){
	var nn4=(document.layers)?true:false;transNo=parseInt(0);arHidden=new Array(1,3,14,16);
	var t=(document.getElementById)?tmt_findObj(tl):MM_findObj(tl);
	if(document.all&&t){t.style.filter="revealTrans(duration=" + dur + ",transition=0)";endState="hidden";
	for(i=0;i<arHidden.length;i++){if(arHidden[i]==transNo){endState="visible";t.style.visibility="hidden";}}
	t.filters.revealTrans.apply();t.style.visibility = endState;t.filters.revealTrans.play();return;}
	if(navigator.appName=="Netscape"&&t){intval=100;if(incr==0){if(nn4&&t){
	t.origLeft=t.Left=t.clip.left;t.origTop=t.Top=t.clip.top;t.origRight=t.Right=t.clip.right;
	t.origBottom=t.Bottom=t.clip.bottom;t.Width=t.clip.width;t.Height=t.clip.height;}else{
	t.style.overflow='hidden';t.Left=t.Top=0;t.Right=t.Width=t.offsetWidth;t.Bottom=t.Height=t.offsetHeight;}
    mSecs=dur*1000;visits=(mSecs/intval);fullW=t.Width;fullH=t.Height;halfW=fullW/2;halfH=fullH/2;
    alternateW=alternateH=true;incW=halfW/visits;incrementW=(incW>=1)?parseInt(incW):0;
    xtraPixW=Math.round((incW-incrementW)*visits);incH=halfH/visits;
    incrementH=(incH>=1)?parseInt(incH):0;xtraPixH=Math.round((incH-incrementH)*visits);        
    if(xtraPixW>0){if(xtraPixW<=visits){if(alternateW){t.Left++;t.Right--;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
    t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    xtraPixW--;}alternateW=!alternateW;}else{t.Left++;t.Right--;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    xtraPixW--;}}t.Left+=incrementW;t.Right-=incrementW;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
    t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    if(xtraPixH>0){if(xtraPixH<=visits){if(alternateH){t.Top++;t.Bottom--;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    xtraPixH--;}alternateH=!alternateH;}else{t.Top++;t.Bottom--;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
	xtraPixH--;}}t.Top+=incrementH;t.Bottom-=incrementH;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
    t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    visits--;}else{if(xtraPixW>0){if(xtraPixW<=visits){if(alternateW){
    t.Left++;t.Right--;if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
    t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    xtraPixW--;}alternateW=!alternateW;}else{t.Left++;t.Right--;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    xtraPixW--;}}t.Left+=incrementW;t.Right-=incrementW;
    if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    if(xtraPixH>0){if(xtraPixH<=visits){if(alternateH){t.Top++;t.Bottom--;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    xtraPixH--;}alternateH=!alternateH;}else{t.Top++;t.Bottom--;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip = "rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    xtraPixH--;}}t.Top+=incrementH;t.Bottom-=incrementH;
    if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    visits--;}t.Width=t.Right-t.Left;t.Height=t.Bottom-t.Top;if(t.Height<=0&&t.Width<=0){
    if(nn4){t.visibility="hide";t.clip.left=t.origLeft;t.clip.top=t.origTop;
	t.clip.right=t.origRight;t.clip.bottom=t.origBottom;
    }else{t.style.visibility='hidden';t.style.clip="rect(auto)";}
	}else{setTimeout('tmt_divBoxIn("'+tl+'",'+dur+',1)',intval);}}
}

function tmt_LayerSlider(targetNN, targetIE, x, y, step, delay) {
    var changed = false;
    if (document.layers) {
        target = eval(targetNN);
        if (eval(target.moving)) {
            clearTimeout(target.tmtSlide);
        }
        if (target.left > x) {
            target.left -= eval(step);
            changed = true;
        }
        if (target.left < x) {
            target.left += eval(step);
            changed = true;
        }
        if (target.top > y) {
            target.top -= eval(step);
            changed = true;
        }
        if (target.top < y) {
            target.top += eval(step);
            changed = true;
        }
        if (changed) {
            target.moving = true;
            target.tmtSlide = setTimeout("tmt_LayerSlider(\"" + targetNN + "\",\"" + targetIE + "\",\"" + x + "\",\"" + y + "\",\"" + step + "\",\"" + delay + "\")", delay);
        } else {
            target.moving = false;
        }
    } else {
        if (document.all) {
            IEobjStr = targetIE.replace("['", ".");
            target = eval(IEobjStr.replace("']", ""));
            if (eval(target.moving)) {
                clearTimeout(target.tmtSlide);
            }
            if (target.style.pixelLeft > x) {
                target.style.pixelLeft -= eval(step);
                changed = true;
            }
            if (target.style.pixelLeft < x) {
                target.style.pixelLeft += eval(step);
                changed = true;
            }
            if (target.style.pixelTop > y) {
                target.style.pixelTop -= eval(step);
                changed = true;
            }
            if (target.style.pixelTop < y) {
                target.style.pixelTop += eval(step);
                changed = true;
            }
            if (changed) {
                target.moving = true;
                target.tmtSlide = setTimeout("tmt_LayerSlider(\"" + targetNN + "\",\"" + targetIE + "\",\"" + x + "\",\"" + y + "\",\"" + step + "\",\"" + delay + "\")", delay);
            } else {
                target.moving = false;
            }
        }
    }
}

function tmt_LayerSliderStop(){
  var args = tmt_LayerSliderStop.arguments;var i=0;
  for (i=0;i<args.length;i++){
    tmt_div=args[i];
    if (document.all){eval("tmt_div=tmt_div.replace(/.layers/gi, '.all')")}
    if ((document.all)||(document.layers)){eval("if("+tmt_div+".tmtSlide!=null)clearTimeout("+tmt_div+".tmtSlide)")}
  }
}

function tmt_divSplitVertOut(tl,dur,incr){
	var nn4=(document.layers)?true:false;transNo=parseInt(14);arHidden=new Array(1,3,14,16);
	var t=(document.getElementById)?tmt_findObj(tl):MM_findObj(tl);if(document.all&&t){
	t.style.filter="revealTrans(duration=" + dur + ",transition=14)";endState="hidden";
	for(i=0;i<arHidden.length;i++){if(arHidden[i]==transNo){endState="visible";t.style.visibility="hidden";}}
	t.filters.revealTrans.apply();t.style.visibility=endState;t.filters.revealTrans.play();return;}
	if(navigator.appName=='Netscape'&&t){intval=100;if(incr==0){
	if(nn4){t.origLeft=t.Left=t.clip.left;t.origTop=t.clip.top;t.origRight=t.Right=t.clip.right;
	t.origBottom=t.clip.bottom;t.Width=t.clip.width;}else{
	t.style.overflow='hidden';t.Width=t.Right=t.offsetWidth;t.Left=0;}
	mSecs=dur*1000;visits=(mSecs/intval);fullW=t.Width;halfW=fullW/2;
	increment=Math.round(halfW/visits);t.Left+=halfW;t.Right-=halfW;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;t.visibility="show";}else{
	t.style.clip="rect(auto "+t.Right+"px auto "+t.Left+"px)";
	t.style.visibility='visible';}t.Left-=increment;t.Right+=increment;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
	t.style.clip="rect(auto "+t.Right+"px auto "+t.Left+"px)";}}else{
	t.Left-=increment;t.Right+=increment;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
	t.style.clip="rect(auto "+t.Right+"px auto "+t.Left+"px)";}}
	if((t.Left-t.origLeft)<=increment){
	if(nn4){t.clip.left=t.origLeft;t.clip.right=t.origRight;}else{
	t.style.clip="rect(auto)";}}else{
	setTimeout('tmt_divSplitVertOut("'+tl+'",'+dur+','+increment+')',intval);}}
}
