Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

????>?? 
w???????,42%&???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Root Entry????????p?|Y?r??RASH??X???}?TContents????????+XPage 1????????????
{'Symbol 2????????????>X
?????????????????

 !"#$????????????????????????????????????./0124????5678A????;<=~????????????BCDEFKHIJLTMNOPQRS`UVWXYZ[\]^_zabcdefghijklmnopqr}??????wx??{|?~?Root Entry????????p?|Y?r??RASH?9???h?oContents??????????YPage 1????????????R?'Symbol 2????????????.?
????????(????????

 !"#$????????????????)(?????????./0124????5678A????;<=j????@uBCDEFKHIJLTMNOPQRS`UVWXYZ[\]^_zabcdefghijklmnopqr}???wx??{|?~???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????CPicPage?? CPicLayer?? CPicFrame????????Zz??,
#initclip

function GenericScrollClass() {
this.enabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseInterval = undefined;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.arrowHeight = this.userUpArrow_mc._height;
this.arrowWidth = this.userUpArrow_mc._width;
this.handleHeight = this.userHandle_mc._height;
this.handleWidth = this.userHandle_mc._width;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.totalHeight = Stage.height;
this.totalWidth = Stage.width;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 50;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.userUpArrow_mc._x = this.userBar_mc._x + (( this.userBar_mc._width - this.userUpArrow_mc._width)/ 2);
this.userUpArrow_mc._y = this.userBar_mc._y;

// Handle should appear at the top of the bar
this.userHandle_mc._x = this.userBar_mc._x + (( this.userBar_mc._width - this.userHandle_mc._width)/ 2);
this.userHandle_mc._y = this.userBar_mc._y + this.userUpArrow_mc._height;

// Duplicate the up arrow and rotate it 180 degrees to create down arrow
this.userUpArrow_mc.duplicateMovieClip("GSCdownArrow",0);
this.userDownArrow_mc = GSCdownArrow;
this.userDownArrow_mc._rotation =180;

this.userDownArrow_mc._x = this.userUpArrow_mc._x + this.userUpArrow_mc._width;
this.userDownArrow_mc._y = this.userBar._y + this.userBar_mc._height;

// Assign mouse handlers for the new movie clip
this.userDownArrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};
this.userDownArrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};
this.userDownArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};
this.userDownArrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};
this.userDownArrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
fhgeneric_comp.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse > this.userHandle_mc._y)
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultState();
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = Stage.height;
// Calculate the area where the handle can display
var scrollRegion = this.userBar_mc._height - ((this.userUpArrow_mc._y + this.userUpArrow_mc._height)*2);
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;
this.pageSize = handleHeight;

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
}

if (this.bResizeable)
{
this.userHandle_mc._height = handleHeight;
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.userBar_mc._height;
// Get the thumb height
thumbHeight = this.userHandle_mc._height;
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (this.userUpArrow_mc._y + this.userUpArrow_mc._height)*2);

realPos = (truePosition*realBarHeight)/(this.maxScroll - Stage.height);
this.userHandle_mc._y = realPos + (this.userUpArrow_mc._y + this.userUpArrow_mc._height);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.userHandle_mc._y <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.userHandle_mc._y = this.userUpArrow_mc._y + this.userUpArrow_mc._height;
bMoved = true;
}
if ((this.userHandle_mc._y + this.userHandle_mc._height) >= (this.userDownArrow_mc._y - this.userDownArrow_mc._height))
{
this.userHandle_mc._y = (this.userDownArrow_mc._y - this.userDownArrow_mc._height) - this.userHandle_mc._height;
bMoved = true;
}
return bMoved;
};

GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.userHandle_mc._y +=dy;
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
this.userUpArrow_mc.gotoAndPlay("normal");
this.userDownArrow_mc.gotoAndPlay("normal");
}
else
{
this.userBar_mc.gotoAndPlay(disabled);
this.userHandle_mc.gotoAndPlay(disabled);
this.userUpArrow_mc.gotoAndPlay(disabled);
this.userDownArrow_mc.gotoAndPlay(disabled);
}
return;
};

GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userHandle_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultState();
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.userHandle_mc._y;
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25);
this.userHandle_mc.gotoAndPlay("down");
}
else
{
this.GotoDefaultState();
}
};

GenericScrollClass.prototype.onHandleDrag = function()
{
if (fhgeneric_comp.bHandleDrag)
{
var yPos = _ymouse - fhgeneric_comp.dragYPos;
fhgeneric_comp.userHandle_mc._y = yPos;
fhgeneric_comp.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
this.GotoDefaultState();
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
this.GotoDefaultState();
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function()
{
if (fhgeneric_comp.bArrowPressed)
{
if (fhgeneric_comp.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(fhgeneric_comp.ArrowInterval);
fhgeneric_comp.ArrowInterval = setInterval(fhgeneric_comp.ContinueScroll,50);
}
fhgeneric_comp.MoveHandle(0,fhgeneric_comp.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-2);
this.bArrowPressed = true;
this.nArrowMoveScroll = -2;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
this.GotoDefaultState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
this.userUpArrow_mc.gotoAndPlay("over");
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
this.GotoDefaultState();
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultState();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,2);
this.bArrowPressed = true;
this.nArrowMoveScroll = 2;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
this.GotoDefaultState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
this.userDownArrow_mc.gotoAndPlay("over");
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
this.GotoDefaultState();
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultState();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Basic Scroll Actions????O?????????????}v??#initclip

var mainStage = new Object();
mainStage.onResize = function ()
{
// Relayout the toolbar items
LayoutItems();
return;
}


Stage.addListener(mainStage);
Stage.scaleMode = "noScale";
Stage.align = "TL";

function LayoutItems()
{
fhgeneric_comp.bResize = true;
var heightRatio = (Stage.height / fhgeneric_comp.barHeight);
var oldArrowHeight = fhgeneric_comp.userUpArrow_mc._height;
var newArrowHeight = fhgeneric_comp.arrowHeight / heightRatio;

// Resize Arrows
fhgeneric_comp.userUpArrow_mc._height = newArrowHeight;
fhgeneric_comp.userDownArrow_mc._height = newArrowHeight;
// Reposition Arrows
fhgeneric_comp.userUpArrow_mc._y = fhgeneric_comp.userBar_mc._y;
fhgeneric_comp.userDownArrow_mc._y = fhgeneric_comp.userBar_mc._height;

// scale handle
if (!fhgeneric_comp.bResizeable)
{
fhgeneric_comp.userHandle_mc._height = fhgeneric_comp.handleHeight / heightRatio;
}

// Resize Handle and set page size
fhgeneric_comp.SizeHandle();

}

#endinitclip??
Resize?????3???????????? E?|
// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

#include "..\cmdtonav.as"
#include "..\cmds_nav.as"
#include "..\debug.as"

var this_lc = new LocalConnection();

uniqueHelpID = _root.uniqueHelpID;
_global.Scroll = new Object;
_global.Scroll.localHelpID = "ScrollLC" + uniqueHelpID;
var registeredWithNavHost = false;

this_lc.DoCommand = function(cmd, param1, param2)
{
switch (cmd)
{
case CmdActivateNavComponent:
{
debug_trace(CmdActivateNavComponent);
}
case CmdRegisteredNavComponent:
{
registeredWithNavHost = true;
break;
}
case CmdScrollRange:
{
SetScrollRange(param1,param2);
break;
}
case CmdScrollPosition:
{
fhgeneric_comp.MoveHandleToPosition(param1);
break;
}
default:
{
debug_trace("Scroll - unprocessed - " +cmd);
}
}
}

// Create the LocalConnection for other SWFs to talk to us
this_lc.connect(_global.Scroll.localHelpID);

// Register with the Nav Host
var idRegisterTimer = setInterval(RegisterIfNeeded, 200);

function RegisterIfNeeded()
{
if (registeredWithNavHost == false)
{
SendCmdToNav(CmdRegisterNavComponent, _global.Scroll.localHelpID, "DoCommand");
debug_trace("Scroll registering with NavHost");
}

if (registeredWithNavHost == true)
{
SendCmdToNav(CmdSetConnection, _global.Scroll.localHelpID, "Scroll");
clearInterval(idRegisterTimer);
}

return;
}

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.userBar_mc._height;
// Get the thumb height
thumbHeight = fhgeneric_comp.userHandle_mc._height;
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height)*2);
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.userHandle_mc._y - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);
// Get the percent value
// percentPos = (realPos / realBarHeight)*100;

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - Stage.height));

if (realBarHeight <= 0)
{
// percentPos = 0;
fhgeneric_comp.realPosition=0;
realPos = 0;
}

// Send the command to the NavHost
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);

// SendCmdToNav(CmdSetScrollContent,fhgeneric_comp.realPosition,0);
}

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
LayoutItems();
}

#endinitclip??
Communications?????OO???????????8RuniqueHelpID = _root.uniqueHelpID;
// uncomment for debugging
// uniqueHelpID = 5;??
Test????O?O????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? +????????????
@????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????ABCD????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????xui8|y????????:?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Symbol 1 ?????>Symbol 30?????Symbol 5??????Symbol 9
????????e?Symbol 6????????????m%Symbol 7????N?Symbol 8????????????0{Symbol 10 ????0 ??????????????????????????????????X???????????????????????????????????????????????????????????????????????????????????????????????????????Symbol 18??????
Symbol 17??????????????Symbol 16?????????!YSymbol 19????????????y[ 
  @???? !"#$%????)Q+*-,/?????123456N89:;<=>?JABCDEFGHITKLM}OP?????S\UVWXY????]b^`_ac??defghijklmnopqrstuvwxyz{|?~???CPicPage?? CPicLayer?? CPicFrame?????????D?B
#initclip

var minMiddleHeight =20;
var arrowIncrement = 2;
var wheelDeltaBase = 120;

function GenericScrollClass() {
this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.topHeight = this.userTop_mc._height;
this.bottomHeight = this.userBottom_mc._height;
this.iconHeight = this.userIcon_mc._height;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.totalHeight = Stage.height;

// Store the objects last height
this.lastTopHeight = this.userTop_mc._height;
this.lastBottomHeight = this.userBottom_mc._height;
this.lastIconHeight = this.userIcon_mc._height;
this.lastUpArrowHeight = this.userUpArrow_mc._height;
this.lastDownArrowHeight = this.userDownArrow_mc._height;
this.lastHandleHeight = this.userHandle_mc._height;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 50;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.userUpArrow_mc._y = this.userBar_mc._y;
this.userDownArrow_mc._y = (this.userBar._y + this.userBar_mc._height)- this.userDownArrow_mc._height;

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDepths(this.userHandle_mc);
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
fhge??????????????????????????????????????????????????&????????Z???????????????????g????????????????????????????????????????????????????????????????neric_comp.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = fhgeneric_comp.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.userBar_mc._height - ((this.userDownArrow_mc._height + this.userUpArrow_mc._height));
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;
this.pageSize = handleHeight;

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.userBar_mc._height;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (this.userUpArrow_mc._y + this.userUpArrow_mc._height)*2);

realPos = (truePosition*realBarHeight)/(this.maxScroll - fhgeneric_comp.ScrollHeight);
this.SetHandleYPos(realPos + (this.user 
  
 !"#$%&'()????-.????/501<????????????67????????:;^=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]????_`abcdewf:????nlm?opqrstuv{xyz|?}~????????\??
??????
??????Q.??
??????
??????#??
?????? ?????????
Layer 1????O??????????????U???
???????{stop();
???
??????Q
stop();
??? ??????Tlstop();
??????????0stop();
??
Actions?????OO????? ??????normal?-???
??????over?~???
??????down????
??????disabled?t??????????? 

 +?
@H !"#$%&'()*+,-./0123456789:;<=>?QABCDEFGIPJKLMNO.hRSTUVWXYZ[\]^_`abcdefg????ijklm????opqrst????????????????????????????????????????????CPicPage?? CPicLayer?? CPicFrame??CPicText??
?z??? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays wUpArrow_mc._y + this.userUpArrow_mc._height));

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
return bMoved;
};

GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (fhgeneric_comp.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled??CPicPage?? CPicLayer?? CPicFrame?????????0??>
#initclip

var minMiddleHeight =20;
var arrowIncrement = 2;
var wheelDeltaBase = 120;

function GenericScrollClass() {
this.enabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.topHeight = this.userTop_mc._height;
this.bottomHeight = this.userBottom_mc._height;
this.iconHeight = this.userIcon_mc._height;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.totalHeight = Stage.height;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 50;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = fun");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlction ()
{
// Position Items
this.userUpArrow_mc._y = this.userBar_mc._y;
this.userDownArrow_mc._y = (this.userBar._y + this.userBar_mc._height)- this.userDownArrow_mc._height;

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDepths(this.userHandle_mc);
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
fhgeneric_comp.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = fhgeneric_comp.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.userBar_mc._height - ((this.userDownArrow_mc._height + this.userUpArrow_mc._height));
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;
this.pageSize = handleHeight;

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.userBar_mc._height;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (this.userUpArrow_mc._y + this.userUpArrow_mc._height)*2);

realPos = (truePosition*realBarHeight)/(this.maxScroll - fhgeneric_comp.ScrollHeight);
this.SetHandleYPos(realPos + (this.userUpArrow_mc._y + this.userUpArrow_mc._height));

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
return bMoved;
};

GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = funcay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function()
{
if (fhgeneric_comp.bHandleDrag)
{
var yPos = _ymouse - fhgeneric_comp.dragYPos;
fhgeneric_comp.SetHandleYPos(yPos);
fhgeneric_comp.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
this.GotoDefaultHandleState();
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function()
{
if (fhgeneric_comp.bArrowPressed)
{
if (fhgeneric_comp.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(fhgeneric_comp.ArrowInterval);
fhgeneric_comp.ArrowInterval = setInterval(fhgeneric_comp.ContinueScroll,50);
}
fhgeneric_comp.MoveHandle(0,fhgeneric_comp.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
this.GotoDefaultUpArrowState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
this.GotoDefaultDownArrowState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(arrowIncrement*(wheelDelta/wheelDeltaBase)));
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPtion (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (fhgeneric_comp.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function()
{
if (fhgeneric_comp.bHandleDrag)
{
var yPos = _ymouse - fhgeneric_comp.dragYPos;
fhgeneric_comp.SetHandleYPos(yPos);
fhgeneric_comp.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
this.GotoDefaultHandleState();
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
this.GotoDefaultHandleState();
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function()
{
if (fhgeneric_comp.bArrowPressed)
{
if (fhgeneric_comp.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(fhgeneric_comp.ArrowInterval);
fhgeneric_comp.ArrowInterval = setInterval(fhgeneric_comp.ContinueScroll,50);
}
fhgeneric_comp.MoveHandle(0,fhgeneric_comp.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
this.GotoDefaultUpArrowState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
this.userUpArrow_mc.gotoAndPlay("over");
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
this.GotoDefaultUpArrowState();
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
this.GotoDefaultDownArrowState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
this.userDownArrow_mc.gotoAndPlay("over");
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(arrowIncrement*(wheelDelta/wheelDeltaBase)));
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////??CPicPage?? CPicLayer?? CPicFrame????????'?B
#initclip

var minMiddleHeight =20;
var arrowIncrement = 2;
var wheelDeltaBase = 120;

function GenericScrollClass() {
this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Handle Variables
this.dragYPos = 0;
this.bHandleDr??CPicPage?? CPicLayer?? CPicFrame??????????s#initclip
var miniScroll_array = new Array();

function CreateNewChildScroll(pfnCallback)
{
debug_trace("************************************");
debug_trace("Create new Child");
debug_trace("************************************");
var newChild = new MiniScroll(pfnCallback);
newChild.SetScrollbarPosition(200,100);
miniScroll_array.push(newChild);
return newChhen the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.?????CPicPage?? CPicLayer?? CPicFrame????????? ??E
#initclip

var minMiddleHeight =20;
var wheelDeltaBase = 120;

function GenericScrollClass() {
this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 20;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._h??CPicPage?? CPicLayer?? CPicFrame?????????}?KD
#initclip

var minMiddleHeight =20;
var arrowIncrement = 2;
var wheelDeltaBase = 120;

function GenericScrollClass() {
this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Basic Scroll Actions????O??????????????8??#initclip

var mainStage = new Object();
mainStage.onResize = function ()
{
// Relayout the toolbar items
LayoutItems();
return;
}


Stage.addListener(mainStage);
Stage.scaleMode = "noScale";
Stage.align = "TL";

function LayoutItems()
{
fhgeneric_comp.bResize = true;
var heightRatio = (fhgeneric_comp.ScrollHeight / fhgeneric_comp.barHeight);

// Get the new heights for those objects that don't scale
var newUpArrowHeight = fhgeneric_comp.upArrowHeight / heightRatio;
var newDownArrowHeight = fhgeneric_comp.downArrowHeight / heightRatio;
var newTopHeight = fhgeneric_comp.topHeight / heightRatio;
var newBottomHeight = fhgeneric_comp.bottomHeight / heightRatio;
var newIconHeight = fhgeneric_comp.iconHeight / heightRatio;

// Resize Arrows
fhgeneric_comp.userUpArrow_mc._height = newUpArrowHeight;
fhgeneric_comp.userDownArrow_mc._height = newDownArrowHeight;

// Resize top, bottom, and icon
fhgeneric_comp.userIcon_mc._height= newIconHeight;
fhgeneric_comp.userTop_mc._height = newTopHeight;
fhgeneric_comp.userBottom_mc._height = newBottomHeight;

// Reposition Arrows
fhgeneric_comp.userUpArrow_mc._y = fhgeneric_comp.userBar_mc._y;
fhgeneric_comp.userDownArrow_mc._y = fhgeneric_comp.userBar_mc._height - newDownArrowHeight;

// scale handle
if (!fhgeneric_comp.bResizeable)
{
fhgeneric_comp.SetHandleHeight(fhgeneric_comp.handleHeight / heightRatio);
}

// Resize Handle and set page size
fhgeneric_comp.SizeHandle();
}

#endinitclip??
Resize?????3?????????????<?# // Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

#include "..\cmdtonav.as"
#include "..\cmds_nav.as"
#include "..\debug.as"

var this_lc = new LocalConnection();
var currentItem = undefined;

uniqueHelpID = _root.uniqueHelpID;
_global.Scroll = new Object;
_global.Scroll.localHelpID = "ScrollLC" + uniqueHelpID;
var registeredWithNavHost = false;

this_lc.DoCommand = function(cmd, param1, param2)
{
switch (cmd)
{
case CmdActivateNavComponent:
{
debug_trace(CmdActivateNavComponent);
}
case CmdRegisteredNavComponent:
{
registeredWithNavHost = true;
break;
}
case CmdScrollRange:
{
debug_trace("SetScrollRange");
SetScrollRange(param1,param2);
break;
}
case CmdScrollPosition:
{
debug_trace("SetScrollPosition");
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(param1);
fhgeneric_comp.realPosition = param1;
break;
}
default:
{
debug_trace("Scroll - unprocessed - " +cmd);
}
}
}

// Create the LocalConnection for other SWFs to talk to us
this_lc.connect(_global.Scroll.localHelpID);

// Register with the Nav Host
var idRegisterTimer = setInterval(RegisterIfNeeded, 200);

function RegisterIfNeeded()
{
if (registeredWithNavHost == false)
{
SendCmdToNav(CmdRegisterNavComponent, _global.Scroll.localHelpID, "DoCommand");
debug_trace("Scroll registering with NavHost");
}

if (registeredWithNavHost == true)
{
SendCmdToNav(CmdSetConnection, _global.Scroll.localHelpID, "Scroll");
clearInterval(idRegisterTimer);
}

return;
}

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.userBar_mc._height;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (fhgeneric_comp.userUpArrow_mc._height + fhgeneric_comp.userDownArrow_mc._height));
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}

// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
LayoutItems();
}

#endinitclip??
Communications?????OO????????????#RuniqueHelpID = _root.uniqueHelpID;
// uncomment for debugging
// uniqueHelpID = 5;??
Test????O?O???{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Basic Scroll Actions????O?????????????ts?? #initclip

var mainStage = new Object();
mainStage.onResize = function ()
{
// Relayout the toolbar items
LayoutItems();
return;
}


Stage.addListener(mainStage);
Stage.scaleMode = "noScale";
Stage.align = "TL";

function LayoutItems()
{
fhgeneric_comp.bResize = true;
var heightRatio = (fhgeneric_comp.ScrollHeight / fhgeneric_comp.barHeight);

// See if there is a change in the objects height
if (fhgeneric_comp.lastUpArrowHeight != fhgeneric_comp.userUpArrow_mc._height)
{
fhgeneric_comp.upArrowHeight = (fhgeneric_comp.upArrowHeight * fhgeneric_comp.userUpArrow_mc._height)/ fhgeneric_comp.lastUpArrowHeight;
}
if (fhgeneric_comp.lastDownArrowHeight != fhgeneric_comp.uag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = thieight/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 50;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.userUpArrow_mc._y = this.userBar_mc._y;
this.userDownArrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.topHeight = this.userTop_mc._height;
this.bottomHeight = this.userBottom_mc._height;
this.iconHeight = this.userIcon_mc._height;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.totalHeight = Stage.height;

// Store the objects last height
this.lastTopHeight = this.userTop_mc._height;
this.lastBottomHeight = this.userBottom_mc._height;
this.lastIconHeight = this.userIcon_mc._height;
this.lastUpArrowHeight = this.userUpArrow_mc._height;
this.lastDownArrowHeight = this.userDownArrow_mc._height;
this.lastHandleHeight = this.userHandle_mc._height;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 50;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.userUpArrow_mc._y = this.userBar_mc._y;
this.userDownArrow_mc._y = (this.userBar._y + this.userBar_mc._height)- this.userDownArrow_mc._height;

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDepths(this.userHandle_mc);
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
fhgeneric_comp.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = fserDownArrow_mc._height)
{
fhgeneric_comp.downArrowHeight = (fhgeneric_comp.downArrowHeight * fhgeneric_comp.userDownArrow_mc._height)/ fhgeneric_comp.lastDownArrowHeight;
}
if (fhgeneric_comp.lastTopHeight != fhgeneric_comp.userTop_mc._height)
{
fhgeneric_comp.topHeight = (fhgeneric_comp.topHeight * fhgeneric_comp.userTop_mc._height)/ fhgeneric_comp.lastTopHeight;
}
if (fhgeneric_comp.lastBottomHeight != fhgeneric_comp.userBottom_mc._height)
{
fhgeneric_comp.bottomHeight = (fhgeneric_comp.bottomHeight * fhgeneric_comp.userBottom_mc._height)/ fhgeneric_comp.lastBottomHeight;
}
if (fhgeneric_comp.lastIconHeight != fhgeneric_comp.userIcon_mc._height)
{
fhgeneric_comp.iconHeight = (fhgeneric_comp.iconHeight * fhgeneric_comp.userIcon_mc._height)/ fhgeneric_comp.lastIconHeight;
}
if (fhgeneric_comp.lastHandleHeight != fhgeneric_comp.userHandle_mc._height)
{
fhgeneric_comp.handleHeight = (fhgeneric_comp.handleHeight * fhgeneric_comp.userHandle_mc._height)/ fhgeneric_comp.lastHandleHeight;
}

// Get the new heights for those objects that don't scale
var newUpArrowHeight = fhgeneric_comp.upArrowHeight / heightRatio;
var newDownArrowHeight = fhgeneric_comp.downArrowHeight / heightRatio;
var newTopHeight = fhgeneric_comp.topHeight / heightRatio;
var newBottomHeight = fhgeneric_comp.bottomHeight / heightRatio;
var newIconHeight = fhgeneric_comp.iconHeight / heightRatio;

// Resize Arrows
fhgeneric_comp.userUpArrow_mc._height = newUpArrowHeight;
fhgeneric_comp.userDownArrow_mc._height = newDownArrowHeight;

// Resize top, bottom, and icon
fhgeneric_comp.userIcon_mc._height= newIconHeight;
fhgeneric_comp.userTop_mc._height = newTopHeight;
fhgeneric_comp.userBottom_mc._height = newBottomHeight;

// Reposition Arrows
fhgeneric_comp.userUpArrow_mc._y = fhgeneric_comp.userBar_mc._y;
fhgeneric_comp.userDownArrow_mc._y = fhgeneric_comp.userBar_mc._height - newDownArrowHeight;

// scale handle
if (!fhgeneric_comp.bResizeable)
{
fhgeneric_comp.SetHandleHeight(fhgeneric_comp.handleHealse;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = fhgeneric_comp.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.userBar_mc._height - ((this.userDownArrow_mc._height + this.userUpArrow_mc._height));
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;
this.pageSize = handleHeight;

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.userBar_mc._height;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (this.userUpArrow_mc._y + this.userUpArrow_mc._height)*2);

realPos = (truePosition*realBarHeight)/(this.maxScroll - fhgeneric_comp.ScrollHeight);
this.SetHandleYPos(realPos + (this.userUpArrow_mc._y + this.userUpArrow_mc._height));

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
return bMoved;
};

GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (fhgeneric_comp.ScrollHeight / ight / heightRatio);
}

// Store the objects height
fhgeneric_comp.lastTopHeight = fhgeneric_comp.userTop_mc._height;
fhgeneric_comp.lastBottomHeight = fhgeneric_comp.userBottom_mc._height;
fhgeneric_comp.lastIconHeight = fhgeneric_comp.userIcon_mc._height;
fhgeneric_comp.lastUpArrowHeight = fhgeneric_comp.userUpArrow_mc._height;
fhgeneric_comp.lastDownArrowHeight = fhgeneric_comp.userDownArrow_mc._height;
fhgeneric_comp.lastHandleHeight = fhgeneric_comp.userHandle_mc._height;

// Resize Handle this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function()
{
if (fhgeneric_comp.bHandleDrag)
{
var yPos = _ymouse - fhgeneric_comp.dragYPos;
fhgeneric_comp.SetHandleYPos(yPos);
fhgeneric_comp.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
this.GotoDefaultHandleState();
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function()
{
if (fhgeneric_comp.bArrowPressed)
{
if (fhgeneric_comp.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(fhgeneric_comp.ArrowInterval);
fhgeneric_comp.ArrowInterval = setInterval(fhgeneric_comp.ContinueScroll,50);
}
fhgeneric_comp.MoveHandle(0,fhgeneric_comp.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
this.GotoDefaultUpArrowState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = functionow_mc._y = (this.userBar._y + this.userBar_mc._height)- this.userDownArrow_mc._height;

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDepths(this.userHandle_mc);
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
fhgeneric_comp.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = fals????????(?????????pZ???????? ???Hint?????3??????
CPicSymbol????
??????d????????????????
??????? ?????
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????F??????? ?????
??????d??????
?????????Ty??????? ?????
??????d????()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
this.GotoDefaultDownArrowState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(arrowIncrement*(wheelDelta/wheelDeltaBase)));
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();and set page size
fhgeneric_comp.SizeHandle();
}

#endinitclip??
Resize?????3?????????????c?
// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

#include "..\cmdtonav.as"
#include "..\cmds_nav.as"

var this_lc = new LocalConnection();
var currentItem = undefined;

uniqueHelpID = _root.uniqueHelpID;
_global.Scroll = new Object;
_global.Scroll.localHelpID = "ScrollLC" + uniqueHelpID;
var registeredWithNavHost = false;

this_lc.DoCommand = function(cmd, param1, param2)
{
switch (cmd)
{
case CmdRegisteredNavComponent:
{
registeredWithNavHost = true;
break;
}
case CmdScrollRange:
{
SetScrollRange(param1,param2);
break;
}
case CmdScrollPosition:
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(param1);
fhgeneric_comp.realPosition = param1;
break;
}
default:
{
}
}
}

// Create the LocalConnection for other SWFs to talk to us
this_lc.connect(_global.Scroll.localHelpID);

// Register with the Nav Host
var idRegisterTimer = setInterval(RegisterIfNeeded, 200);

function RegisterIfNeeded()
{
if (registeredWithNavHost == false)
{
SendCmdToNav(CmdRegisterNavComponent, _global.Scroll.localHelpID, "DoCommand");
}

if (registeredWithNavHost == true)
{
SendCmdToNav(CmdSetConnection, _global.Scroll.localHelpID, "Scroll");
clearInterval(idRegise;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrs.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll =terTimer);
}

return;
}

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.userBar_mc._height;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (fhgeneric_comp.userUpArrow_mc._height + fhgeneric_comp.userDownArrow_mc._height));
// Get the thumbposition on the total scrolling area - adjust for uparr?????????????????????????????????????????????????????????????????Z????????????????????????v??????????????????????????????????????????????????????????? 50;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.userUpArrow_mc._y = this.userBar_mc._y;
this.userDownArrow_mc._y = (this.userBar._y + this.userBar_mc._height)- this.userDownArrow_mc._height;

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDepths(this.userHandle_mc);
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
fhgeneric_comp.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. ow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}

// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
LayoutItems();
}

#endinitclip??
Communications?????OO????????????{? ///////////////////////////////////////////////////////////////////////////
// IF THESE COMMANDS ARE CHANGED HERE THEY MUST ALSO BE CHANGED IN THE
// FILE cmds_nav.as
///////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////
// General Commands
///////////////////////////////////////////////////////////////////////////

var CmdRegisterNavComponent = "CmdRegisterNavComponent"; // Sent to Nav host to register the navigation component
// PARAM1 = local connection name (string)
// PARAM2 = function name to call with commands
var CmdRegisteredNavComponent = "CmdRegisteredNavComponent"; // Sent to the component once it has been registered

var CmdSetConnection = "CmdSetConnection"; // Sent to Nav host to make the connection between the component name and the Local connection
// PARAM1 = local connection name
// PARAM2 = component name

///////////////////////////////////////////////////////////////////////////
// Scrollbar Commands to Nav host
///////////////////////////////////////////////////////////////////////////

var CmdScrollRange = "CmdScrollRange"; // Sent from the Nav host to the Scroll bar to set the scroll range
// PARAM1 = minimum scroll value
// PARAM2 = maximum scroll value

var CmdScrollPosition = "CmdScrollPosition"; // Sent from the Nav host to the Scroll bar to reposition the thumb
// PARAM1 = position of thumb (in percent area of the scroll bar)






??
Communication Commands??????O???????????C?B///////////////////////////////////////////////////////////////////////////
// IF THIS FUNCTION IS CHANGED HERE IT MUST ALSO BE CHANGED IN THE
// FILE cmdstonav.as
///////////////////////////////////////////////////////////////////////////

function SendCmdToNav(cmd, param1, param2) {

// Create the local connection
var outgoing_lc = new LocalConnection();

// Send the command to the skin SWF
outgoing_lc.send("NavCompLC" + uniqueHelpID, "DoNavReqCommand", cmd, param1, param2);

// Delete the temporary connection
delete outgoing_lc;

return;
}??
Communication Functions?????O????????????esRuniqueHelpID = _root.uniqueHelpID;
// uncomment for debugging
// uniqueHelpID = 5;??
Test????O?O???Symbol 20????}Symbol 21??????????????Symbol 23????v?\Symbol 25????????t?? It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();Symbol 1 ?????>Symbol 30?????:Symbol 5?????=Symbol 9
????????t???CPicPage?? CPicLayer?? CPicFrame?????????a?dB
#initclip

var minMiddleHeight =20;
var arrowIncrement = 2;
var wheelDeltaBase = 120;

function GenericScrollClass() {
this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 50;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.userUpArrow_mc._y = this.userBar_mc._y;
this.userDownArrow_mc._y = (this.userBar._y + this.userBar_mc._height)- this.userDownArrow_mc._height;

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDepths(this.userHandle_mc);
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
fhgeneric_comp.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.userBar_mc._height - ((this.userDownArrow_mc._height + this.userUpArrow_mc._height));
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;
this.pageSize = handleHeight;

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.userBar_mc._height;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (this.userUpArrow_mc._y + this.userUpArrow_mc._height)*2);

realPos = (truePosition*realBarHeight)/(this.maxScroll - fhgeneric_comp.ScrollHeight);
this.SetHandleYPos(realPos + (this.userUpArrow_mc._y + this.userUpArrow_mc._height));

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
return bMoved;
};

GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (fhgeneric_comp.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function()
{
if (fhgeneric_comp.bHandleDrag)
{
var yPos = _ymouse - fhgeneric_comp.dragYPos;
fhgeneric_comp.SetHandleYPos(yPos);
fhgeneric_comp.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
this.GotoDefaultHandleState();
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function()
{
if (fhgeneric_comp.bArrowPressed)
{
if (fhgeneric_comp.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(fhgeneric_comp.ArrowInterval);
fhgeneric_comp.ArrowInterval = setInterval(fhgeneric_comp.ContinueScroll,50);
}
fhgeneric_comp.MoveHandle(0,fhgeneric_comp.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
this.GotoDefaultUpArrowState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
this.GotoDefaultDownArrowState();
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericS
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Basic Scroll Actions????O????????????????? #initclip

var mainStage = new Object();
mainStage.onResize = function ()
{
// Relayout the toolbar items
LayoutItems();
return;
}


Stage.addListener(mainStage);
Stage.scaleMode = "noScale";
Stage.align = "TL";

function LayoutItems()
{
fhgeneric_comp.bResize = true;
var heightRatio = (fhgeneric_comp.ScrollHeight / fhgeneric_comp.barHeight);

// See if there is a change in the objects height
if (fhgeneric_comp.lastUpArrowHeight != fhgeneric_comp.userUpArrow_mc._height)
{
fhgeneric_comp.upArrowHeight = (fhgeneric_comp.upArrowHeight * fhgeneric_comp.userUpArrow_mc._height)/ fhgeneric_comp.lastUpArrowHeight;
}
if (fhgeneric_comp.lastDownArrowHeight != fhgeneric_comp.userDownArrow_mc._height)
{
fhgeneric_comp.downArrowHeight = (fhgeneric_comp.downArrowHeight * fhgeneric_comp.userDownArrow_mc._height)/ fhgeneric_comp.lastDownArrowHeight;
}
if (fhgeneric_comp.lastTopHeight != fhgeneric_comp.userTop_mc._height)
{
fhgeneric_comp.topHeight = (fhgeneric_comp.topHeight * fhgeneric_comp.userTop_mc._height)/ fhgeneric_comp.lastTopHeight;
}
if (fhgeneric_comp.lastBottomHeight != fhgeneric_comp.userBottom_mc._height)
{
fhgeneric_comp.bottomHeight = (fhgeneric_comp.bottomHeight * fhgeneric_comp.userBottom_mc._height)/ fhgeneric_comp.lastBottomHeight;
}
if (fhgeneric_comp.lastIconHeight != fhgeneric_comp.userIcon_mc._height)
{
fhgeneric_comp.iconHeight = (fhgeneric_comp.iconHeight * fhgeneric_comp.userIcon_mc._height)/ fhgeneric_comp.lastIconHeight;
}
if (fhgeneric_comp.lastHandleHeight != fhgeneric_comp.userHandle_mc._height)
{
fhgeneric_comp.handleHeight = (fhgeneric_comp.handleHeight * fhgeneric_comp.userHandle_mc._height)/ fhgeneric_comp.lastHandleHeight;
}

// Get the new heights for those objects that don't scale
var newUpArrowHeight = fhgeneric_comp.upArrowHeight / heightRatio;
var newDownArrowHeight = fhgeneric_comp.downArrowHeight / heightRatio;
var newTopHeight = fhgeneric_comp.topHeight / heightRatio;
var newBottomHeight = fhgeneric_comp.bottomHeight / heightRatio;
var newIconHeight = fhgeneric_comp.iconHeight / heightRatio;

// Resize Arrows
fhgeneric_comp.userUpArrow_mc._height = newUpArrowHeight;
fhgeneric_comp.userDownArrow_mc._height = newDownArrowHeight;

// Resize top, bottom, and icon
fhgeneric_comp.userIcon_mc._height= newIconHeight;
fhgeneric_comp.userTop_mc._height = newTopHeight;
fhgeneric_comp.userBottom_mc._height = newBottomHeight;

// Reposition Arrows
fhgeneric_comp.userUpArrow_mc._y = fhgeneric_comp.userBar_mc._y;
fhgeneric_comp.userDownArrow_mc._y = fhgeneric_comp.userBar_mc._height - newDownArrowHeight;

// scale handle
if (!fhgeneric_comp.bResizeable)
{
fhgeneric_comp.SetHandleHeight(fhgeneric_comp.handleHeight / heightRatio);
}

// Store the objects height
fhgeneric_comp.lastTopHeight = fhgeneric_comp.userTop_mc._height;
fhgeneric_comp.lastBottomHeight = fhgeneric_comp.userBottom_mc._height;
fhgeneric_comp.lastIconHeight = fhgeneric_comp.userIcon_mc._height;
fhgeneric_comp.lastUpArrowHeight = fhgeneric_comp.userUpArrow_mc._height;
fhgeneric_comp.lastDownArrowHeight = fhgeneric_comp.userDownArrow_mc._height;
fhgeneric_comp.lastHandleHeight = fhgeneric_comp.userHandle_mc._height;

// Resize Handle and set page size
fhgeneric_comp.SizeHandle();
}

#endinitclip??
Resize?????3?????????????
?? // Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

var this_lc = new LocalConnection();
var currentItem = undefined;

uniqueHelpID = _root.uniqueHelpID;
_global.Scroll = new Object;
_global.Scroll.localHelpID = "ScrollLC" + uniqueHelpID;
var registeredWithNavHost = false;

this_lc.DoCommand = function(cmd, param1, param2)
{
switch (cmd)
{
case CmdRegisteredNavComponent:
{
registeredWithNavHost = true;
break;
}
case CmdScrollRange:
{
SetScrollRange(param1,param2);
break;
}
case CmdScrollPosition:
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(param1);
fhgeneric_comp.realPosition = param1;
break;
}
default:
{
}
}
}

// Create the LocalConnection for other SWFs to talk to us
this_lc.connect(_global.Scroll.localHelpID);

// Register with the Nav Host
var idRegisterTimer = setInterval(RegisterIfNeeded, 200);

function RegisterIfNeeded()
{
if (registeredWithNavHost == false)
{
SendCmdToNav(CmdRegisterNavComponent, _global.Scroll.localHelpID, "DoCommand");
}

if (registeredWithNavHost == true)
{
SendCmdToNav(CmdSetConnection, _global.Scroll.localHelpID, "Scroll");
clearInterval(idRegisterTimer);
}

return;
}

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.userBar_mc._height;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (fhgeneric_comp.userUpArrow_mc._height + fhgeneric_comp.userDownArrow_mc._height));
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}

// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
LayoutItems();
}

#endinitclip??
Communications?????OO????????????o? ///////////////////////////////////////////////////////////////////////////
// IF THESE COMMANDS ARE CHANGED HERE THEY MUST ALSO BE CHANGED IN THE
// FILE cmds_nav.as
///////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////
// General Commands
///////////////////////////////////////////////////////////////////////////

var CmdRegisterNavComponent = "CmdRegisterNavComponent"; // Sent to Nav host to register the navigation component
// PARAM1 = local connection name (string)
// PARAM2 = function name to call with commands
var CmdRegisteredNavComponent = "CmdRegisteredNavComponent"; // Sent to the component once it has been registered

var CmdSetConnection = "CmdSetConnection"; // Sent to Nav host to make the connection between the component name and the Local connection
// PARAM1 = local connection name
// PARAM2 = component name

///////////////////////////////////////////////////////////////////////////
// Scrollbar Commands to Nav host
///////////////////////////////////////////////////////////////////////////

var CmdScrollRange = "CmdScrollRange"; // Sent from the Nav host to the Scroll bar to set the scroll range
// PARAM1 = minimum scroll value
// PARAM2 = maximum scroll value

var CmdScrollPosition = "CmdScrollPosition"; // Sent from the Nav host to the Scroll bar to reposition the thumb
// PARAM1 = position of thumb (in percent area of the scroll bar)






??
Communication Commands??????O????????????&?B///////////////////////////////////////////////////////////////////////////
// IF THIS FUNCTION IS CHANGED HERE IT MUST ALSO BE CHANGED IN THE
// FILE cmdstonav.as
///////////////////////////////////////////////////////////////////////////

function SendCmdToNav(cmd, param1, param2) {

// Create the local connection
var outgoing_lc = new LocalConnection();

// Send the command to the skin SWF
outgoing_lc.send("NavCompLC" + uniqueHelpID, "DoNavReqCommand", cmd, param1, param2);

// Delete the temporary connection
delete outgoing_lc;

return;
}??
Communication Functions?????O????????????dRuniqueHelpID = _root.uniqueHelpID;
// uncomment for debugging
// uniqueHelpID = 5;??
Test????O?O???
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.userBar_mc._height - ((this.userDownArrow_mc._height + this.userUpArrow_mc._height));
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;
this.pageSize = handleHeight;

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.userBar_mc._height;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (this.userUpArrow_mc._y + this.userUpArrow_mc._height)*2);

realPos = (truePosition*realBarHeight)/(this.maxScroll - fhgeneric_comp.ScrollHeight);
this.SetHandleYPos(realPos + (this.userUpArrow_mc._y + this.userUpArrow_mc._height));

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
return bMoved;
};

GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (fhgeneric_comp.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function()
{
if (fhgeneric_comp.bHandleDrag)
{
var yPos = _ymouse - fhgeneric_comp.dragYPos;
fhgeneric_comp.SetHandleYPos(yPos);
fhgeneric_comp.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function()
{
if (fhgeneric_comp.bArrowPressed)
{
if (fhgeneric_comp.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(fhgeneric_comp.ArrowInterval);
fhgeneric_comp.ArrowInterval = setInterval(fhgeneric_comp.ContinueScroll,50);
}
fhgeneric_comp.MoveHandle(0,fhgeneric_comp.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;

// Set YPosition and height
this.userBar_mc._y = yPos;
this.userUpArrow_mc._y = yPos;
this.userBar_mc._height = SCHeight;
this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

this.SizeHandle();
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
??????
??????^T??,
??,????2????
???????:??,
??,&????2???????????5??,
??,'??????
??????2??,
??,??????????O??
Arrow????O??????????????f???
??????<stop();
???
???????/stop();
??? ???????Cstop();
?????????stop();
??
Actions?????OO????? ??????normal?V???
??????overZR???
Symbol 36!???????Symbol 37????"????9J?S 38 1183407290 ?????????????|????????????crollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;

// Set YPosition and height
this.userBar_mc._y = yPos;
this.userUpArrow_mc._y = yPos;
this.userBar_mc._height = SCHeight;
this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

this.SizeHandle();
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Basic Scroll Actions????O???????????????
// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

var debug_trace = _parent.debug_trace;

var this_lc = new LocalConnection();
var currentItem = undefined;

uniqueHelpID = _root.uniqueHelpID;
_global.Scroll = new Object;
_global.Scroll.localHelpID = "ScrollLC" + uniqueHelpID;
var registeredWithNavHost = false;

this_lc.DoCommand = function(cmd, param1, param2)
{
switch (cmd)
{
case CmdRegisteredNavComponent:
{
registeredWithNavHost = true;
break;
}
case CmdScrollRange:
{
SetScrollRange(param1,param2);
break;
}
case CmdScrollPosition:
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(param1);
fhgeneric_comp.realPosition = param1;
break;
}
default:
{
}
}
}

// Create the LocalConnection for other SWFs to talk to us
this_lc.connect(_global.Scroll.localHelpID);

// Register with the Nav Host
var idRegisterTimer = setInterval(RegisterIfNeeded, 200);

function RegisterIfNeeded()
{
if (registeredWithNavHost == false)
{
SendCmdToNav(CmdRegisterNavComponent, _global.Scroll.localHelpID, "DoCommand");
}

if (registeredWithNavHost == true)
{
SendCmdToNav(CmdSetConnection, _global.Scroll.localHelpID, "Scroll");
clearInterval(idRegisterTimer);
}

return;
}

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.userBar_mc._height;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (fhgeneric_comp.userUpArrow_mc._height + fhgeneric_comp.userDownArrow_mc._height));
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

#endinitclip??
Communications?????OO???????????? ///////////////////////////////////////////////////////////////////////////
// IF THESE COMMANDS ARE CHANGED HERE THEY MUST ALSO BE CHANGED IN THE
// FILE cmds_nav.as
///////////////////////////////////////////////////////////////////////////

#initclip
///////////////////////////////////////////////////////////////////////////
// General Commands
///////////////////////////////////////////////////////////////////////////

var CmdRegisterNavComponent = "CmdRegisterNavComponent"; // Sent to Nav host to register the navigation component
// PARAM1 = local connection name (string)
// PARAM2 = function name to call with commands
var CmdRegisteredNavComponent = "CmdRegisteredNavComponent"; // Sent to the component once it has been registered

var CmdSetConnection = "CmdSetConnection"; // Sent to Nav host to make the connection between the component name and the Local connection
// PARAM1 = local connection name
// PARAM2 = component name

///////////////////////////////////////////////////////////////////////////
// Scrollbar Commands to Nav host
///////////////////////////////////////////////////////////////////////////

var CmdScrollRange = "CmdScrollRange"; // Sent from the Nav host to the Scroll bar to set the scroll range
// PARAM1 = minimum scroll value
// PARAM2 = maximum scroll value

var CmdScrollPosition = "CmdScrollPosition"; // Sent from the Nav host to the Scroll bar to reposition the thumb
// PARAM1 = position of thumb (in percent area of the scroll bar)

#endinitclip




??
Communication Commands??????O???????????F?[///////////////////////////////////////////////////////////////////////////
// IF THIS FUNCTION IS CHANGED HERE IT MUST ALSO BE CHANGED IN THE
// FILE cmdstonav.as
///////////////////////////////////////////////////////////////////////////

#initclip

function SendCmdToNav(cmd, param1, param2) {

// Create the local connection
var outgoing_lc = new LocalConnection();

// Send the command to the skin SWF
outgoing_lc.send("NavCompLC" + uniqueHelpID, "DoNavReqCommand", cmd, param1, param2);

// Delete the temporary connection
delete outgoing_lc;

return;
}

#endinitclip??
Communication Functions?????O?????????????_RuniqueHelpID = _root.uniqueHelpID;
// uncomment for debugging
// uniqueHelpID = 5;??
Test????O?O?????????????????????? ?????
???????????????
?????????2#??????? ?????
????????????*

 !"#$%&'()????+,-????/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd????fghijkl????nopqrstuvwxyz{|}~?Symbol 11????
????GSSymbol 13??????????????Symbol 14 ????-1fSymbol 15????????s?e?????????????????? ???Bottom????O?????????????????}?????????
?????????[O???stop();
??????
?????????h%???stop();
?????? ?????????v???stop();
??????????????? /???stop();
????? ???Actions??????_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

?_sans?(normal:n?_sans?( Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

?_sans?(??0l??0l????????????????????? ???Layer 1????O???????CPicPage?? CPicLayer?? CPicFrame??????????????????pmn?? ?0??0?0 over:??_sans?( Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a sOO????? ?????????normal?X?????????
?????????over??????????
?????????down???????????
Labels????O?O???
?????????????A
???????? ???BG????O?O??????????????d???????? ???Button?????OO????
?????????disabled????????????????????B???????? ???Labels????O?O???bcdefgh?jklmnopq?stuv????xyz{|}~??????CPicPage?? CPicLayer?? CPicFrame??CPicText??
????? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???????????(?????????1???????? ???Hint?????3??????
CPicSymbold??????????????????????? ??????????
??????????
??????? ?d??????
?????????xT??????? ?d???????????????sm??????? ??????????
?????????M??????? ?????????????????g???????? ???Top????O?????????????????T?????????
??????????X???stop();
????????CPicPage?? CPicLayer?? CPicFrame??????????s#initclip
var miniScroll_array = new Array();

function CreateNewChildScroll(pfnCallback)
{
debug_trace("************************************");
debug_trace("Create new Child");
debug_trace("************************************");
var newChild = new MiniScroll(pfnCallback);
newChild.SetScrollbarPosition(200,100);
miniScroll_array.push(newChild);
return newChild;
}

function MiniScroll(pfnCallback)
{
this.scrollbar = new ChildScroll(pfnCallback);
this.scrollID = this.scrollbar.scrollID;
}

MiniScroll.prototype.SetScrollRange = function(minScroll,maxScroll)
{
this.scrollbar.minScroll = minScroll;
this.scrollbar.maxScroll = maxScroll;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetItemHeight = function(newHeight)
{
this.scrollbar.itemHeight = newHeight;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetScrollbarPosition = function(yPos, SCHeight)
{
debug_trace("************************************");
debug_trace("SetScrollbarPosition");
debug_trace("************************************");
this.scrollbar.PositionScrollBar(yPos, SCHeight);
}

MiniScroll.prototype.SetHandlePosition = function(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
this.scrollbar.MoveHandleToPosition(newPosition);
this.scrollbar.realPosition = newPosition;
}

MiniScroll.prototype.Show = function(bVisible)
{
this.scrollbar.Show(bVisible);
}

#endinitclip??
Child Scroll Commands?????OO?????????????l// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

function SetItemHeight(newHeight)
{
fhgeneric_comp.itemHeight = newHeight;
fhgeneric_comp.SizeHandle();
}

function SetScrollbarPosition(yPos, SCHeight)
{
fhgeneric_comp.PositionScrollBar(yPos, SCHeight);
}

function SetHandlePosition(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(newPosition);
fhgeneric_comp.realPosition = newPosition;
}

function GetScrollEdgeAtPos(yPos)
{
return fhgeneric_comp.FindBarEdge(yPos);
}

function HideAllMiniScroll()
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
miniScroll_array[i].Show(false);
}
}

#endinitclip??
Scrollbar commands?????OO????????????W??Q#initclip
var childScrollCount = 0;

function ChildScroll(pfnCallback)
{
this.pfnCallback = pfnCallback;
this.bCurved = fhgeneric_comp.bCurved
this.bResizeable = fhgeneric_comp.bResizeable;
if (this.bCurved)
{
this.bResizeable = false;
}

if (!this.bCurved)
{
this.userBar_mc = bar_mc.duplicateMovieClip("bar"+childScrollCount,childScrollCount++);
}
else
{
this.userBar_mc = bar_mc;
}
this.scrollID = childScrollCount;
this.userUpArrow_mc = uparrow_mc.duplicateMovieClip("uparrow"+childScrollCount,childScrollCount++);
this.userDownArrow_mc = downarrow_mc.duplicateMovieClip("downarrow"+childScrollCount,childScrollCount++);

this.userHandle_mc = handle_mc.duplicateMovieClip("handle"+childScrollCount,childScrollCount++);

this.userTop_mc = top_mc.duplicateMovieClip("top"+childScrollCount,childScrollCount++);
this.userBottom_mc = bottom_mc.duplicateMovieClip("bottom"+childScrollCount,childScrollCount++);
this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+childScrollCount,childScrollCount++);

this.enabled = true;
this.bPlayDisabled = true;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to c};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Basic Scroll Actions????O?????????????Q;?
// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

var debug_trace = _parent.debug_trace;

var this_lc = new LocalConnection();
var currentItem = undefined;

uniqueHelpID = _root.uniqueHelpID;
_global.Scroll = new Object;
_global.Scroll.localHelpID = "ScrollLC" + uniqueHelpID;
var registeredWithNavHost = false;

this_lc.DoCommand = function(cmd, param1, param2)
{
switch (cmd)
{
case CmdRegisteredNavComponent:
{
registeredWithNavHost = true;
break;
}
case CmdScrollRange:
{
SetScrollRange(param1,param2);
break;
}
case CmdScrollPosition:
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(param1);
fhgeneric_comp.realPosition = param1;
break;
}
default:
{
}
}
}

// Create the LocalConnection for other SWFs to talk to us
this_lc.connect(_global.Scroll.localHelpID);

// Register with the Nav Host
var idRegisterTimer = setInterval(RegisterIfNeeded, 200);

function RegisterIfNeeded()
{
if (registeredWithNavHost == false)
{
SendCmdToNav(CmdRegisterNavComponent, _global.Scroll.localHelpID, "DoCommand");
}

if (registeredWithNavHost == true)
{
SendCmdToNav(CmdSetConnection, _global.Scroll.localHelpID, "Scroll");
clearInterval(idRegisterTimer);
}

return;
}

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.userBar_mc._height;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (fhgeneric_comp.userUpArrow_mc._height + fhgeneric_comp.userDownArrow_mc._height));
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

#endinitclip??
Communications?????OO??alculate the arrowIncrement value
this.itemHeight = 10;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 500;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Initialize Object
this.Init();
}

ChildScroll.prototype = new MovieClip();

ChildScroll.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}

// Create movie event handlers
this.userHandle_mc.Owner = this;
this.userIcon_mc.Owner = this;
this.userTop_mc.Owner = this;
this.userBottom_mc.Owner = this;
this.userBar_mc.Owner = this;
this.userUpArrow_mc.Owner = this;
this.userDownArrow_mc.Owner = this;
this.userSpace_mc.Owner = this;

this.userHandle_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userHandle_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userHandle_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userTop_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userTop_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userTop_mc.onRollOut = function()
{
this.Owner.onHandleRo
??????????f???stop();
?????? ??????????C???stop();
????????????????W???stop();
????? ???Actions?????OO????? ?????????normalF?????????
?????????overAX?????????
?????????down+]?????????
?????????disabled?c??????????????????????????? ???Labels????O?O??? ???Symbol?????3????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????CPicPage?? CPicLayer?? CPicFrame??CPicText??
?(k/?4C??? ?_sans?(HINT:
The scrollbar is made up of several parts, many of which have labeled frames that allow you to define their look in various states.

uparrow_mc, downarrow_mc: These are the movie clips used for the up and down arrows. They will be placed at the top and bottom of the scrollbar at runtime.

bar_mc: This is the bar that displays behind the handle. It will stretch at runtime to be the same height as the navigation?????????~? ///////////////////////////////////////////////////////////////////////////
// IF THESE COMMANDS ARE CHANGED HERE THEY MUST ALSO BE CHANGED IN THE
// FILE cmds_nav.as
///////////////////////////////////////////////////////////////////////////

#initclip
///////////////////////////////////////////////////////////////////////////
// General Commands
///////////////////////////////////////////////////////////////////////////

var CmdRegisterNavComponent = "CmdRegisterNavComponent"; // Sent to Nav host to register the navigation component
// PARAM1 = local connection name (string)
// PARAM2 = function name to call with commands
var CmdRegisteredNavComponent = "CmdRegisteredNavComponent"; // Sent to the component once it has been registered

var CmdSetConnection = "CmdSetConnection"; // Sent to Nav host to make the connection between the component name and the Local connection
// PARAM1 = local connection name
// PARAM2 = component name

///////////////////////////////////////////////////////////////////////////
// Scrollbar Commands to Nav host
///////////////////////////////////////////////////////////////////////////

var CmdScrollRange = "CmdScrollRange"; // Sent from the Nav host to the Scroll bar to set the scroll range
// PARAM1 = minimum scroll value
// PARAM2 = maximum scroll value

var CmdScrollPosition = "CmdScrollPosition"; // Sent from the Nav host to the Scroll bar to reposition the thumb
// PARAM1 = position of thumb (in percent area of the scroll bar)

#endinitclip




??
Communication Commands??????O???????????}&?[///////////////////////////////////////////////////////////////////////////
// IF THIS FUNCTION IS CHANGED HERE IT MUST ALSO BE CHANGED IN THE
// FILE cmdstonav.as
///////////////////////////////////////////////////////////////////////////

#initclip

function SendCmdToNav(cmd, param1, param2) {

// Create the local connection
var outgoing_lc = new LocalConnection();

// Send the command to the skin SWF
outgoing_lc.send("NavCompLC" + uniqueHelpID, "DoNavReqCommand", cmd, param1, param2);

// Delete the temporary connection
delete outgoing_lc;

return;
}

#endinitclip??
Communication Functions?????O????????????dRuniqueHelpID = _root.uniqueHelpID;
// uncomment for debugging
// uniqueHelpID = 5;??
Test????O?O?????????s>??
Labels????O?O???,d?y bot?CPicPage?? CPicLayer?? CPicFrame??
CPicSprowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.userBar_mc._height - ((this.userDownArrow_mc._height + this.userUpArr??CPicPage?? CPicLayer?? CPicFrame????????fU??I
#initclip

var minMiddleHeight =20;
var wheelDeltaBase = 120;

function GenericScrollClass()
{
if (this.bCurved)
{
this.bResizeable = false;
}
this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Handle Variables
this pane.

handle_mc: This is the handle of the scrollbar. If resizable (see options below), thi ?_sans?(s movie clip will stretch based on the height of the scrollable contents.

fhgeneric_comp: This component is needed for the scrollbar tow_mc._height));
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.Mo behave correctly at runtime.

[Optional clips below]
top_mc, buttom_mc: These movie clips are positioned above and below handle_mc. These will not scale when handle_mc scales, so they will not become distorted.

icon_mc: This movie clip does not scale, and keeps its relative vertical location as handle_mc stretches. Use this if you want an icon in the center of the handle. ?_sans?(

space_mc: If you are using a curved scrollbar (see options below), create this clip to use on the right sioveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.userBar_mc._height;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (this.userUpArrow_mc._height+this.userDownArrow_mc._height));

testPos = (truePde of the scrollbar. The color of this movie clip will change at runtime to the color of the current topic, to give the illusion that the topic being viewed continues underneath the scrollbar. The left side of the movie clip should conform to the shape of .dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scosition)/(this.maxScroll - fhgeneric_comp.ScrollHeight);

realPos = (truePosition*realBarHeight)/(this.maxScroll - fhgeneric_comp.ScrollHeight);
this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.userUpArrow_mc._height);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
return bMoved;
};

GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (fhgeneric_comp.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function()
{
if (fhgeneric_comp.bHandleDrag)
{
var yPos = _ymouse - fhgeneric_comp.dragYPos;
fhgeneric_comp.SetHandleYPos(yPos);
fhgeneric_comp.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function()
{
if (fhgeneric_comp.bArrowPressed)
{
if (fhgeneric_comp.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(fhgeneric_comp.ArrowInterval);
fhgeneric_comp.ArrowInterval = setInterval(fhgeneric_comp.ContinueScroll,75);
}
fhgeneric_comp.MoveHandle(0,fhgeneric_comp.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;

// Set YPosition and height
this.userBar_mc._y = yPos;
this.userUpArrow_mc._y = yPos;
this.userBar_mc._height = SCHeight;
this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

this.SizeHandle();
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Basic Scroll Actions????O?????????????z"?~
// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

var debug_trace = _parent.debug_trace;

var this_lc = new LocalConnection();
var currentItem = undefined;

uniqueHelpID = _root.uniqueHelpID;
_global.Scroll = new Object;
_global.SllOut();
};

this.userBottom_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userBottom_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userBottom_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userIcon_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userIcon_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userIcon_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};


this.userUpArrow_mc.onPress = function()
{
this.Owner.onUpArrowPress();
};

this.userUpArrow_mc.onRelease = function()
{
this.Owner.onUpArrowRelease();
};

this.userUpArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onUpArrowRollOver();
};

this.userUpArrow_mc.onRollOut = function()
{
this.Owner.onUpArrowRollOut();
};

this.userUpArrow_mc.onDragOut = function()
{
this.Owner.onUpArrowDragOut();
};

this.userDownArrow_mc.onPress = function()
{
this.Owner.onDownArrowPress();
};

this.userDownArrow_mc.onRelease = function()
{
this.Owner.onDownArrowRelease();
};

this.userDownArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onDownArrowRollOver();
};

this.userDownArrow_mc.onRollOut = function()
{
this.Owner.onDownArrowRollOut();
};

this.userDownArrow_mc.onDragOut = function()
{
this.Owner.onDownArrowDragOut();
};
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
ChildScroll.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

ChildScroll.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUbar_mc, and at runitme this clip will be stretched the same amount as bar_mc. NOTE: This sample uses a straight scrollbar, so this movie clip is not ?_sans?( included. If you are using a curved scrollbar, insert a movie clip on the StagepArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

ChildScroll.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
ChildScroll.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
ChildScroll.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

testPos = (truePosition)/(this.maxScroll - this.ScrollHeight);

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);
this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.userUpArrow_mc._height);

if (this.MakeHandleInBar())
{
this.PositionChanged();
}
};

ChildScroll.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


ChildScroll.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

ChildScroll.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
}


ChildScroll.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
this.PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


ChildScroll.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

ChildScroll.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

ChildScroll.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

ChildScroll.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

ChildScroll.prototype.Get (main timeline) with the instance name "space_mc".


[Scrollbar Options]
The scrollbar compoent has two options. Select fhgeneric_comp on the stage to edit them.

thumbResizable: If true, the thumb (handle_mc) will stretch at runtime based on the height of the scrollable contents.

scrollbarCurved: If true, the thumb will center itself on bar_mc at run time. This is to allow curved scrollbars. The thumb will never be resizable I ?_sans?(with curved scrollbars, no matter how the "thumbResiz 
  @???? !"#$%????????????????????????,????????????????????????????????????????89:;<=>?JABCDEFGHITKLM}????????????????????????UVWXY????]b????`????????c?????defghijklmnopqrstuvwxyz{|?~?croll.localHelpID = "ScrollLC" + uniqueHelpID;
var registeredWithNavHost = false;

this_lc.DoCommand = function(cmd, param1, param2)
{
switch (cmd)
{
case CmdRegisteredNavComponent:
{
registeredWithNavHost = true;
break;
}
case CmdScrollRange:
{
SetScrollRange(param1,param2);
break;
}
case CmdScrollPosition:
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(param1);
fhgeneric_comp.realPosition = param1;
break;
}
default:
{
}
}
}

// Create the LocalConnection for other SWFs to talk to us
this_lc.connect(_global.Scroll.localHelpID);

// Register with the Nav Host
var idRegisterTimer = setInterval(RegisterIfNeeded, 200);

function RegisterIfNeeded()
{
if (registeredWithNavHost == false)
{
SendCmdToNav(CmdRegisterNavComponent, _global.Scroll.localHelpID, "DoCommand");
}

if (registeredWithNavHost == true)
{
SendCmdToNav(CmdSetConnection, _global.Scroll.localHelpID, "Scroll");
clearInterval(idRegisterTimer);
}

return;
}

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.userBar_mc._height;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - (thumbHeight + (fhgeneric_comp.userUpArrow_mc._height + fhgeneric_comp.userDownArrow_mc._height));
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

function SetItemHeight(newHeight)
{
fhgeneric_comp.itemHeight = newHeight;
fhgeneric_comp.SizeHandle();
}

#endinitclip??
Communications?????OO????????????? ///////////////////////////////////////////////////////////////////////////
// IF THESE COMMANDS ARE CHANGED HERE THEY MUST ALSO BE CHANGED IN THE
// FILE cmds_nav.as
///////////////////////////////////////////////////////////////////////////

#initclip
///////////////////////////////////////////////////////////////////////////
// General Commands
///////////////////////////////////////////////////////////////////////////

var CmdRegisterNavComponent = "CmdRegisterNavComponent"; // Sent to Nav host to register the navigation component
// PARAM1 = local connection name (string)
// PARAM2 = function name to call with commands
var CmdRegisteredNavComponent = "CmdRegisteredNavComponent"; // Sent to the component once it has been registered

var CmdSetConnection = "CmdSetConnection"; // Sent to Nav host to make the connection between the component name and the Local connection
// PARAM1 = local connection name
// PARAM2 = component name

///////////////////////////////////////////////////////////////////////////
// Scrollbar Commands to Nav host
///////////////////////////////////////////////////////////////////////////

var CmdScrollRange = "CmdScrollRange"; // Sent from the Nav host to the Scroll bar to set the scroll range
// PARAM1 = minimum scroll value
// PARAM2 = maximum scroll value

var CmdScrollPosition = "CmdScrollPosition"; // Sent from the Nav host to the Scroll bar to reposition the thumb
// PARAM1 = position of thumb (in percent area of the scroll bar)

#endinitclip




??
Communication Commands??????O???????????\?[///////////////////////////////////////////////////////////////////////////
// IF THIS FUNCTION IS CHANGED HERE IT MUST ALSO BE CHANGED IN THE
// FILE cmdstonav.as
///////////////////////////////////////////////////////////////////////////

#initclip

function SendCmdToNav(cmd, param1, param2) {

// Create the local connection
var outgoing_lc = new LocalConnection();

// Send the command to the skin SWF
outgoing_lc.send("NavCompLC" + uniqueHelpID, "DoNavReqCommand", cmd, param1, param2);

// Delete the temporary connection
delete outgoing_lc;

return;
}

#endinitclip??
Communication Functions?????O????????????NlRuniqueHelpID = _root.uniqueHelpID;
// uncomment for debugging
// uniqueHelpID = 5;??
Test????O?O???able" option is set.????????????????????cI???????? ???Hint?????OO?????
CPicSprite@?@????????%&F??????fhgeneric_comp???thumbResizeable???true??? bResizeable??}?oSL????|????????scrollbarCurved???false???bCurved6L@?d?E?FA7nM?????????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='1'>
</component>
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????CPicPage?? CPicLayer?? CPicFrame????????w
??#initclip
var miniScroll_array = new Array();

function CreateNewChildScroll(pfnCallback)
{
this.ScrollYPos = 0;
this.ScrollHeight = 0;
var newChild = new MiniScroll(pfnCallback);
newChild.SetScrollbarPosition(200,100);
miniScroll_array.push(newChild);
return newChild;
}

function MiniScroll(pfnCallback)
{
this.scrollbar = new ChildScroll(pfnCallback);
this.scrollID = this.scrollbar.scrollID;
}

MiniScroll.prototype.SetScrollRange = function(minScroll,maxScroll)
{
this.scrollbar.minScroll = minScroll;
this.scrollbar.maxScroll = maxScroll;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetItemHeight = function(newHeight)
{
this.scrollbar.itemHeight = newHeight;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetScrollbarPosition = function(yPos, SCHeight)
{
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;
this.scrollbar.PositionScrollBar(yPos, SCHeight);
}

MiniScroll.prototype.SetHandlePosition = function(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
this.scrollbar.MoveHandleToPosition(newPosition);
this.scrollbar.realPosition = newPosition;
}

MiniScroll.prototype.Show = function(bVisible)
{
this.scrollbar.Show(bVisible);
}

#endinitclip??
Child Scroll Commands?????OO????????????ild;
}

function MiniScroll(pfnCallback)
{
this.scrollbar = new ChildScroll(pfnCallback);
this.scrollID = this.scrollbar.scrollID;
}

MiniScroll.prototype.SetScrollRange = function(minScroll,maxScroll)
{
this.scrollbar.minScroll = minScroll;
this.scrollbar.maxScroll = maxScroll;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetItemHeight = function(newHeight)
{
this.scrollbar.itemHeight = newHeight;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetScrollbarPosition = function(yPos, SCHeight)
{
debug_trace("************************************");
debug_trace("SetScrollbarPosition");
debug_trace("************************************");
this.scrollbar.PositionScrollBar(yPos, SCHeight);
}

MiniScroll.prototype.SetHandlePosition = function(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
this.scrollbar.MoveHandleToPosition(newPosition);
this.scrollbar.realPosition = newPosition;
}

MiniScroll.prototype.Show = function(bVisible)
{
this.scrollbar.Show(bVisible);
}

#endinitclip??
Child Scroll Commands?????OO???????????}r?l// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

function SetItemHeight(newHeight)
{
fhgeneric_comp.itemHeight = newHeight;
fhgeneric_comp.SizeHandle();
}

function SetScrollbarPosition(yPos, SCHeight)
{
fhgeneric_comp.PositionScrollBar(yPos, SCHeight);
}

function SetHandlePosition(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(newPosition);
fhgeneric_comp.realPosition = newPosition;
}

function GetScrollEdgeAtPos(yPos)
{
return fhgeneric_comp.FindBarEdge(yPos);
}

function HideAllMiniScroll()
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
miniScroll_array[i].Show(false);
}
}

#endinitclip??
Scrollbar commands?????OO????????????O??Q#initclip
var childScrollCount = 0;

function ChildScroll(pfnCallback)
{
this.pfnCallback = pfnCallback;
this.bCurved = fhgeneric_comp.bCurved
this.bResizeable = fhgeneric_comp.bResizeable;
if (this.bCurved)
{
this.bResizeable = false;
}

if (!this.bCurved)
{
this.userBar_mc = bar_mc.duplicateMovieClip("bar"+childScrollCount,childScrollCount++);
}
else
{
this.userBar_mc = bar_mc;
}
this.scrollID = childScrollCount;
this.userUpArrow_mc = uparrow_mc.duplicateMovieClip("uparrow"+childScrollCount,childScrollCount++);
this.userDownArrow_mc = downarrow_mc.duplicateMovieClip("downarrow"+childScrollCount,childScrollCount++);

this.userHandle_mc = handle_mc.duplicateMovieClip("handle"+childScrollCount,childScrollCount++);

this.userTop_mc = top_mc.duplicateMovieClip("top"+childScrollCount,childScrollCount++);
this.userBottom_mc = bottom_mc.duplicateMovieClip("bottom"+childScrollCount,childScrollCount++);
this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+childScrollCount,childScrollCount++);

this.enabled = true;
this.bPlayDisabled = true;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 10;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 500;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Initialize Object
this.Init();
}

ChildScroll.prototype = new MovieClip();

ChildScroll.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}

// Create movie event handlers
this.userHandle_mc.Owner = this;
this.userIcon_mc.Owner = this;
this.userTop_mc.Owner = this;
this.userBottom_mc.Owner = this;
this.userBar_mc.Owner = this;
this.userUpArrow_mc.Owner = this;
this.userDownArrow_mc.Owner = this;
this.userSpace_mc.Owner = this;

this.userHandle_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userHandle_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userHandle_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userTop_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userTop_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userTop_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userBottom_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userBottom_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userBottom_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userIcon_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userIcon_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userIcon_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};


this.userUpArrow_mc.onPress = function()
{
this.Owner.onUpArrowPress();
};

this.userUpArrow_mc.onRelease = function()
{
this.Owner.onUpArrowRelease();
};

this.userUpArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onUpArrowRollOver();
};

this.userUpArrow_mc.onRollOut = function()
{
this.Owner.onUpArrowRollOut();
};

this.userUpArrow_mc.onDragOut = function()
{
this.Owner.onUpArrowDragOut();
};

this.userDownArrow_mc.onPress = function()
{
this.Owner.onDownArrowPress();
};

this.userDownArrow_mc.onRelease = function()
{
this.Owner.onDownArrowRelease();
};

this.userDownArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onDownArrowRollOver();
};

this.userDownArrow_mc.onRollOut = function()
{
this.Owner.onDownArrowRollOut();
};

this.userDownArrow_mc.onDragOut = function()
{
this.Owner.onDownArrowDragOut();
};
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
ChildScroll.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

ChildScroll.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

ChildScroll.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
ChildScroll.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
ChildScroll.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

testPos = (truePosition)/(this.maxScroll - this.ScrollHeight);

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);
this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.userUpArrow_mc._height);

if (this.MakeHandleInBar())
{
this.PositionChanged();
}
};

ChildScroll.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


ChildScroll.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

ChildScroll.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
}


ChildScroll.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
this.PositionChanged();
};

/////////////////////////////////////////////////////////////////////HandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



ChildScroll.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

ChildScroll.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
this.PositionChanged();
}
};

ChildScroll.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

ChildScroll.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

ChildScroll.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

ChildScroll.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

ChildScroll.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


ChildScroll.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
/* var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;
*/
// Set YPosition and height
this.actualBar = SCHeight - (this.userUpArrow_mc._height + this.userDownArrow_mc._height);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
// this.userBar_mc._y = 0;
// this.userBar_mc._height = Stage.height;
}
else
{
this.userBar_mc._y = yPos + this.userUpArrow_mc._height;
this.userBar_mc._height = this.actualBar;
}

this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.userUpArrow_mc._height/2));
if (newXPos == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.userDownArrow_mc._height/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
}
}

this.SizeHandle();
}

ChildScroll.prototype.Show = function(bVisible)
{
this.userUpArrow_mc._visible = bVisible;
this.userDownArrow_mc._visible = bVisible;
this.userHandle_mc._visible = bVisible;
this.userTop_mc._visible = bVisible;
this.userBottom_mc._visible = bVisible;
this.userIcon_mc._visible = bVisible;
}

ChildScroll.prototype.PositionChanged = function()
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = this.GetHandleYPos() - (this.userUpArrow_mc._y + this.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
this.realPosition = ((realPos / realBarHeight)*(this.maxScroll - this.ScrollHeight));

if (realBarHeight <= 0 || this.realPosition < 0)
{
this.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
this.pfnCallback(this.realPosition);
}
}

#endinitclip??
Child Scroll Actions????O??????????????s??P
#initclip

var minMiddleHeight =20;
var wheelDeltaBase = 120;

function GenericScrollClass()
{
if (this.bCurved)
{
this.bResizeable = false;
}
this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userSpace_mc = this._parent.space_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 20;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 1000;
this.realPosition = 0;

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
/* if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDepths(this.userHandle_mc);
}
*/
// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse >this.userUpArrow_mc._y && _ymouse < this.userDownArrow_mc._y)
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);

this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.userUpArrow_mc._height);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


GenericScrollClass.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

GenericScrollClass.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
}


GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.userUpArrow_mc._height + this.userDownArrow_mc._height);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
this.userBar_mc._y = 0;
this.userBar_mc._height = Stage.height;
}
else
{
this.userBar_mc._y = yPos + this.userUpArrow_mc._height;
this.userBar_mc._height = this.actualBar;
}
this.userSpace_mc._y = this.userBar_mc._y;
this.userSpace_mc._height = this.userBar_mc._height;
this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.userUpArrow_mc._height/2));
if (newXPos == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.userDownArrow_mc._height/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
}
}

this.SizeHandle();
}

function RepositionOnFail()
{
var newXPos = this.Owner.FindBarEdge(this._y + (this._height/2));
if (newXPos != -123456)
{
newXPos -= (this._width/2)
this._x = newXPos;
}
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Main Scroll Actions????O?????????????? ?D#initclip

var debug_trace = _parent.debug_trace;
var currentItem = undefined;

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.actualBar;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

#endinitclip??
Scrollbar to Owner????O????? ps below]
top_mc, buttom_mc: These movie clips are positioned above and below handle_mc. These will not scale when handle_mc sc??// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

function SetItemHeight(newHeight)
{
fhgeneric_comp.itemHeight = newHeight;
fhgeneric_comp.SizeHandle();
}

function SetScrollbarPosition(yPos, SCHeight)
{
fhgeneric_comp.PositionScrollBar(yPos, SCHeight);
}

function SetSpaceColor(newColor)
{
fhgeneric_comp.SetBgColor(newColor);
}

function SetResizeVisible(bVisible)
{
fhgeneric_comp.bResizeVisible = bVisible;
}

function SetHandlePosition(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(newPosition);
fhgeneric_comp.realPosition = newPosition;
}

function GetScrollEdgeAtPos(yPos)
{
nResult = Stage.width;
if (fhgeneric_comp.bCurved)
{
nResult = fhgeneric_comp.FindBarEdge(yPos);
}
else
{
nResult -=5;
if (yPos>fhgeneric_comp.ScrollYPos && yPos < fhgeneric_comp.ScrollYPos+fhgeneric_comp.ScrollHeight)
{
nResult = Stage.width - (fhgeneric_comp.userBar_mc._width + 5);
}
else
{
for (i=0; i< miniScroll_array.length;i++)
{
if (yPos>miniScroll_array[i].ScrollYPos && yPos < miniScroll_array[i].ScrollYPos+miniScroll_array[i].ScrollHeight)
{
nResult = Stage.width - (miniScroll_array[i].scrollbar.userBar_mc._width+5);
}
}
}
}
return nResult;
}

function GetScrollbarWidth()
{
return fhgeneric_comp.userBar_mc._width
}

function HideAllMiniScroll()
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
miniScroll_array[i].Show(false);
}
}

#endinitclip??
Scrollbar commands?????OO???????????kG??X#initclip

function ChildScroll(pfnCallback)
{
this.pfnCallback = pfnCallback;
this.bCurved = fhgeneric_comp.bCurved
this.bResizeable = fhgeneric_comp.bResizeable;
if (this.bCurved)
{
this.bResizeable = false;
}

if (!this.bCurved)
{
this.userBar_mc = bar_mc.duplicateMovieClip("bar"+levelCount,levelCount++);
this.userBar_mc.tabEnabled = false;
}
else
{
this.userBar_mc = bar_mc;
}

this.scrollID = levelCount;

this.userUpArrow_mc = uparrow_mc.duplicateMovieClip("uparrow"+levelCount,levelCount++);
this.userDownArrow_mc = downarrow_mc.duplicateMovieClip("downarrow"+levelCount,levelCount++);
this.userHandle_mc = handle_mc.duplicateMovieClip("handle"+lev??CPicPage?? CPicLayer?? CPicFrame?????????3?s#initclip
var miniScroll_array = new Array();

function CreateNewChildScroll(pfnCallback)
{
debug_trace("************************************");
debug_trace("Create new Child");
debug_trace("************************************");
var newChild = new MiniScroll(pfnCallback);
newChild.SetScrollbarPosition(200,100);
miniScroll_array.push(newChild);
return newChild;
}

function MiniScroll(pfnCallback)
{
this.scrollbar = new ChildScroll(pfnCallback);
this.scrollID = this.scrollbar.scrollID;
}

MiniScroll.prototype.SetScrollRange = function(minScroll,maxScroll)
{
this.scrollbar.minScroll = minScroll;
this.scrollbar.maxScroll = maxScroll;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetItemHeight = function(newHeight)
{
this.scrollbar.itemHeight = newHeight;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetScrollbarPosition = function(yPos, SCHeight)
{
debug_trace("************************************");
debug_trace("SetScrollbarPosition");
debug_trace("************************************");
this.scrollbar.PositionScrollBar(yPos, SCHeight);
}

MiniScroll.prototype.SetHandlePosition = function(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
this.scrollbar.MoveHandleToPosition(newPosition);
this.scrollbar.realPosition = newPosition;
}

MiniScroll.prototype.Show = function(bVisible)
{
this.scrollbar.Show(bVisible);
}

#endinitclip??
Child Scroll Commands?????OO???????????1??// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

function SetItemHeight(newHeight)
{
fhgeneric_comp.itemHeight = newHeight;
fhgeneric_comp.SizeHandle();
}

function SetScrollbarPosition(yPos, SCHeight)
{
fhgeneric_comp.PositionScrollBar(yPos, SCHeight);
}

function SetHandlePosition(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(newPosition);
fhgeneric_comp.realPosition = newPosition;
}

function GetScrollEdgeAtPos(yPos)
{
nResult = Stage.width;
if (fhgeneric_comp.bCurved)
{
nResult = fhgeneric_comp.FindBarEdge(yPos);
}
else
{
if (yPos>fhgeneric_comp.ScrollYPos && yPos < fhgeneric_comp.ScrollYPos+fhgeneric_comp.ScrollHeight)
{
nResult = Stage.width - fhgeneric_comp.userBar_mc._width;
}
else
{
for (i=0; i< miniScroll_array.length;i++)
{
if (yPos>miniScroll_array[i].ScrollYPos && yPos < miniScroll_array[i].ScrollYPos+miniScroll_array[i].ScrollHeight)
{
nResult = Stage.width - miniScroll_array[i].userBar_mc._width;
}
}
}
}
return nResult;
}

function HideAllMiniScroll()
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
miniScroll_array[i].Show(false);
}
}

#endinitclip??
Scrollbar commands?????OO?????????????R#initclip
var childScrollCount = 0;

function ChildScroll(pfnCallback)
{
this.pfnCallback = pfnCallback;
this.bCurved = fhgeneric_comp.bCurved
this.bResizeable = fhgeneric_comp.bResizeable;
if (this.bCurved)
{
this.bResizeable = false;
}

if (!this.bCurved)
{
this.userBar_mc = bar_mc.duplicateMovieClip("bar"+childScrollCount,childScrollCount++);
}
else
{
this.userBar_mc = bar_mc;
}
this.scrollID = childScrollCount;
this.userUpArrow_mc = uparrow_mc.duplicateMovieClip("uparrow"+childScrollCount,childScrollCount++);
this.userDownArrow_mc = downarrow_mc.duplicateMovieClip("downarrow"+childScrollCount,childScrollCount++);

this.userHandle_mc = handle_mc.duplicateMovieClip("handle"+childScrollCount,childScrollCount++);

this.userTop_mc = top_mc.duplicateMovieClip("top"+childScrollCount,childScrollCount++);
this.userBottom_mc = bottom_mc.duplicateMovieClip("bottom"+childScrollCount,childScrollCount++);
this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+childScrollCount,childScrollCount++);

this.enabled = true;
this.bPlayDisabled = true;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 10;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 500;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Initialize Object
this.Init();
}

ChildScroll.prototype = new MovieClip();

ChildScroll.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}

// Create movie event handlers
this.userHandle_mc.Owner = this;
this.userIcon_mc.Owner = this;
this.userTop_mc.Owner = this;
this.userBottom_mc.Owner = this;
this.userBar_mc.Owner = this;
this.userUpArrow_mc.Owner = this;
this.userDownArrow_mc.Owner = this;
this.userSpace_mc.Owner = this;

this.userHandle_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userHandle_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userHandle_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userTop_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userTop_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userTop_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userBottom_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userBottom_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userBottom_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userIcon_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userIcon_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userIcon_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};


this.userUpArrow_mc.onPress = function()
{
this.Owner.onUpArrowPress();
};

this.userUpArrow_mc.onRelease = function()
{
this.Owner.onUpArrowRelease();
};

this.userUpArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onUpArrowRollOver();
};

this.userUpArrow_mc.onRollOut = function()
{
this.Owner.onUpArrowRollOut();
};

this.userUpArrow_mc.onDragOut = function()
{
this.Owner.onUpArrowDragOut();
};

this.userDownArrow_mc.onPress = function()
{
this.Owner.onDownArrowPress();
};

this.userDownArrow_mc.onRelease = function()
{
this.Owner.onDownArrowRelease();
};

this.userDownArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onDownArrowRollOver();
};

this.userDownArrow_mc.onRollOut = function()
{
this.Owner.onDownArrowRollOut();
};

this.userDownArrow_mc.onDragOut = function()
{
this.Owner.onDownArrowDragOut();
};
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
ChildScroll.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

ChildScroll.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

ChildScroll.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
ChildScroll.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
ChildScroll.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

testPos = (truePosition)/(this.maxScroll - this.ScrollHeight);

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);
this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.userUpArrow_mc._height);

if (this.MakeHandleInBar())
{
this.PositionChanged();
}
};

ChildScroll.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


ChildScroll.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

ChildScroll.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
}


ChildScroll.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
this.PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


ChildScroll.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc//////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


ChildScroll.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

ChildScroll.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

ChildScroll.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

ChildScroll.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

ChildScroll.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



ChildScroll.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

ChildScroll.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
this.PositionChanged();
}
};

ChildScroll.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

ChildScroll.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

ChildScroll.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

ChildScroll.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

ChildScroll.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


ChildScroll.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
/* var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;
*/
// Set YPosition and height
this.actualBar = SCHeight - (this.userUpArrow_mc._height + this.userDownArrow_mc._height);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
// this.userBar_mc._y = 0;
// this.userBar_mc._height = Stage.height;
}
else
{
this.userBar_mc._y = yPos + this.userUpArrow_mc._height;
this.userBar_mc._height = this.actualBar;
}

this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.userUpArrow_mc._height/2));
if (newXPos == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.userDownArrow_mc._height/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
}
}

this.SizeHandle();
}

ChildScroll.prototype.Show = function(bVisible)
{
this.userUpArrow_mc._visible = bVisible;
this.userDownArrow_mc._visible = bVisible;
this.userHandle_mc._visible = bVisible;
this.userTop_mc._visible = bVisible;
this.userBottom_mc._visible = bVisible;
this.userIcon_mc._visible = bVisible;
}

ChildScroll.prototype.PositionChanged = function()
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = this.GetHandleYPos() - (this.userUpArrow_mc._y + this.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
this.realPosition = ((realPos / realBarHeight)*(this.maxScroll - this.ScrollHeight));

if (realBarHeight <= 0 || this.realPosition < 0)
{
this.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
this.pfnCallback(this.realPosition);
}
}

#endinitclip??
Child Scroll Actions????O??????????????E??P
#initclip

var minMiddleHeight =20;
var wheelDeltaBase = 120;

function GenericScrollClass()
{
if (this.bCurved)
{
this.bResizeable = false;
}
this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userSpace_mc = this._parent.space_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 20;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 1000;
this.realPosition = 0;

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
/* if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDepths(this.userHandle_mc);
}
*/
// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse >this.userUpArrow_mc._y && _ymouse < this.userDownArrow_mc._y)
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);

this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.userUpArrow_mc._height);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


GenericScrollClass.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

GenericScrollClass.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
}


GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.userUpArrow_mc._height + this.userDownArrow_mc._height);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
this.userBar_mc._y = 0;
this.userBar_mc._height = Stage.height;
}
else
{
this.userBar_mc._y = yPos + this.userUpArrow_mc._height;
this.userBar_mc._height = this.actualBar;
}
this.userSpace_mc._y = this.userBar_mc._y;
this.userSpace_mc._height = this.userBar_mc._height;
this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.userUpArrow_mc._height/2));
if (newXPos == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.userDownArrow_mc._height/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
}
}

this.SizeHandle();
}

function RepositionOnFail()
{
var newXPos = this.Owner.FindBarEdge(this._y + (this._height/2));
if (newXPos != -123456)
{
newXPos -= (this._width/2)
this._x = newXPos;
}
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Main Scroll Actions????O??????????????t?D#initclip

var debug_trace = _parent.debug_trace;
var currentItem = undefined;

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.actualBar;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

#endinitclip??
Scrollbar to Owner????O????? ???&???????? ??? Component?????????? ?????d?????d??????bar_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPa 
  
w !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW?????????[\]^_`abcdefghijklmnopqrstuv?xyz{|}~???CPicPage?? CPicLayer?? CPicFrame????????d<??#initclip
var miniScroll_array = new Array();

function CreateNewChildScroll(pfnCallback)
{
this.ScrollYPos = 0;
this.ScrollHeight = 0;
var newChild = new MiniScroll(pfnCallback);
newChild.SetScrollbarPosition(200,100);
miniScroll_array.push(newChild);
return newChild;
}

function MiniScroll(pfnCallback)
{
this.scrollbar = new ChildScroll(pfnCallback);
this.scrollID = this.scrollbar.scrollID;
}

MiniScroll.prototype.SetScrollRange = function(minScroll,maxScroll)
{
this.scrollbar.minScroll = minScroll;
this.scrollbar.maxScroll = maxScroll;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetItemHeight = function(newHeight)
{
this.scrollbar.itemHeight = newHeight;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetScrollbarPosition = function(yPos, SCHeight)
{
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;
this.scrollbar.PositionScrollBar(yPos, SCHeight);
}

MiniScroll.prototype.SetHandlePosition = function(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
this.scrollbar.MoveHandleToPosition(newPosition);
this.scrollbar.realPosition = newPosition;
}

MiniScroll.prototype.Show = function(bVisible)
{
this.scrollbar.Show(bVisible);
}

#endinitclip??
Child Scroll Commands?????OO????????????P??// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

function SetItemHeight(newHeight)
{
fhgeneric_comp.itemHeight = newHeight;
fhgeneric_comp.SizeHandle();
}

function SetScrollbarPosition(yPos, SCHeight)
{
fhgeneric_comp.PositionScrollBar(yPos, SCHeight);
}

function SetSpaceColor(newColor)
{
fhgeneric_comp.SetBgColor(newColor);
}

function SetResizeVisible(bVisible)
{
fhgeneric_comp.bResizeVisible = bVisible;
}

function SetHandlePosition(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(newPosition);
fhgeneric_comp.realPosition = newPosition;
}

function GetScrollEdgeAtPos(yPos)
{
nResult = Stage.width;
if (fhgeneric_comp.bCurved)
{
nResult = fhgeneric_comp.FindBarEdge(yPos);
}
else
{
nResult -=5;
if (yPos>fhgeneric_comp.ScrollYPos && yPos < fhgeneric_comp.ScrollYPos+fhgeneric_comp.ScrollHeight)
{
nResult = Stage.width - (fhgeneric_comp.userBar_mc._width + 5);
}
else
{
for (i=0; i< miniScroll_array.length;i++)
{
if (yPos>miniScroll_array[i].ScrollYPos && yPos < miniScroll_array[i].ScrollYPos+miniScroll_array[i].ScrollHeight)
{
nResult = Stage.width - (miniScroll_array[i].scrollbar.userBar_mc._width+5);
}
}
}
}
return nResult;
}

function GetScrollbarWidth()
{
return fhgeneric_comp.userBar_mc._width
}

function HideAllMiniScroll()
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
miniScroll_array[i].Show(false);
}
}

#endinitclip??
Scrollbar commands?????OO????????????*??Y#initclip

function ChildScroll(pfnCallback)
{
this.pfnCallback = pfnCallback;
this.bCurved = fhgeneric_comp.bCurved
this.bResizeable = fhgeneric_comp.bResizeable;
if (this.bCurved)
{
this.bResizeable = false;
}

if (!this.bCurved)
{
this.userBar_mc = bar_mc.duplicateMovieClip("bar"+levelCount,levelCount++);
this.userBar_mc.tabEnabled = false;
}
else
{
this.userBar_mc = bar_mc;
}

this.scrollID = levelCount;

this.userUpArrow_mc = uparrow_mc.duplicateMovieClip("uparrow"+levelCount,levelCount++);
this.userDownArrow_mc = downarrow_mc.duplicateMovieClip("downarrow"+levelCount,levelCount++);
this.userHandle_mc = handle_mc.duplicateMovieClip("handle"+levelCount,levelCount++);
this.userTop_mc = top_mc.duplicateMovieClip("top"+levelCount,levelCount++);
this.userBottom_mc = bottom_mc.duplicateMovieClip("bottom"+levelCount,levelCount++);
this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+levelCount,levelCount++);

this.userUpArrow_mc.tabEnabled=false;
this.userDownArrow_mc.tabEnabled=false;
this.userHandle_mc.tabEnabled=false;
this.userTop_mc.tabEnabled=false;
this.userBottom_mc.tabEnabled=false;
this.userIcon_mc.tabEnabled=false;


this.enabled = true;
this.bPlayDisabled = true;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.origHandleHeight = 0;
this.origHandleWidth = this.userHandle_mc._width;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 10;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 500;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

this.bOver = false;

// Initialize Object
this.Init();
}

ChildScroll.prototype = new MovieClip();

ChildScroll.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.origHandleHeight = this.GetHandleHeight();
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.upArrowHeight);

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}

// Create movie event handlers
this.userHandle_mc.Owner = this;
this.userIcon_mc.Owner = this;
this.userTop_mc.Owner = this;
this.userBottom_mc.Owner = this;
this.userBar_mc.Owner = this;
this.userUpArrow_mc.Owner = this;
this.userDownArrow_mc.Owner = this;
this.userSpace_mc.Owner = this;

this.userHandle_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userHandle_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userHandle_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userTop_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userTop_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userTop_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userBottom_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userBottom_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userBottom_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userIcon_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userIcon_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userIcon_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};


this.userUpArrow_mc.onPress = function()
{
this.Owner.onUpArrowPress();
};

this.userUpArrow_mc.onRelease = function()
{
this.Owner.onUpArrowRelease();
};

this.userUpArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onUpArrowRollOver();
};

this.userUpArrow_mc.onRollOut = function()
{
this.Owner.onUpArrowRollOut();
};

this.userUpArrow_mc.onDragOut = function()
{
this.Owner.onUpArrowDragOut();
};

this.userDownArrow_mc.onPress = function()
{
this.Owner.onDownArrowPress();
};

this.userDownArrow_mc.onRelease = function()
{
this.Owner.onDownArrowRelease();
};

this.userDownArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onDownArrowRollOver();
};

this.userDownArrow_mc.onRollOut = function()
{
this.Owner.onDownArrowRollOut();
};

this.userDownArrow_mc.onDragOut = function()
{
this.Owner.onDownArrowDragOut();
};
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
ChildScroll.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

ChildScroll.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

ChildScroll.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
ChildScroll.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (this.GetHandleYPos() < (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.DisableItem();
this.userDownArrow_mc._visible = false;
this.userUpArrow_mc._visible = false;
this.userIcon_mc._visible = false;
this.userTop_mc._visible = false;
this.userBottom_mc._visible = false;
this.userHandle_mc._visible = false;
}
else if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.userDownArrow_mc._visible = true;
this.userUpArrow_mc._visible = true;
this.userIcon_mc._visible = true;
this.userTop_mc._visible = true;
this.userBottom_mc._visible = true;
this.userHandle_mc._visible = true;
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
ChildScroll.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

testPos = (truePosition)/(this.maxScroll - this.ScrollHeight);

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);
this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.upArrowHeight);

if (this.MakeHandleInBar())
{
this.PositionChanged();
}
};

ChildScroll.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.upArrowHeight);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (nLeftEdge != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


ChildScroll.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

ChildScroll.prototype.FindBarRightEdge = function(YPos,XStart)
{
var nResult = -123456;
var bFound = true;
var leftSide = XStart;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (!bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}
else
{
nResult = 1;
}

return nResult;
}

ChildScroll.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHan._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

ChildScroll.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

ChildScroll.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

ChildScroll.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

ChildScroll.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



ChildScroll.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

ChildScroll.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
this.PositionChanged();
}
};

ChildScroll.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

ChildScroll.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

ChildScroll.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

ChildScroll.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

ChildScroll.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


ChildScroll.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
/* var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;
*/
// Set YPosition and height
this.actualBar = SCHeight - (this.userUpArrow_mc._height + this.userDownArrow_mc._height);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
// this.userBar_mc._y = 0;
// this.userBar_mc._height = Stage.height;
}
else
{
this.userBar_mc._y = yPos + this.userUpArrow_mc._height;
this.userBar_mc._height = this.actualBar;
}

this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.userUpArrow_mc._height/2));
if (newXPos == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.userDownArrow_mc._height/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
}
}

this.SizeHandle();
}

ChildScroll.prototype.Show = function(bVisible)
{
if (!this.bCurved)
{
this.userBar_mc._visible = bVisible;
}
this.userUpArrow_mc._visible = bVisible;
this.userDownArrow_mc._visible = bVisible;
this.userHandle_mc._visible = bVisible;
this.userTop_mc._visible = bVisible;
this.userBottom_mc._visible = bVisible;
this.userIcon_mc._visible = bVisible;
}

ChildScroll.prototype.PositionChanged = function()
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = this.GetHandleYPos() - (this.userUpArrow_mc._y + this.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
this.realPosition = ((realPos / realBarHeight)*(this.maxScroll - this.ScrollHeight));

if (realBarHeight <= 0 || this.realPosition < 0)
{
this.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
this.pfnCallback(this.realPosition);
}
}

#endinitclip??
Child Scroll Actions????O??????????????$??P
#initclip

var minMiddleHeight =20;
var wheelDeltaBase = 120;

function GenericScrollClass()
{
if (this.bCurved)
{
this.bResizeable = false;
}
this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userSpace_mc = this._parent.space_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 20;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 1000;
this.realPosition = 0;

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
/* if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDepths(this.userHandle_mc);
}
*/
// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse >this.userUpArrow_mc._y && _ymouse < this.userDownArrow_mc._y)
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);

this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.userUpArrow_mc._height);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


GenericScrollClass.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

GenericScrollClass.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var newXPos = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
newXPos -= (this.userHandle_mc._width/2);
this.SetHandleXPos(newXPos);
}
}


GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.userUpArrow_mc._height + this.userDownArrow_mc._height);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
this.userBar_mc._y = 0;
this.userBar_mc._height = Stage.height;
}
else
{
this.userBar_mc._y = yPos + this.userUpArrow_mc._height;
this.userBar_mc._height = this.actualBar;
}
this.userSpace_mc._y = this.userBar_mc._y;
this.userSpace_mc._height = this.userBar_mc._height;
this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.userUpArrow_mc._height/2));
if (newXPos == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.userDownArrow_mc._height/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
}
}

this.SizeHandle();
}

function RepositionOnFail()
{
var newXPos = this.Owner.FindBarEdge(this._y + (this._height/2));
if (newXPos != -123456)
{
newXPos -= (this._width/2)
this._x = newXPos;
}
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Main Scroll Actions????O?????????????eL?D#initclip

var debug_trace = _parent.debug_trace;
var currentItem = undefined;

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.actualBar;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

#endinitclip??
Scrollbar to Owner????O????? elCount,levelCount++);
this.userTop_mc = top_mc.duplicateMovieClip("top"+levelCount,levelCount++);
this.userBottom_mc = bottom_mc.duplicateMovieClip("bottom"+levelCount,levelCount++);
this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+levelCount,levelCount++);

this.userUpArrow_mc.tabEnabled=false;
this.userDownArrow_mc.tabEnabled=false;
this.userHandle_mc.tabEnabled=false;
this.userTop_mc.tabEnabled=false;
this.userBottom_mc.tabEnabled=false;
this.userIcon_mc.tabEnabled=false;


this.enabled = true;
this.bPlayDisabled = true;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.origHandleHeight = 0;
this.origHandleWidth = this.userHandle_mc._width;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 10;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 500;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

this.bOver = false;

// Initialize Object
this.Init();
}

ChildScroll.prototype = new MovieClip();

ChildScroll.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.origHandleHeight = this.GetHandleHeight();
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.upArrowHeight);

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}

// Create movie event handlers
this.userHandle_mc.Owner = this;
this.userIcon_mc.Owner = this;
this.userTop_mc.Owner = this;
this.userBottom_mc.Owner = this;
this.userBar_mc.Owner = this;
this.userUpArrow_mc.Owner = this;
this.userDownArrow_mc.Owner = this;
this.userSpace_mc.Owner = this;

this.userHandle_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userHandle_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userHandle_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userTop_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userTop_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userTop_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userBottom_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userBottom_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userBottom_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userIcon_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userIcon_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userIcon_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};


this.userUpArrow_mc.onPress = function()
{
this.Owner.onUpArrowPress();
};

this.userUpArrow_mc.onRelease = function()
{
this.Owner.onUpArrowRelease();
};

this.userUpArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onUpArrowRollOver();
};

this.userUpArrow_mc.onRollOut = function()
{
this.Owner.onUpArrowRollOut();
};

this.userUpArrow_mc.onDragOut = function()
{
this.Owner.onUpArrowDragOut();
};

this.userDownArrow_mc.onPress = function()
{
this.Owner.onDownArrowPress();
};

this.userDownArrow_mc.onRelease = function()
{
this.Owner.onDownArrowRelease();
};

this.userDownArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onDownArrowRollOver();
};

this.userDownArrow_mc.onRollOut = function()
{
this.Owner.onDownArrowRollOut();
};

this.userDownArrow_mc.onDragOut = function()
{
this.Owner.onDownArrowDragOut();
};
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
ChildScroll.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

ChildScroll.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

ChildScroll.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
ChildScroll.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

if ((this.GetHandleHeight() > scrollRegion) || (scrollHeight < paneHeight))
{
if (this.bResizeable)
{
this.SetHandleHeight(scrollRegion);
}
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
ChildScroll.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

testPos = (truePosition)/(this.maxScroll - this.ScrollHeight);

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);
this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.upArrowHeight);

if (this.MakeHandleInBar())
{
this.PositionChanged();
}
};

ChildScroll.prototype.MakeHandleInBar = function()
{
var bMoved = false;

if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.upArrowHeight);
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (nLeftEdge != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


ChildScroll.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

ChildScroll.prototype.FindBarRightEdge = function(YPos,XStart)
{
var nResult = -123456;
var bFound = true;
var leftSide = XStart;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (!bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}
else
{
nResult = 1;
}

return nResult;
}

ChildScroll.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
}
}


ChildScroll.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
this.PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


ChildScroll.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

ChildScroll.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

ChildScroll.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

ChildScroll.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

ChildScroll.prototype.GetHandleHeight = function ()
{
var handleHeight;
if (this.bResizeable || this.origHandleHeight == 0)
{
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
}
else
{
handleHeight = this.origHandleHeight;
}
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}th='2'>
</component>
???????????b$???????? ???Bar?????3???? ?  d????(C?????? handle_mc????<component metaDataFetched='true' schemaUrl='' schemaOp???????????????????????????????????????????????????????????????????????????????????n??????????+*3???????????????????????????????????????eration='' sceneRootLabel='Scene 1' oldCopiedComponentPath='3'>
</component>
???????????l
???????? ???Handle?????O???? ?P???5?P?d?????X??????icon_mc??
Layer 1????O???????CPicPage?? CPicLayer?? CPicFrame????x??0 ?0? ???????9A??
Layer 1????O????? 7X??_??' ?)????4????????????-??????????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='4'>
</component>
????????????k???????? ???Icon????O????? ???? ?aling
this.handleHeight = this.userHandle_mc._height;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 20;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.icon 
  
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????OPQR????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????dleWidth / 2);
this.SetHandleXPos(newXPos);
}
}


ChildScroll.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
this.PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


ChildScroll.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

ChildScroll.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

ChildScroll.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

ChildScroll.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

ChildScroll.prototype.GetHandleHeight = function ()
{
var handleHeight;
if (this.bResizeable || this.origHandleHeight == 0)
{
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
}
else
{
handleHeight = this.origHandleHeight;
}
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



ChildScroll.prototype.onHandleRollOver = function()
{
if (this.enabled == true && !this.bOver)
{
this.bOver = true;
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

ChildScroll.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
this.PositionChanged();
}
};

ChildScroll.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

ChildScroll.prototype.onHandleRollOut = function()
{
if (this.enabled && !this.MouseOnHandle())
{
this.bOver = false;
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

ChildScroll.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

ChildScroll.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

ChildScroll.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


ChildScroll.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
if (!this.bCurved)
{
newXPos -=5;
}

var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.upArrowHeight + this.downArrowHeight);
this.userUpArrow_mc._y = yPos;
if (!this.bCurved)
{
this.userBar_mc._x += deltaX;
this.userBar_mc._y = yPos + this.upArrowHeight;
this.userBar_mc._height = this.actualBar;
}

this.userDownArrow_mc._y = (yPos + SCHeight) - this.downArrowHeight;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2));
if (newXPos == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
}

this.SizeHandle();
}

ChildScroll.prototype.Show = function(bVisible)
{
if (!this.bCurved)
{
this.userBar_mc._visible = bVisible;
}
this.userUpArrow_mc._visible = bVisible;
this.userDownArrow_mc._visible = bVisible;
this.userHandle_mc._visible = bVisible;
this.userTop_mc._visible = bVisible;
this.userBottom_mc._visible = bVisible;
this.userIcon_mc._visible = bVisible;
}

ChildScroll.prototype.PositionChanged = function()
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = this.GetHandleYPos() - (this.userUpArrow_mc._y + this.upArrowHeight);

// Save the current posiiton for when the scrollbar is resized
this.realPosition = ((realPos / realBarHeight)*(this.maxScroll - this.ScrollHeight));

if (realBarHeight <= 0 || this.realPosition < 0)
{
this.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
this.pfnCallback(this.realPosition);
}
}

#endinitclip??
Child Scroll Actions????O?????????????'
??n
#initclip

var minMiddleHeight =20;
var wheelDeltaBase = 120;
var levelCount = 1;

function GenericScrollClass()
{
this.bResizeVisible = false;
this.resizeListener = new Object;
this.nResizeWidth = 4;
this.scrollBorder_mc = createEmptyMovieClip("ScrollBorder",levelCount++)
this.scrollBorder_mc.Owner = this;

if (this.bCurved)
{
this.userSpace_mc = this._parent.space_mc;
this.spaceBg_mc = createEmptyMovieClip("SpaceColor",-16384);
this.spaceBg_mc._x = this.userSpace_mc._x;
this.spaceBg_mc._y = this.userSpace_mc._y;
this.spaceBg_mc.setMask(this.userSpace_mc);
this.spaceBg_mc.onPress = function() {};
this.spaceBg_mc.useHandCursor = false;
this.spaceBgColor = 0xffffff;
this.CreateResizeBar();
this.bResizeable = false;
this.scrollBorder_mc._visible = false;
}
else
{
this._parent.space_mc._visible = false;
}

this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

this.userBar_mc.tabEnabled=false;
this.userSpace_mc.tabEnabled=false;
this.userUpArrow_mc.tabEnabled=false;
this.userDownArrow_mc.tabEnabled=false;
this.userHandle_mc.tabEnabled=false;
this.userTop_mc.tabEnabled=false;
this.userBottom_mc.tabEnabled=false;
this.userIcon_mc.tabEnabled=false;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling and positioning
this.handleHeight = this.userHandle_mc._height;
this.origHandleHeight = 0;
this.origHandleWidth = this.userHandle_mc._width;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 20;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 1000;
this.realPosition = 0;

this.bOver = false;
// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.CreateResizeBar = function ()
{
this.resizeBar_array = new Array();
var i = 0;
for (i = 0; i < this.nResizeWidth; i++)
{
this.resizeBar_array[i] = bar_mc.duplicateMovieClip("Resizebar"+levelCount,levelCount++);
this.resizeBar_array[i]._alpha = 0;
this.resizeBar_array[i].onPress = this.BeginResize;
this.resizeBar_array[i].onRelease = this.EndResize;
this.resizeBar_array[i].onReleaseOutside = this.EndResize;
this.resizeBar_array[i].Owner = this;
}
this.SetResizeDepth();
}

GenericScrollClass.prototype.PositionResizeBar = function ()
{
for (i = 0; i < this.nResizeWidth; i++)
{
this.resizeBar_array[i]._x = this.userBar_mc._x + (i+1);
this.resizeBar_array[i]._height = this.userBar_mc._height;
this.resizeBar_array[i]._y = this.userBar_mc._y;
}
}

GenericScrollClass.prototype.SetResizeBarDepth = function ()
{
var mc_array = new Array();
if (this.userSpace_mc !=undefined)
{
mc_array.push(this.userSpace_mc);
}
if (this.userBar_mc !=undefined)
{
mc_array.push(this.userBar_mc);
}
if (this.userHandle_mc !=undefined)
{
mc_array.push(this.userHandle_mc);
}
if (this.userIcon_mc !=undefined)
{
mc_array.push(this.userIcon_mc);
}
if (this.userTop_mc !=undefined)
{
mc_array.push(this.userTop_mc);
}
if (this.userBottom_mc !=undefined)
{
mc_array.push(this.userBottom_mc);
}
if (this.userUpArrow_mc !=undefined)
{
mc_array.push(this.userUpArrow_mc);
}
if (this.userDownArrow_mc !=undefined)
{
mc_array.push(this.userDownArrow_mc);
}

var nOffset = this.nResizeWidth;
var i = 0;
while (mc_array[i+nOffset] != undefined)
{
mc_array[i].swapDepths(mc_array[i+nOffset]);
i++;
}
var lastIndex = i;
for (i = 0; i < this.nResizeWidth; i++)
{
mc_array[lastIndex + i].swapDepths(this.resizeBar_array[i]);
}
}

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height);
this.origHandleHeight = this.GetHandleHeight();
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.upArrowHeight);

// Set the resizebar depth
if (this.bCurved)
{
this.SetResizeBarDepth();
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse >this.userUpArrow_mc._y && _ymouse < this.userDownArrow_mc._y)
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (this.GetHandleYPos() < (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.DisableItem();
this.userDownArrow_mc._visible = false;
this.userUpArrow_mc._visible = false;
this.userIcon_mc._visible = false;
this.userTop_mc._visible = false;
this.userBottom_mc._visible = false;
this.userHandle_mc._visible = false;
}
else if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.userDownArrow_mc._visible = true;
this.userUpArrow_mc._visible = true;
this.userIcon_mc._visible = true;
this.userTop_mc._visible = true;
this.userBottom_mc._visible = true;
this.userHandle_mc._visible = true;
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);

this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.upArrowHeight);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.upArrowHeight);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (nLeftEdge != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


GenericScrollClass.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

GenericScrollClass.prototype.FindBarRightEdge = function(YPos,XStart)
{
var nResult = -123456;
var bFound = true;
var leftSide = XStart;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (!bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}
else
{
nResult = 1;
}

return nResult;
}

GenericScrollClass.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
}
}


GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
if (this.bResizeable || this.origHandleHeight == 0)
{
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
}
else
{
handleHeight = this.origHandleHeight;
}
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true && !this.bOver)
{
this.bOver = true;
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled && !this.MouseOnHandle())
{
this.bOver = false;
this.GotoDefaultHandleState();
}
};

GenericScrollClass.prototype.MouseOnHandle = function()
{
var bResult = false;
if (this.userTop_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userBottom_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userIcon_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
return bResult;
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
if (!this.bCurved)
{
newXPos -= 5;
}
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.upArrowHeight + this.downArrowHeight);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
this.userBar_mc._y = 0;
this.userBar_mc._height = Stage.height;
}
else
{
this.userBar_mc._y = yPos + this.upArrowHeight;
this.userBar_mc._height = this.actualBar;
this.userBar_mc.Owner = this;
this.userBar_mc.onEnterFrame = this.CorrectSize;
}
this.userSpace_mc._y = this.userBar_mc._y;
this.userSpace_mc._height = this.userBar_mc._height;
this.SetBgColor(this.spaceBgColor);
this.userDownArrow_mc._y = (yPos + SCHeight) - this.downArrowHeight;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2));
if (newXPos == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position Resize Bar
this.PositionResizeBar()
}

// Create the ScrollBorder
this.scrollBorder_mc.clear();
this.scrollBorder_mc.lineStyle(1,0x999999,100);
this.scrollBorder_mc.moveTo(4,0);
this.scrollBorder_mc.lineTo(4,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xD2D2D2,100);
this.scrollBorder_mc.moveTo(3,0);
this.scrollBorder_mc.lineTo(3,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xD5D5D5,100);
this.scrollBorder_mc.moveTo(2,0);
this.scrollBorder_mc.lineTo(2,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xDADADA,100);
this.scrollBorder_mc.moveTo(1,0);
this.scrollBorder_mc.lineTo(1,Stage.height);
this.scrollBorder_mc.lineStyle(1,0x999999,100);
this.scrollBorder_mc.moveTo(0,0);
this.scrollBorder_mc.lineTo(0,Stage.height);
this.scrollBorder_mc.onPress = this.BeginResize;
this.scrollBorder_mc.onRelease = this.EndResize;
this.scrollBorder_mc.onReleaseOutside = this.EndResize;
this.scrollBorder_mc._x = Stage.width - 5;

this.spaceBg_mc._x = this.userSpace_mc._x;
this.spaceBg_mc._y = this.userSpace_mc._y;

this.SizeHandle();
}

GenericScrollClass.prototype.SetBgColor = function(newColor)
{
this.spaceBgColor = newColor;
this.spaceBg_mc.clear();
this.spaceBg_mc.moveTo(0,0);
this.spaceBg_mc.lineStyle(1,newColor,100);
this.spaceBg_mc.beginFill(newColor,100);
this.spaceBg_mc.lineTo(0,this.userSpace_mc._height);
this.spaceBg_mc.lineTo(this.userSpace_mc._width,this.userSpace_mc._height);
this.spaceBg_mc.lineTo(this.userSpace_mc._width,0);
this.spaceBg_mc.lineTo(0,0);
this.spaceBg_mc.endFill();
};

GenericScrollClass.prototype.CorrectSize = function()
{
this.onEnterFrame = undefined;
this.Owner.userBar_mc._height = this.Owner.actualBar;
};

function RepositionOnFail()
{
var newXPos = this.Owner.FindBarEdge(this._y + (this._height/2));
if (newXPos != -123456)
{
newXPos -= (this._width/2)
this._x = newXPos;
}
}

///////////////////////////////////////////////////////////////////////////
//
// Nav Pane resizing
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.BeginResize = function()
{
if (this.Owner.bResizeVisible)
{
this.Owner.scrollBorder_mc._visible = true;
}
_parent.BeginResize(_xmouse,_ymouse);
this.Owner.Drag();
this.Owner.resizeListener.onMouseMove = this.Owner.Drag;
Mouse.addListener(this.Owner.resizeListener);
};

GenericScrollClass.prototype.EndResize = function()
{
Mouse.removeListener(this.Owner.resizeListener);
if (fhgeneric_comp.bResizeVisible)
{
fhgeneric_comp.scrollBorder_mc._x = _xmouse;
}
_parent.EndResize(_xmouse,_ymouse);
};

GenericScrollClass.prototype.Drag = function()
{
if (fhgeneric_comp.bResizeVisible)
{
fhgeneric_comp.scrollBorder_mc._x = _xmouse;
}
_parent.Drag(_xmouse,_ymouse);
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Main Scroll Actions????O??????????????N?;#initclip

var debug_trace = _parent.debug_trace;
var currentItem = undefined;

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.actualBar;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.upArrowHeight);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

#endinitclip??
Scrollbar to Owner????O????? CenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 50;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new Movd????u??????top_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='5'>
</component>
???????????;?????? 
  
w !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW????????????[\]^_`abcdefghijklmnopqrstuv?xyz{|}~?ieClip();

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.userUpArrow_mc._y = this.userBar_mc._y;
this.userDownArrow_mc._y = (this.userBar._y + this.userBar_mc._height)- this.userDownArrow_mc._height;

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.userUpArrow_mc._height);

// Make sure that the handle depth is greater then the bar depth
if (this.userHandle_mc.getDepth() < this.userBar_mc.getDepth())
{
this.userBar_mc.swapDept?? ???Top??????O??? ?
?J 
d????R?????? bottom_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='6'>
</component>
??hs(this.userHandle_mc);
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
fhgeneric_comp.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// 
  
 !"#$%&'()????-????????/????01<????????????????????????z????????????=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]?????????????????????????????????????????????????????????????????opqrstuv{????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????n????????????????????*{????????????????????????????????????????????????0o???????? ???Bottom????O????? ?,L{@??@??,Ld????W?????? downarrow_mc
????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='10'>
</component>
???????????}s???????? ??? DownArrow????O?O??? ????d???? ??????
uparrow_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='8'>
</component>
???????????3x???????? ???UpArrow????O?O??? s clip to use on the right siSymbol 20?????9Symbol 21?????????????#Symbol 23????v?\Symbol 25????????t????CPicPage?? CPicLayer?? CPicFrame?????????3??#initclip
var miniScroll_array = new Array();

function CreateNewChildScroll(pfnCallback)
{
this.ScrollYPos = 0;
this.ScrollHeight = 0;
var newChild = new MiniScroll(pfnCallback);
newChild.SetScrollbarPosition(200,100);
miniScroll_array.push(newChild);
return newChild;
}

function MiniScroll(pfnCallback)
{
this.scrollbar = new ChildScroll(pfnCallback);
this.scrollID = this.scrollbar.scrollID;
}

MiniScroll.prototype.SetScrollRange = function(minScroll,maxScroll)
{
this.scrollbar.minScroll = minScroll;
this.scrollbar.maxScroll = maxScroll;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetItemHeight = function(newHeight)
{
this.scrollbar.itemHeight = newHeight;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetScrollbarPosition = function(yPos, SCHeight)
{
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;
this.scrollbar.PositionScrollBar(yPos, SCHeight);
}

MiniScroll.prototype.SetHandlePosition = function(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
this.scrollbar.MoveHandleToPosition(newPosition);
this.scrollbar.realPosition = newPosition;
}

MiniScroll.prototype.Show = function(bVisible)
{
this.scrollbar.Show(bVisible);
}

#endinitclip??
Child Scroll Commands?????OO??????????? Calculate the area where the handle can display
var scrollRegion = this.userBar_mc._height;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;

if (handleHeight > scrollRegion)
{
handleHeight = scrollRegion;
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.userBar_mc._height;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

testPos = (truePosition)/(this.maxScroll - fhgeneric_comp.ScrollHeight);

realPos = (truePosition*realBarHeight)/(this.maxScroll - fhgeneric_comp.ScrollHeight);
this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.userUpArrow_mc._height);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.userUpArrow_mc._height))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.userUpArrow_mc._height);
bMoved = true;
}
if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}

if (this.bCurved)
{
this.SetHandleXPos(this.FindBarEdge(this.GetHandleYPos()));
}

return bMoved;
};

GenericScrollClass.prototype.FindBarEdge = function(YPos)
{
var nResult = 0;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;
YPos += (this.GetHandleHeight())/2;
if (YPos <= this.userBar_mc._y)
{
YPos = this.userBar_mc._y + .01;
}

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
}
else
{
debug_trace("NOT FOUND!!!");
}
nResult = (leftSide + offset)-(this.userHandle_mc._width)/2
return nResult;
}

GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = yPos+this.userTop_mc._height;
this.userBottom_mc._y = this.userHandle_mc._y + this.userHandle_mc._height;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (fhgeneric_comp.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height;
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function()
{
if (fhgeneric_comp.bHandleDrag)
{
var yPos = _ymouse - fhgeneric_comp.dragYPos;
fhgeneric_comp.SetHandleYPos(yPos);
fhgeneric_comp.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function()
{
if (fhgeneric_comp.bArrowPressed)
{
if (fhgeneric_comp.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(fhgeneric_comp.ArrowInterval);
fhgeneric_comp.ArrowInterval = setInterval(fhgeneric_comp.ContinueScroll,75);
}
fhgeneric_comp.MoveHandle(0,fhgeneric_comp.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;

// Set YPosition and height
this.userUpArrow_mc._y = yPos;
this.userBar_mc._y = yPos + this.userUpArrow_mc._height;
this.userBar_mc._height = SCHeight - (this.userUpArrow_mc._height + this.userDownArrow_mc._height);
this.userDownArrow_mc._y = (yPos + SCHeight) - this.userDownArrow_mc._height;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

this.SizeHandle();
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Basic Scroll Actions????O?????????????H}??// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip



function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

function SetItemHeight(newHeight)
{
fhgeneric_comp.itemHeight = newHeight;
fhgeneric_comp.SizeHandle();
}

function SetScrollbarPosition(yPos, SCHeight)
{
fhgeneric_comp.PositionScrollBar(yPos, SCHeight);
}

function SetHandlePosition(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(newPosition);
fhgeneric_comp.realPosition = newPosition;
}

#endinitclip??
Scrollbar commands?????OO????????????5?M#initclip

var debug_trace = _parent.debug_trace;
var currentItem = undefined;

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.userBar_mc._height;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.userUpArrow_mc._height);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

#endinitclip??
Scrollbar to Owner????O???????ff??????f?
?????f??????f?(????????(?x????????H??3???x`??f???0x??????????PP??????P????????`??3????x??f??1?]
// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

function SetItemHeight(newHeight)
{
fhgeneric_comp.itemHeight = newHeight;
fhgeneric_comp.SizeHandle();
}

function SetScrollbarPosition(yPos, SCHeight)
{
fhgeneric_comp.PositionScrollBar(yPos, SCHeight);
}

function SetSpaceColor(newColor)
{
fhgeneric_comp.SetBgColor(newColor);
}

function ShowResizeCursor(bShow)
{
fhgeneric_comp.bShowResizeCursor = bShow;
}

function SetResizeVisible(bVisible)
{
if (!fhgeneric_comp.bVertical)
{
fhgeneric_comp.bResizeVisible = bVisible;
}
}

function DoHideCursorOnResize(bHideCursorOnResize)
{
fhgeneric_comp.bHideCursorOnResize = bHideCursorOnResize;
}

function SetHandlePosition(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(newPosition);
fhgeneric_comp.realPosition = newPosition;
}

function GetScrollEdgeAtPos(yPos)
{
nResult = Stage.width;
if (fhgeneric_comp.bCurved)
{
nResult = fhgeneric_comp.FindBarEdge(yPos);
}
else
{
if (yPos>fhgeneric_comp.ScrollYPos && yPos < fhgeneric_comp.ScrollYPos+fhgeneric_comp.ScrollHeight)
{
nResult = Stage.width - (fhgeneric_comp.userBar_mc._width);
}
else
{
for (i=0; i< miniScroll_array.length;i++)
{
if (yPos>miniScroll_array[i].ScrollYPos && yPos < miniScroll_array[i].ScrollYPos+miniScroll_array[i].ScrollHeight)
{
nResult = Stage.width - (miniScroll_array[i].scrollbar.userBar_mc._width);
}
}
}
if (!fhgeneric_comp.bVertical)
{
nResult -=5;
}
}
return nResult;
}

function GetScrollbarWidth()
{
var nWidth = 0;
if (!fhgeneric_comp.bCurved)
{
nWidth = fhgeneric_comp.userBar_mc._width;
}
else
{
nWidth = fhgeneric_comp.userBar_mc._width + (fhgeneric_comp.downArrowWidth/2);
}
return nWidth;
}

function HideAllMiniScroll()
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
miniScroll_array[i].Show(false);
}
}

function ShowMainScroll()
{
fhgeneric_comp.userTop_mc._visible = true;
fhgeneric_comp.userBottom_mc._visible = true;
fhgeneric_comp.userIcon_mc._visible = true;
fhgeneric_comp.userBar_mc._visible = true;
fhgeneric_comp.userSpace_mc._visible = true;
fhgeneric_comp.userUpArrow_mc._visible = true;
fhgeneric_comp.userDownArrow_mc._visible = true;
fhgeneric_comp.userHandle_mc._visible = true;
fhgeneric_comp.userTop_mc._visible = true;
fhgeneric_comp.userBottom_mc._visible = true;
fhgeneric_comp.userIcon_mc._visible = true;
}

#endinitclip??
Scrollbar commands?????OO?????????????^#initclip

function ChildScroll(pfnCallback)
{
this.bVertical = fhgeneric_comp.bVertical;
this.pfnCallback = pfnCallback;
this.bCurved = fhgeneric_comp.bCurved
this.bResizeable = fhgeneric_comp.bResizeable;
if (this.bCurved)
{
this.bResizeable = false;
}

if (!this.bCurved)
{
this.userBar_mc = bar_mc.duplicateMovieClip("bar"+levelCount,levelCount++);
this.userBar_mc.tabEnabled = false;
this.userBar_mc.Owner = this;
}
else
{
this.userBar_mc = bar_mc;
}
if (this.bVertical)
{
this.scrollBorder_mc._visible = false;
this.bResizeVisible = false;
}

this.scrollID = levelCount;

this.userUpArrow_mc = uparrow_mc.duplicateMovieClip("uparrow"+levelCount,levelCount++);
this.userDownArrow_mc = downarrow_mc.duplicateMovieClip("downarrow"+levelCount,levelCount++);
this.userHandle_mc = handle_mc.duplicateMovieClip("handle"+levelCount,levelCount++);
this.userTop_mc = top_mc.duplicateMovieClip("top"+levelCount,levelCount++);
this.userBottom_mc = bottom_mc.duplicateMovieClip("bottom"+levelCount,levelCount++);
this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+levelCount,levelCount++);

this.userUpArrow_mc.tabEnabled=false;
this.userDownArrow_mc.tabEnabled=false;
this.userHandle_mc.tabEnabled=false;
Symbol 31????????????,Symbol 32?????Symbol 34 ?????Symbol 35????????????[SSymbol 27????????????7??Symbol 28??????Symbol 29????????????Z=?Symbol 33????????????k???CPicPage?? CPicLayer?? CPicFrame??????h????? ?????pmn?? ???0?0 0??????????A
???????? ???BG????O?O???CPicPage?? CPicLayer?? CPicFrame??
CPicSymbolx

??x?????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????o??
Labels????O?O????????????????d???????? ???Button?????OO???nts in the Navigatio??CPicPage?? CPicLayer?? CPicFrame??CPicText??
k??? &?C??CPicPage?? CPicLayer?? CPicFrame??CPicText??
? ???? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???
return;
};

ChildScroll.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



ChildScroll.prototype.onHandleRollOver = function()
{
if (this.enabled == true && !this.bOver)
{
this.bOver = true;
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

ChildScroll.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
this.PositionChanged();
}
};

ChildScroll.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

ChildScroll.prototype.onHandleRollOut = function()
{
if (this.enabled && !this.MouseOnHandle())
{
this.bOver = false;
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

ChildScroll.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onDownArrowRelease = function()
{
if (thi this.userTop_mc.tabEnabled=false;
this.userBottom_mc.tabEnabled=false;
this.userIcon_mc.tabEnabled=false;


this.enabled = true;
this.bPlayDisabled = true;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.origHandleHeight = 0;
this.origHandleWidth = this.userHandle_mc._width;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;
this.topOverlap = fhgeneric_comp.topOverlap;
this.bottomOverlap = fhgeneric_comp.bottomOverlap;
this.upArrowWidth = this.userUpArrow_mc._width;
this.downArrowWidth = this.userDownArrow_mc._width;
this.userUpArrow_mc.origWidth = this.userUpArrow_mc._width;
this.userDownArrow_mc.origWidth = this.userDownArrow_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 10;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 500;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;
s.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

ChildScroll.prototype.onDownArrowDragOut =
this.bOver = false;

// Initialize Object
this.Init();
}

ChildScroll.prototype = new MovieClip();

ChildScroll.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.origHandleHeight = this.GetHandleHeight();
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.upArrowHeight);

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}

// Create movie event handlers
this.userHandle_mc.Owner = this;
this.userIcon_mc.Owner = this;
this.userTop_mc.Owner = this;
this.userBottom_mc.Owner = this;
this.userBar_mc.Owner = this;
this.userUpArrow_mc.Owner = this;
this.userDownArrow_mc.Owner = this;
this.userSpace_mc.Owner = this;

this.userHandle_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userHandle_mc.onPress = function()
{
this.Owner.onHandlePress();
};
if (!this.bCurved)
{
this.userBar_mc.onPress = function()
{
this.Owner.onBarPress();
}
}
this.userHandle_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userTop_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userTop_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userTop_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userBottom_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userBottom_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userBottom_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userIcon_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userIcon_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userIcon_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};


this.userUpArrow_mc.onPress = function()
{
this.Owner.onUpArrowPress();
};

this.userUpArrow_mc.onRelease = function()
{
this.Owner.onUpArrowRelease();
};

this.userUpArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onUpArrowRollOver();
};

this.userUpArrow_mc.onRollOut = function()
{
this.Owner.onUpArrowRollOut();
};

this.userUpArrow_mc.onDragOut = funct????????)??????????s???????? ???Hint??????O?????
CPicSymbol??&?3??????????????????8??????? ?!ion()
{
this.Owner.onUpArrowDragOut();
};

this.userDownArrow_mc.onPress = function()
{
this.Owner.onDownArrowPress();
};

this.userDownArrow_mc.onRelease = function()
{
this.Owner.onDownArrowRelease();
};

this.userDownArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onDownArrowRollOver();
};

this.userDownArrow_mc.onRollOut = function()
{
this.Owner.onDownArrowRollOut();
};

this.userDownArrow_mc.onDragOut = function()
{
this.Owner.onDownArrowDragOut();
};
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
ChildScroll.prototype.onBarPress = function()
{
_parent.debug_alert("onBarPress");
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

ChildScroll.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCurso?????????
????????????????? ?+??&?3????????
??????????|??????? ?5??M?f2?????????????????Oc??????? ?6d?????? ?????????ho??????? ??????? function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

ChildScroll.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};

ChildScroll.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
if (!this.bCurved)
{
newXPos -=5;
}

var deltaX = newXPos - this.userBar_mc._x;
thr = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

ChildScroll.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownAris.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.upArrowHeight + this.downArrowHeight);
this.userUpArrow_mc._y = yPos;
if (!this.bCurved)
{
this.userBar_mc._x += deltaX;
this.userBar_mc._y = yPos + this.upArrowHeight;
this.userBar_mc._height = this.actualBar;
}

this.userDownArrow_?????????????????? ??? Button BG????O?O??? ?PPPP???????"???????????r:??????? ?PPPP???????"??mc._y = (yPos + SCHeight) - this.downArrowHeight;

if (this.userDownArrow_mc._y < (this.userUpArrow_mc._y+this.upArrowHeight))
{
this.userDownArrow_mc._y = (this.userUpArrow_mc._y+this.upArrowHeight);
}

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2));
if (newXPos == -123456)
{
??CPicPage?? CPicLayer?? CPicFrame??
CPicSymbol
?
????????pZ??
??CPicPage?? CPicLayer?? CPicFrame??????? ?0 ?0???????? 7 ?????????`??????? ?PPPP????"???????????????????? ???Symbol?????3???????????????this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
}

this.SizeHandle();
}

ChildScroll.prototype.Show = function(bVisible)
{
if (!this.bCurved)
{
this.userBar_mc._visible = bVisible;
}
this.userUpArrow_mc._visible = bVisible;
this.userDownArrow_mc._visible = bVisible;
this.userHandle_mc._visible = bVisible;
this.userTop_mc._visible = bVisible;
this.userBottom_mc._visible = bVisible;
this.userIcon_mc._visible = bVisible;
}

ChildScroll.prototype.PositionChanged = function()
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = this.GetHandleYPos() - (this.userUpArrow_mc._y + this.upArrowHeight);

// Save the current posiiton for when the scrollbar is resized
this.realPosition = ((realPos / realBarHeight)*(this.maxScroll - this.ScrollHeight));

if (realBarHeight <= 0 || this.realPosition < 0)
{
this.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
this.pfnCallback(this.realPosition);
}
}

#endinitclip??
Child Scroll Actions????O?????????????nf??p
#initclip

var minMiddleHeight =20;
var wheelDeltaBase = 120;
var levelCount = 1;

function GenericScrollClass()
{
this.bResizeVisible = false;
this.resizeListener = new Object;
this.nResizeWidth = 4;
this.scrollBorder_mc = createEmptyMovieClip("ScrollBorder",levelCount++)
this.scrollBorder_mc.Owner = this;

if (this.bCurved)
{
this.userSpace_mc = this._parent.space_mc;
this.spaceBg_mc = createEmptyMovieClip("SpaceColor",-16384);
this.spaceBg_mc._x = this.userSpace_mc._x;
this.spaceBg_mc._y = this.userSpace_mc._y;
this.spaceBg_mc.setMask(this.userSpace_mc);
this.spaceBg_mc.onPress = function() {};
this.spaceBg_mc.useHandCursor = false;
this.spaceBgColor = 0xffffff;
this.CreateResizeBar();
this.bResizeable = false;
this.scrollBorder_mc._visible = false;
}
else
{
this._parent.space_mc._visible = false;
}

this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbarC??
CDocumentPagePage 1???Scene 1????æ>
??????????????????????ub?F??????????????????????????????????????????????????????????
???????? Symbol 21???Icon?????>&??>x??????
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;

this.userBar_mc.tabEnabled=false;
this.userSpace_mc.tabEnabled=false;
this.userUpArrow_mc.tabEnabled=false;
this.userDownArrow_mc.tabEnabled=false;
this.userHandle_mc.tabEnabled=false;
this.userTop_mc.tabEnabled=false;
this.userBottom_mc.tabEnabled=false;
this.userIcon_mc.tabEnabled=false;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling and positioning
this.handleHeight = this.userHandle_mc._height;
this.origHandleHeight = 0;
this.origHandleWidth = this.userHandle_mc._width;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;
this.topOverlap = 0;
this.bottomOverlap = 0;

if (this.userTop_mc != undefined)
{
this.topOverlap = (this.userTop_mc._y +this.userTop_mc._height) - (this.userHandle_mc._y);
}
if (this.userBottom_mc != undefined)
{
this.bottomOverlap = (this.userHandle_mc._y + this.userHandle_mc._height) - this.userBottom_mc._y;
}

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 20;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 1000;
this.realPosition = 0;

this.bOver = false;
// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.CreateResizeBar = function ()
{
this.resizeBar_array = new Array();
var i = 0;
for (i = 0; i < this.nResizeWidth; i++)
{
this.resizeBar_array[i] = bar_mc.duplicateMovieClip("Resizebar"+levelCount,levelCount++);
this.resizeBar_array[i]._alpha = 0;
this.resizeBar_array[i].onPress = this.BeginResize;
this.resizeBar_array[i].onRelease = this.EndResize;
this.resizeBar_array[i].onReleaseOutside = this.EndResize;
this.resizeBar_array[i].Owner = this;
}
this.rowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
ChildScroll.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

if ((this.GetHandleHeight() > scrollRegion) || (scrollHeight < paneHeight))
{
if (this.bResizeable)
{
this.SetHandleHeight(scrollRegion);
}
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
ChildScroll.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

testPos = (truePosition)/(this.maxScroll - this.ScrollHeight);

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);
this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.upArrowHeight);

if (this.MakeHandleInBar())
{
this.PositionChanged();
}
};

ChildScroll.prototype.MakeHandleInBar = function()
{
var bMoved = false;

if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.upArrowHeight);
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (nLeftEdge != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


ChildScroll.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

ChildScroll.prototype.FindBarRightEdge = function(YPos,XStart)
{
var nResult = -123456;
var bFound = true;
var leftSide = XStart;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

wSetResizeDepth();
}

GenericScrollClass.prototype.PositionResizeBar = function ()
{
for (i = 0; i < this.nResizeWidth; i++)
{
this.resizeBar_array[i]._x = this.userBar_mc._x + (i+1);
this.resizeBar_array[i]._height = this.userBar_mc._height;
this.resizeBar_array[i]._y = this.userBar_mc._y;
}
}

GenericScrollClass.prototype.SetResizeBarDepth = function ()
{
var mc_array = new Array();
if (this.userSpace_mc !=undefined)
{
mc_array.push(this.userSpace_mc);
}
if (this.userBar_mc !=undefined)
{
mc_array.push(this.userBar_mc);
}
if (this.userHandle_mc !=undefined)
{
mc_array.push(this.userHandle_mc);
}
if (this.userIcon_mc !=undefined)
{
mc_array.push(this.userIcon_mc);
}
if (this.userTop_mc !=undefined)
{
mc_array.push(this.userTop_mc);
}
if (this.userBottom_mc !=undefined)
{
mc_array.push(this.userBottom_mc);
}
if (this.userUpArrow_mc !=undefined)
{
mc_array.push(this.userUpArrow_mc);
}
if (this.userDownArrow_mc !=undefined)
{
mc_array.push(this.userDownArrow_mc);
}

var nOffset = this.nResizeWidth;
var i = 0;
while (mc_array[i+nOffset] != undefined)
{
mc_array[i].swapDepths(mc_array[i+nOffset]);
i++;
}
var lastIndex = i;
for (i = 0; i < this.nResizeWidth; i++)
{
mc_array[lastIndex + i].swapDepths(this.resizeBar_array[i]);
}
}

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height);
this.origHandleHeight = this.GetHandleHeight();
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.upArrowHeight);

// Set the resizebar depth
if (this.bCurved)
{
this.SetResizeBarDepth();
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse >this.userUpArrow_mc._y && _ymouse < this.userDownArrow_mc._y)
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

if ((this.GetHandleHeight() > scrollRegion) || (scrollHeight < paneHeight))
{
if (this.bResizeable)
{
this.SetHandleHeight(scrollRegion);
}
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);

this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.upArrowHeight);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;

if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.upArrowHeight);
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (nLeftEdge != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


GenericScrollClass.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

GenericScrollClass.prototype.FindBarRightEdge = function(YPos,XStart)
{
var nResult = -123456;
var bFound = true;
var leftSide = XStart;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (!bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}
else
{
nResult = 1;
}

return nResult;
}

GenericScrollClass.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
}
}


GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = (yPos+this.userTop_mc._height) - this.topOverlap;
this.userBottom_mc._y = (this.userHandle_mc._y + this.userHandle_mc._height) - this.bottomOverlap;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
if (this.bResizeable || this.origHandleHeight == 0)
{
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height - (this.topOverlap+this.bottomOverlap);
}
else
{
handleHeight = this.origHandleHeight;
}
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true && !this.bOver)
{
this.bOver = true;
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled && !this.MouseOnHandle())
{
this.bOver = false;
this.GotoDefaultHandleState();
}
};

GenericScrollClass.prototype.MouseOnHandle = function()
{
var bResult = false;
if (this.userTop_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userBottom_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userIcon_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
return bResult;
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true))
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
if (!this.bCurved)
{
newXPos -= 5;
}
var deltaX = newXPos - this.userBar_mc._x;
this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.upArrowHeight + this.downArrowHeight);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
this.userBar_mc._y = 0;
this.userBar_mc._height = Stage.height;
}
else
{
this.userBar_mc._y = yPos + this.upArrowHeight;
this.userBar_mc._height = this.actualBar;
this.userBar_mc.Owner = this;
this.userBar_mc.onEnterFrame = this.CorrectSize;
}
this.userSpace_mc._y = this.userBar_mc._y;
this.userSpace_mc._height = this.userBar_mc._height;
this.SetBgColor(this.spaceBgColor);
this.userDownArrow_mc._y = (yPos + SCHeight) - this.downArrowHeight;
if (this.userDownArrow_mc._y < (this.userUpArrow_mc._y+this.upArrowHeight))
{
this.userDownArrow_mc._y = (this.userUpArrow_mc._y+this.upArrowHeight);
}

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var newXPos = this.FindBarEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2));
if (newXPos == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userUpArrow_mc._width/2)
this.userUpArrow_mc._x = newXPos;
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position DownArrow
newXPos = this.FindBarEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2));
if (newXPos == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
newXPos -= (this.userDownArrow_mc._width/2)
this.userDownArrow_mc._x = newXPos;
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position Resize Bar
this.PositionResizeBar()
}

// Create the ScrollBorder
this.scrollBorder_mc.clear();
this.scrollBorder_mc.lineStyle(1,0x999999,100);
this.scrollBorder_mc.moveTo(4,0);
this.scrollBorder_mc.lineTo(4,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xD2D2D2,100);
this.scrollBorder_mc.moveTo(3,0);
this.scrollBorder_mc.lineTo(3,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xD5D5D5,100);
this.scrollBorder_mc.moveTo(2,0);
this.scrollBorder_mc.lineTo(2,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xDADADA,100);
this.scrollBorder_mc.moveTo(1,0);
this.scrollBorder_mc.lineTo(1,Stage.height);
this.scrollBorder_mc.lineStyle(1,0x999999,100);
this.scrollBorder_mc.moveTo(0,0);
this.scrollBorder_mc.lineTo(0,Stage.height);
this.scrollBorder_mc.onPress = this.BeginResize;
this.scrollBorder_mc.onRelease = this.EndResize;
this.scrollBorder_mc.onReleaseOutside = this.EndResize;
this.scrollBorder_mc._x = Stage.width - 5;

this.spaceBg_mc._x = this.userSpace_mc._x;
this.spaceBg_mc._y = this.userSpace_mc._y;

this.SizeHandle();
}

GenericScrollClass.prototype.SetBgColor = function(newColor)
{
this.spaceBgColor = newColor;
this.spaceBg_mc.clear();
this.spaceBg_mc.moveTo(0,0);
this.spaceBg_mc.lineStyle(1,newColor,100);
this.spaceBg_mc.beginFill(newColor,100);
this.spaceBg_mc.lineTo(0,this.userSpace_mc._height);
this.spaceBg_mc.lineTo(this.userSpace_mc._width,this.userSpace_mc._height);
this.spaceBg_mc.lineTo(this.userSpace_mc._width,0);
this.spaceBg_mc.lineTo(0,0);
this.spaceBg_mc.endFill();
};

GenericScrollClass.prototype.CorrectSize = function()
{
this.onEnterFrame = undefined;
this.Owner.userBar_mc._height = this.Owner.actualBar;
};

function RepositionOnFail()
{
var newXPos = this.Owner.FindBarEdge(this._y + (this._height/2));
if (newXPos != -123456)
{
newXPos -= (this._width/2)
this._x = newXPos;
}
}

///////////////////////////////////////////////////////////////////////////
//
// Nav Pane resizing
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.BeginResize = function()
{
if (this.Owner.bResizeVisible)
{
this.Owner.scrollBorder_mc._visible = true;
}
_parent.BeginResize(_xmouse,_ymouse);
this.Owner.Drag();
this.Owner.resizeListener.onMouseMove = this.Owner.Drag;
Mouse.addListener(this.Owner.resizeListener);
};

GenericScrollClass.prototype.EndResize = function()
{
Mouse.removeListener(this.Owner.resizeListener);
if (fhgeneric_comp.bResizeVisible)
{
fhgeneric_comp.scrollBorder_mc._x = _xmouse;
}
_parent.EndResize(_xmouse,_ymouse);
};

GenericScrollClass.prototype.Drag = function()
{
if (fhgeneric_comp.bResizeVisible)
{
fhgeneric_comp.scrollBorder_mc._x = _xmouse;
}
_parent.Drag(_xmouse,_ymouse);
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
if (_ymouse >= fhgeneric_comp.ScrollYPos && _ymouse <= (fhgeneric_comp.ScrollYPos + fhgeneric_comp.ScrollHeight))
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}
else
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
if (_ymouse>=miniScroll_array[i].ScrollYPos && _ymouse <= miniScroll_array[i].ScrollYPos+miniScroll_array[i].ScrollHeight)
{
miniScroll_array[i].scrollbar.onMouseWheel(wheelDelta);
}
}
}
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);


#endinitclip??
Main Scroll Actions????O??????????????r?;#initclip

var debug_trace = _parent.debug_trace;
var currentItem = undefined;

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.actualBar;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.upArrowHeight);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

if (realBarHeight <= 0 || fhgeneric_comp.realPosition < 0)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

#endinitclip??
Scrollbar to Owner????O????? hile (bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (!bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}
else
{
nResult = 1;
}

return nResult;
}

ChildScroll.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
}
}


ChildScroll.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
this.PositionChanged();
};

ChildScroll.prototype.onBarPress = function()
{
if (_ymouse >this.userUpArrow_mc._y && _ymouse < this.userDownArrow_mc._y)
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
}
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


ChildScroll.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = (yPos+this.userTop_mc._height) - this.topOverlap;
this.userBottom_mc._y = (this.userHandle_mc._y + this.userHandle_mc._height) - this.bottomOverlap;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

ChildScroll.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

ChildScroll.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

ChildScroll.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

ChildScroll.prototype.GetHandleHeight = function ()
{
var handleHeight;
if (this.bResizeable || this.origHandleHeight == 0)
{
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height - (this.topOverlap+this.bottomOverlap);
}
else
{
handleHeight = this.origHandleHeight;
}
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



ChildScroll.prototype.onHandleRollOver = function()
{
if (this.enabled == true && !this.bOver)
{
this.bOver = true;
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

ChildScroll.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
this.PositionChanged();
}
};

ChildScroll.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

ChildScroll.prototype.onHandleRollOut = function()
{
if (this.enabled && !this.MouseOnHandle())
{
this.bOver = false;
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true) && this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

ChildScroll.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true) && this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

ChildScroll.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

ChildScroll.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};

ChildScroll.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
if (!this.bCurved && !this.bVertical)
{
newXPos -=5;
}

var deltaX = newXPos - this.userBar_mc._x;
if (this.bCurved)
{
deltaX -= (this.downArrowWidth/2);
}

this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.upArrowHeight + this.downArrowHeight);
this.userUpArrow_mc._y = yPos;
if (!this.bCurved)
{
this.userBar_mc._x += deltaX;
this.userBar_mc._y = yPos + this.upArrowHeight;
this.userBar_mc._height = this.actualBar;
}

this.userDownArrow_mc._y = (yPos + SCHeight) - this.downArrowHeight;

if (this.userDownArrow_mc._y < (this.userUpArrow_mc._y+this.upArrowHeight))
{
this.userDownArrow_mc._y = (this.userUpArrow_mc._y+this.upArrowHeight);
}

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var nLeftEdge = this.FindBarEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2));
if (nLeftEdge == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
var nRightEdge = this.FindBarRightEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2),nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.upArrowWidth/2)
this.userUpArrow_mc._x = newXPos;
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position DownArrow
nLeftEdge = this.FindBarEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2));
if (nLeftEdge == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
var nRightEdge = this.FindBarRightEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2),nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.downArrowWidth/2)
this.userDownArrow_mc._x = newXPos;
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
}

this.SizeHandle();
}

ChildScroll.prototype.Show = function(bVisible)
{
if (!this.bCurved)
{
this.userBar_mc._visible = bVisible;
}
this.userUpArrow_mc._visible = bVisible;
this.userDownArrow_mc._visible = bVisible;
this.userHandle_mc._visible = bVisible;
this.userTop_mc._visible = bVisible;
this.userBottom_mc._visible = bVisible;
this.userIcon_mc._visible = bVisible;
}

ChildScroll.prototype.PositionChanged = function()
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = this.GetHandleYPos() - (this.userUpArrow_mc._y + this.upArrowHeight);

// Save the current posiiton for when the scrollbar is resized
this.realPosition = ((realPos / realBarHeight)*(this.maxScroll - this.ScrollHeight));

if (realBarHeight <= 0 || this.realPosition < 0)
{
this.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
this.pfnCallback(this.realPosition);
}
}

#endinitclip??
Child Scroll Actions????O??????????????$?o?
#initclip

var RESIZEBAR_TIMEOUT = 2000; // 2 Seconds
var VERTICAL_SKIN = "vertical tripane"
var minMiddleHeight =20;
var wheelDeltaBase = 120;
var levelCount = 1;
var resizeCursorWidth = 9;
var resizeCursorHeight = 22;

function GenericScrollClass()
{
_global.NavHost.gVerticalSkin
this.bVertical = false;
if (_global.NavHost.gVerticalSkin == VERTICAL_SKIN)
{
this.bVertical = true;
}
this.bShowResizeCursor = true;
this.bHideCursorOnResize = true;
this.bResizeVisible = false;
this.resizeListener = new Object;
this.nResizeWidth = 4;
this.scrollBorder_mc = createEmptyMovieClip("ScrollBorder",levelCount++)
this.scrollBorder_mc.Owner = this;
this.scrollBorder_mc.useHandCursor = false;
this.resizeCursor_mc = createEmptyMovieClip("ResizeCursor",200)
this.resizeCursor_mc.Owner = this;
this.resizeCursor_mc.useHandCursor = false;
this.resizeCursor_mc._visible = false;
this.resizeInterval = undefined;
this.bResizing = false;

if (this.bCurved)
{
this.userSpace_mc = this._parent.space_mc;
this.spaceBg_mc = createEmptyMovieClip("SpaceColor",-16384);
this.spaceBg_mc._x = this.userSpace_mc._x;
this.spaceBg_mc._y = this.userSpace_mc._y;
this.spaceBg_mc.setMask(this.userSpace_mc);
this.spaceBg_mc.onPress = function() {};
this.spaceBg_mc.useHandCursor = false;
this.spaceBgColor = 0xffffff;
this.CreateResizeBar();
this.bResizeable = false;
this.scrollBorder_mc._visible = false;
}
else
{
this._parent.space_mc._visible = false;
}
if (this.bVertical)
{
this.scrollBorder_mc._visible = false;
this.bResizeVisible = false;
}

this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;
this.userBar_mc.tabEnabled=false;
this.userSpace_mc.tabEnabled=false;
this.userUpArrow_mc.tabEnabled=false;
this.userDownArrow_mc.tabEnabled=false;
this.userHandle_mc.tabEnabled=false;
this.userTop_mc.tabEnabled=false;
this.userBottom_mc.tabEnabled=false;
this.userIcon_mc.tabEnabled=false;

// Set Everything initially invisible
if (this._parent != _root)
{
this.userTop_mc._visible = false;
this.userBottom_mc._visible = false;
this.userIcon_mc._visible = false;
this.userBar_mc._visible = false;
this.userSpace_mc._visible = false;
this.userUpArrow_mc._visible = false;
this.userDownArrow_mc._visible = false;
this.userHandle_mc._visible = false;
this.userTop_mc._visible = false;
this.userBottom_mc._visible = false;
this.userIcon_mc._visible = false;
}

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling and positioning
this.handleHeight = this.userHandle_mc._height;
this.origHandleHeight = 0;
this.origHandleWidth = this.userHandle_mc._width;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;
this.topOverlap = 0;
this.bottomOverlap = 0;
this.upArrowWidth = this.userUpArrow_mc._width;
this.downArrowWidth = this.userDownArrow_mc._width;
this.userUpArrow_mc.origWidth = this.userUpArrow_mc._width;
this.userDownArrow_mc.origWidth = this.userDownArrow_mc._width;

if (this.userTop_mc != undefined)
{
this.topOverlap = (this.userTop_mc._y +this.userTop_mc._height) - (this.userHandle_mc._y);
}
if (this.userBottom_mc != undefined)
{
this.bottomOverlap = (this.userHandle_mc._y + this.userHandle_mc._height) - this.userBottom_mc._y;
}

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 20;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 1000;
this.realPosition = 0;

this.bOver = false;
// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.CreateResizeBar = function ()
{
this.resizeBar_array = new Array();
var i = 0;
for (i = 0; i < this.nResizeWidth; i++)
{
this.resizeBar_array[i] = bar_mc.duplicateMovieClip("Resizebar"+levelCount,levelCount++);
this.resizeBar_array[i].useHandCursor = false;
this.resizeBar_array[i]._alpha = 0;
this.resizeBar_array[i].onPress = this.BeginResize;
this.resizeBar_array[i].onRelease = this.EndResize;
this.resizeBar_array[i].onReleaseOutside = this.EndResize;
this.resizeBar_array[i].Owner = this;
this.resizeBar_array[i].onMouseMove = this.MouseOverResize;
this.resizeBar_array[i].onRollOut = this.MouseOutResize;
}
this.SetResizeDepth();
}

GenericScrollClass.prototype.PositionResizeBar = function?3???stop();??????
??????????'???stop();??????
?????????
???stop();?????? ?????????????stop();???????????????D ???stop();????? ???Actions?????OO??????????????:??????????????????normal??????????
?????????over??????????
?????????downfO????????? ?????????disabled???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? Symbol 21????????^?F?????????????????????????????????????????????????????????????????? Symbol 13???Bar
???<y?>??>???????????????? Symbol 13???????e`?F??????????????????????????????????????????????????????????????????Symbol 6???Handle Top Bottom???<y?>
??>w???????????????Symbol 6????????a?F??????????????????????????????????????????????????????????????????Symbol 9???Handle ???<y?>`??>N???????????????,Placeholder Graphics/Handle Placeholder copy???????ra?F??????????????????????????????????????????????????????????????????Symbol 5???Handle???R??>
}?> ???????????????Symbol 5????????^?F??????????????????????????????????????????????????????????????????Symbol 8??? HandleTop???R??>?|?>???????????????MovieHandle copy????????_?F?????????????????????????????????????????????????????????????????? Symbol 20???Icon???R??>?J?>V???????????????HandleTop copy???????:????????????????????Sq???????? ???Labels????O?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? Symbol 17??? HandleBottom???R??>??>????????????????HandleTop copy???????ob?F??????????????????????????????????????????????????????????????????Symbol 2???MovieBar???R??>:?>???????????????Symbol 2???????a??????????????????????????????????????????????????????????????????? Symbol 30???UpArrow???R??>K??>?????????????.\skin_button_nav_next.fla???MovieClips/Button???>?&?>???[^?F?????????????????????????????????????????????????????????????????? Symbol 33??? DownArrow!???R??>v??>???????????????? UpArrow copy?????????>?????????????????????????????????????????????????????????????????? Symbol 31???
ButtonGraphic???<y?> ??>%????????????.\skin_button_nav_next.fla???"Placeholde??CPicPage?? CPicLayer?? CPicFrame??CPicText??
s  &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out fr Graphics/ButtonGraphic ??> ??>%???1a?F?????????????????????????????????????????????????????????????????? Symbol 32???UpArrow ?????>&Y??>?????????????.\skin_button_nav_next.fla??? Placeholder Graphics/_Icons/Nextp??>??>???Y??>?????????????????????????????????????????????????????????????????? Symbol 34??? DownArrow"?????>&???>????????????????(Placeholder Graphics/_Icons/UpArrow copy??????????????Jstop();
??
Actions?????OO????? ??????normal?"???
??????over'[???
??????down@+???
??????disabledh[????????????
Labels????O?O??????CPicPage?? CPicLayer?? CPicFrame??CPicText?? ? ???? &?CA???>?????????????????????????????????????????????????????????????????? Symbol 37???Generic FH Scroll Component%???]O?>g???FGenericFHScroll???flashhelp_components.swf??????7..\..\..\..\..\FlashComrom this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???mooth transition.

?_sans?(down:=?_sans?( Plays when the user clicks or holds the mouse button down.

?_sans?(disabled:??_sans?( Plays when the scrollbar is not needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.??(??????Wy??
Hint?????3??????
CPicSymbol
d??????????>? ?
??????
???????S? ?
d???
???????5? ?
3?3?3?P?????????????Q? ?
??????
??????? ? ?
?????????Pj??
Icon????O?????????????//???
??????`pstop();
???
???????Bstop();
??CPicPage?? CPicLayer?? CPicFrame??
CPicSymbol,
??,
????2??????????E#??,
??,??????down?<???
??????disabled?6?????????n??
Labels????O?O?????? ??????+{stop();
??????????2stop();
??
Actions?????OO????? ??????normal?\???
??????over?P???
??????down?/???
??????disabledh????????? m??
Labels????O?O?????
??CPicPage?? CPicLayer?? CPicFrame??CPicText?? ????? &?CA?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

?_sans?(normal:n?_sans?( Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

?_sans?(over:??_sans?( Plays when the user mouses over this element. Because "normal" is playe ()
{
for (i = 0; i < this.nResizeWidth; i++)
{
this.resizeBar_array[i]._x = this.userBar_mc._x + (i+1);
this.resizeBar_array[i]._height = this.userBar_mc._height;
this.resizeBar_array[i]._y = this.userBar_mc._y;
}
}

GenericScrollClass.prototype.SetResizeBarDepth = function ()
{
var mc_array = new Array();
if (this.userSpace_mc !=undefined)
{
mc_array.push(this.userSpace_mc);
}
if (this.userBar_mc !=undefined)
{
mc_array.push(this.userBar_mc);
}
if (this.userHandle_mc !=undefined)
{
????????)??????????c???????? ???Hint??????O?????
CPicSymbold????????????????R??????? ?! mc_array.push(this.userHandle_mc);
}
if (this.userIcon_mc !=undefined)
{
mc_array.push(this.userIcon_mc);
}
if (this.userTop_mc !=undefined)
{
mc_array.push(this.userTop_mc);
}
if (this.userBottom_mc !=undefined)
{
mc_array.push(this.userBottom_mc);
}
if (this.userUpArrow_mc !=undefined)
{
mc_array.push(this.userUpArrow_mc);
}
if (this.userDownArrow_mc !=undefined)
{
mc_array.push(this.userDownArrow_mc);
}

var nOffset = this.nResizeWidth;
var i = 0;
while (mc_array[i+nOffset] != undefined)
{
mc_array[i].swapDepths(mc_array[i+nOffset]);
i++;
}
var lastIndex = i;
for (i = 0; i < this.nResizeWidth; i++)
{
mc_array[lastIndex + i].swapDepths(this.resizeBar_array[i]);
}
}

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height);
this.origHandleHeight = this.GetHandleHeight();
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.upArrowHeight);

// Set the resizebar depth
if (this.bCurved)
{
this.SetResizeBarDepth();
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse >this.userUpArrow_mc._y && _ymouse < this.userDownArrow_mc._y)
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
}
else if (this.bCurved)
{
for (var i=0; i< miniScroll_array.length;i++)
{
miniScroll_array[i].scrollbar.onBarPress();
}
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

if ((this.GetHandleHeight() > scrollRegion) || (scrollHeight < paneHeight))
{
if (this.bResizeable)
{
this.SetHandleHeight(scrollRegion);
}
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);

this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.upArrowHeight);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;

if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.upArrowHeight);
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (nLeftEdge != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


GenericScrollClass.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

GenericScrollClass.prototype.FindBarRightEdge = function(YPos,XStart)
{
var nResult = -123456;
var bFound = true;
var leftSide = XStart;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (!bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}
else
{
nResult = 1;
}

return nResult;
}

GenericScrollClass.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
}
}


GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = (yPos+this.userTop_mc._height) - this.topOverlap;
this.userBottom_mc._y = (this.userHandle_mc._y + this.userHandle_mc._height) - this.bottomOverlap;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}


GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
if (this.bResizeable || this.origHandleHeight == 0)
{
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height - (this.topOverlap+this.bottomOverlap);
}
else
{
handleHeight = this.origHandleHeight;
}
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true && !this.bOver)
{
this.bOver = true;
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled && !this.MouseOnHandle())
{
this.bOver = false;
this.GotoDefaultHandleState();
}
};

GenericScrollClass.prototype.MouseOnHandle = function()
{
var bResult = false;
if (this.userTop_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userBottom_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userIcon_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
return bResult;
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{

if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true) && this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true) && this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
if (!this.bCurved && !this.bVertical)
{
newXPos -= 5;
}

var deltaX = newXPos - this.userBar_mc._x;
if (this.bCurved)
{
deltaX -= (this.downArrowWidth/2);
}

this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.upArrowHeight + this.downArrowHeight);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
this.userBar_mc._y = 0;
this.userBar_mc._height = Stage.height+5;
}
else
{
this.userBar_mc._y = yPos + this.upArrowHeight;
this.userBar_mc._height = this.actualBar;
this.userBar_mc.Owner = this;
this.userBar_mc.onEnterFrame = this.CorrectSize;
}
this.userSpace_mc._y = this.userBar_mc._y;
this.userSpace_mc._height = this.userBar_mc._height;
this.SetBgColor(this.spaceBgColor);
this.userDownArrow_mc._y = (yPos + SCHeight) - this.downArrowHeight;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;
if (this.userDownArrow_mc._y < (this.userUpArrow_mc._y+this.upArrowHeight))
{
this.userDownArrow_mc._y = (this.userUpArrow_mc._y+this.upArrowHeight);
}

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var nLeftEdge = this.FindBarEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2));
if (nLeftEdge == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
var nRightEdge = this.FindBarRightEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2),nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.upArrowWidth/2)
this.userUpArrow_mc._x = newXPos;
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position DownArrow
nLeftEdge = this.FindBarEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2));
if (nLeftEdge == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
var nRightEdge = this.FindBarRightEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2),nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.downArrowWidth/2)
this.userDownArrow_mc._x = newXPos;
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position Resize Bar
this.PositionResizeBar()
}

// Create the ScrollBorder
this.scrollBorder_mc.clear();
this.scrollBorder_mc.lineStyle(1,0x999999,100);
this.scrollBorder_mc.moveTo(4,0);
this.scrollBorder_mc.lineTo(4,Stage.height)d when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

?_sans?(down:=?_sans?( Plays when the user clicks or holds the mouse button down.

?_sans?(disabled:??_sans?( Plays when the scrollbar is not needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.??(???????/??
Hint?????3??????
CPicSymbol
??&?3????????????h? ?
??????
??????#? ?
??&?3?????
??????H? ?
??M?f2???????????]? ?
??????
???????? ?
??????????`??CPicPage?? CPicLayer?? CPicFrame?????????????X??X0??0??0Xs?t????0???0???????,/??
Layer 1????O???????
Top????O??????????????4???
???????#stop();
???
???????stop();
??? ???????Estop();
??????????stop();
??
Actions?????OO????? ??????normal?(???
??????over????
??????down:T???
??????disabledeY??????????U??
Labels????O?O?????d??CPicPage?? CPicLayer?? CPicFrame??CPicText?? ????? &?CA?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

?_sans?(normal:n?_sans?( Plays ?????????
?????????T??????? ?+d??????
?????????^t??????? ?5d????when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

?_sans?(over:??_sans?( Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

?_sans?(down:=?_sans?( Plays when the user clicks or holds the mouse button down.

?_sans?(disabled:??_sans?( Plays when the scrollbar is not needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.??(???????P??
Hint?????3??????
CPicSymbol
??&?3??? ???????? *? ?
???? ??
?????? ? ?
??&?3??? ??
??????%? ?
??M?f2??? ????????JD? ?
???? ??
??????s? ?
? ????????1=??
Handle????O?????????????*???
??????XVstop();
???
???????:stop();
??? ???????Jstop();
??????????4stop();
??
Actions?????OO????? ??????normal
v???
??????over|???
??????downU???
??????disabled?????????????????????L:??????? ?6d?????? ??????????u??????? ???????;
this.scrollBorder_mc.lineStyle(1,0xD2D2D2,100);
this.scrollBorder_mc.moveTo(3,0);
this.scrollBorder_mc.lineTo(3,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xD5D5D5,100);
this.scrollBorder_mc.moveTo(2,0);
this.scrollBorder_mc.lineTo(2,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xDADADA,100);
this.scrollBorder_mc.moveTo(1,0);
this.scrollBorder_mc.lineTo(1,Stage.height);
this.scrollBorder_mc.lineStyle(1,0x999999,100);
this.scrollBorder_mc.moveTo(0,0);
this.scrollBorder_mc.lineTo(0,Stage.height);
this.scrollBorder_mc.onPress = this.BeginResize;
this.scrollBorder_mc.onRelease = this.EndResize;
this.scrollBorder_mc.onReleaseOutside = this.EndResize;
this.scrollBorder_mc._x = Stage.width - 5;
if (!this.bCurved)
{
this.scrollBorder_mc.onMouseMove = this.MouseOverResize;
}
this.scrollBorder_mc.onRollOut = this.MouseOutResize;

// Create the resize cursor
this.resizeCursor_mc.clear();
this.resizeCursor_mc.lineStyle(1, 0x000000, 100);
this.resizeCursor_mc.beginFill(0x000000, 100);
this.resizeCursor_mc.moveTo(0, resizeCursorHeight / 2);
this.resizeCursor_mc.lineTo(resizeCursorWidth / 3, resizeCursorHeight / 2);
this.resizeCursor_mc.moveTo(resizeCursorWidth / 3, 0);
this.resizeCursor_mc.lineTo(resizeCursorWidth / 3, resizeCursorHeight);
this.resizeCursor_mc.moveTo(resizeCursorWidth * 2 / 3, 0);
this.resizeCursor_mc.lineTo(resizeCursorWidth * 2 / 3, resizeCursorHeight);
this.resizeCursor_mc.moveTo(resizeCursorWidth * 2 / 3, resizeCursorHeight / 2);
this.resizeCursor_mc.lineTo(resizeCursorWidth, resizeCursorHeight / 2);
this.resizeCursor_mc.endfill();

this.spaceBg_mc._x = this.userSpace_mc._x;
this.spaceBg_mc._y = this.userSpace_mc._y;

this.SizeHandle();
}

GenericScrollClass.prototype.SetBgColor = function(newColor)
{
this.spaceBgColor = newColor;
this.spaceBg_mc.clear();
this.spaceBg_mc.moveTo(0,0);
this.spaceBg_mc.lineStyle(1,newColor,100);
this.spaceBg_mc.beginFill(newColor,100);
this.spaceBg_mc.lineTo(0,this.userSpace_mc._height);
this.spaceBg_mc.lineTo(this.userSpace_mc._width,this.userSpace_mc._height);
this.spaceBg_mc.lineTo(this.userSpace_mc._width,0);
this.spaceBg_mc.lineTo(0,0);
this.spaceBg_mc.endFill();
};

GenericScrollClass.prototype.CorrectSize = function()
{
this.onEnterFrame = undefined;
this.Owner.userBar_mc._height = this.Owner.actualBar;
};

function RepositionOnFail()
{
var YPos = this._y + (this._height/2);
var nLeftEdge = this.Owner.FindBarEdge(YPos);
if (nLeftEdge != -123456)
{
var nRightEdge = this.Owner.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.origWidth/2)
this._x = newXPos;
}
}

///////////////////////////////////////////////////////////////////////////
//
// Nav Pane resizing
//
///////////////////////////////////////////////////////////////////////////
GenericScrollClass.prototype.BeginResize = function()
{
if (this.Owner.bResizeVisible)
{
this.Owner.scrollBorder_mc._visible = true;
this.Owner.resizeCursor_mc._visible = false;
} else if (this.Owner.bShowResizeCursor)
{
this.Owner.resizeCursor_mc._visible = true;
}
_parent.BeginResize(_xmouse,_ymouse);
this.Owner.Drag();
this.Owner.resizeListener.onMouseMove = this.Owner.Drag;
this.Owner.bResizing = true;
if (this.Owner.bHideCursorOnResize)
{
Mouse.hide();
}
Mouse.addListener(this.Owner.resizeListener);
}

GenericScrollClass.prototype.EndResize = function()
{
Mouse.show();
this.Owner.resizeCursor_mc._visible = false;
Mouse.removeListener(this.Owner.resizeListener);
this.Owner.bResizing = false;
if (fhgeneric_comp.bResizeVisible)
{
fhgeneric_comp.scrollBorder_mc._x = _xmouse;
}
_parent.EndResize(_xmouse,_ymouse);
}

GenericScrollClass.prototype.MouseOverResize = function()
{
// Only do something if we are not resizing
if (!this.Owner.bResizing && !this.Owner.bVertical && !this.Owner.bHandleDrag && this.Owner.bShowResizeCursor)
{
// See if we are moving over a resize area
var bHit = false;
if (this.Owner.scrollBorder_mc.hitTest(_xmouse, _ymouse, true) && !this.Owner.bCurved) {
bHit = true;
} else {
if (!this.Owner.userBar_mc.hitTest(_xmouse, _ymouse, true) && DisplayResizeCursor())
{
for (var i = 0; i < this.Owner.nResizeWidth; i++)
{
if (this.Owner.resizeBar_array[i].hitTest(_xmouse, _ymouse, true)) {
bHit = true;
}
}
}
}

// Show (or don't) the resize cursor
if (bHit) {
if (this.Owner.bHideCursorOnResize)
{
Mouse.hide();
}
this.Owner.resizeCursor_mc._x = _xmouse - resizeCursorWidth / 2;
this.Owner.resizeCursor_mc._y = _ymouse - resizeCursorHeight / 2;
this.Owner.resizeCursor_mc._visible = true;
clearInterval(this.Owner.resizeInterval);
this.Owner.resizeInterval = setInterval(this.Owner.ResizeTimeout,RESIZEBAR_TIMEOUT,this.Owner);
} else {
Mouse.show();
this.Owner.resizeCursor_mc._visible = false;
}
}
}

GenericScrollClass.prototype.ResizeTimeout = function(Owner)
{
clearInterval(Owner.resizeInterval);
if (!Owner.bResizing)
{
Owner.resizeCursor_mc._visible = false;
Mouse.show();
}
}

GenericScrollClass.prototype.MouseOutResize = function()
{
this.Owner.resizeCursor_mc._visible = false;
Mouse.show();
}

GenericScrollClass.prototype.Drag = function()
{
if (fhgeneric_comp.bResizeVisible)
{
fhgeneric_comp.scrollBorder_mc._x = _xmouse;
}
else
{
fhgeneric_comp.resizeCursor_mc._x = _xmouse - resizeCursorWidth / 2;
fhgeneric_comp.resizeCursor_mc._y = _ymouse - resizeCursorHeight / 2;
}
_parent.Drag(_xmouse,_ymouse);
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
if (_ymouse >= fhgeneric_comp.ScrollYPos && _ymouse <= (fhgeneric_comp.ScrollYPos + fhgeneric_comp.ScrollHeight))
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}
else
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
if (_ymouse>=miniScroll_array[i].ScrollYPos && _ymouse <= miniScroll_array[i].ScrollYPos+miniScroll_array[i].ScrollHeight)
{
miniScroll_array[i].scrollbar.onMouseWheel(wheelDelta);
}
}
}
}

function DisplayResizeCursor()
{
var bResult = true;

if ((fhgeneric_comp.userHandle_mc.hitTest(_xmouse, _ymouse, true) ||
fhgeneric_comp.userUpArrow_mc.hitTest(_xmouse, _ymouse, true) ||
fhgeneric_comp.userDownArrow_mc.hitTest(_xmouse, _ymouse, true)) &&
fhgeneric_comp.enabled)
{
bResult = false;
}
for (var i =0; i < miniScroll_array.length; i++)
{
if ((miniScroll_array[i].scrollbar.userHandle_mc.hitTest(_xmouse, _ymouse, true) ||
miniScroll_array[i].scrollbar.userUpArrow_mc.hitTest(_xmouse, _ymouse, true) ||
miniScroll_array[i].scrollbar.userDownArrow_mc.hitTest(_xmouse, _ymouse, true)) &&
miniScroll_array[i].scrollbar.enabled)
{
bResult = false;
}
}
return bResult;
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);

#endinitclip??
Main Scroll Actions????O?????????????eL??#initclip

var debug_trace = _parent.debug_trace;
var currentItem = undefined;

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.actualBar;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.upArrowHeight);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

// Check for .00001 instead of 0 because flash loses significant digits on some obscure browsers
if (realBarHeight <= .00001 || fhgeneric_comp.realPosition < 0 || !fhgeneric_comp.enabled)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

#endinitclip??
Scrollbar to Owner????O????? ?????????U???????? ??? Button BG????O?O??? ???l(????z???????&???????????L??????? ???l(????z???????&?? ??????????H??????? ???l(????z????&???????????6???????? ???Symbol?????3????????????????x???stop();??????
?????????1E???stop();??????
?????????J???stop();?????? ??????????D???stop();???????????????? ???stop();????? ???Actions?????OO???????????????2??????????????????normal?,?????????
?????????over??????????
?????????down?e????????? ?????????disabled'???????? ???Labels????O?????them.

?_sans?(thumbResizable:i?_sans?( If true, the thumb (handle_mc) will stretch at runtime based on the height of the scrollable contents.

?_sans?(scrollbarCurved:??_sans?( If true, the thumb will center itself on bar_mc at run time. This is to allow ???V ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears. This is the normal, visible state of the scrollbar's Bar.

disabled: Plays when the scrollbar is not needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.?????????????????????r???????? ???Hint?????3??????
CPicSymbol???????
???????????e??????? ?????
???????????9.??????? ??????
???????????&t??????? ????????
?? ??????????m??????? ?????
???????????????????? ???Bar Placeholder????O?O???????????????n????????? ?????????^???stop();???????????????????stop();????? ???Actions?????OO??????????????mE??????????????????normal~????????? ?????????disabled????????? ???Lables????O??????????? )??CPicPage?? CPicLayer?? CPicFrame??fff?pmn????? ??????pmn?????.??
????A?
?Symbol 11????
????GSSymbol 13??????????????Symbol 14 ????-1fSymbol 15????????s?eSymbol 6????????????|?Symbol 7????N?Symbol 8?????????????7Symbol 10 ????0 *

 !"#$%&'()????????,-./????1234????6789:;<=?????@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs????uvwxyz{????}~?Symbol 18??????
Symbol 17?????????????=Symbol 16?????????!YSymbol 19????????????y[Symbol 31????????5 Symbol 32????????????0.Symbol 34????????????+.Symbol 35 ????[SSymbol 27????????????7??Symbol 28??????Symbol 29????????????Z=?Symbol 33?????:????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Symbol 36????!???????Symbol 37????"???????S 38 1183407290 ????????????u??????????????CPicPage?? CPicLayer?? CPicFrame?? CPicShape??????????q???0l??0l????????????`???????? ???Layer??CPicPage?? CPicLayer?? CPicFrame??
CPicSymbolx

??x?????? ???o??
Labels????O?O??? 1????O???????CPicPage?? CPicLayer?? CPicFrame??????? ?0 ?0???????????h???????? ???Layer 1????O??????C??CPicPage?? CPicLayer?? CPicFrame??CPicText??
? ???? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???????????(??????????2???????? ???Hint?????3??????
CPicSymbold???????????????,!??????? ??????????
?????????FC??????? ?d??????
?????????6z??????? ?3?3?3?P??????????????????3??????? ??????????
????????????????? ?????????????????J???????? ???Icon????O????????????????? ?????????
??????????W???stop();
??????
??????????x???stop();
?????? ??????????7???stop();
????????????????q???stop();
????? ???Actions?????OO????? ?????????normal??????????
?????????overqx?????????
?????????down?L?????????
?????????disabled?d???????????????????I???????? ???Labels????O?O???????????x??????H??3?
?H??f??H????(?H????2?`????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????CPicPage?? CPicLayer?? CPicFrame???????????? ?????#initclip
var miniScroll_array = new Array();

function CreateNewChildScroll(pfnCallback)
{
this.ScrollYPos = 0;
this.ScrollHeight = 0;
var newChild = new MiniScroll(pfnCallback);
newChild.SetScrollbarPosition(200,100);
miniScroll_array.push(newChild);
return newChild;
}

function MiniScroll(pfnCallback)
{
this.scrollbar = new ChildScroll(pfnCallback);
this.scrollID = this.scrollbar.scrollID;
}

MiniScroll.prototype.SetScrollRange = function(minScroll,maxScroll)
{
this.scrollbar.minScroll = minScroll;
this.scrollbar.maxScroll = maxScroll;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetItemHeight = function(newHeight)
{
this.scrollbar.itemHeight = newHeight;
this.scrollbar.SizeHandle();
}

MiniScroll.prototype.SetScrollbarPosition = function(yPos, SCHeight)
{
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;
this.scrollbar.PositionScrollBar(yPos, SCHeight);
}

MiniScroll.prototype.SetHandlePosition = function(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
this.scrollbar.MoveHandleToPosition(newPosition);
this.scrollbar.realPosition = newPosition;
}

MiniScroll.prototype.Show = function(bVisible)
{
this.scrollbar.Show(bVisible);
}

#endiponents\flashhelp_components.fla???Generic FH Scroll Component?8M?]O?>g????8M??????????thumbResizeable???true??? bResizeable??}?oSL????|????????scrollbarCurved???false???bCurved6L@?d?E?FA7nM????????????????????????????????????????????????thumbResizeable???true??? bResizeable??}?oSL????|????????scrollbarCurved???false???bCurved6L@?d?E?FA7nM?????????????????????????S 38 1183407290???Next&?????>&??>????????????.\skin_button_nav_next.fla??? Placeholder Graphics/_Icons/Next?B?F??>????B?F?????????????????????????????????????????????????????????????????'?p??hhhh???????? ????Vector::Template???0???legacyLineSpacing???0???PropSheet::ActiveTab???1599|???%PublishFormatProperties::htmlFileName???skin_scrollbar.html???"PublishHtmlProperties::StartPaused???0???!PublishGifProperties::PaletteName?????? PublishRNWKProperties::speed256K???0???PublishProfileProperties::name???Flash CS3 Settings???PublishFormatProperties::jpeg???0???Vector::Debugging Permitted???0???PublishHtmlProperties::Loop???1???"PublishQTProperties::MatchMovieDim???1??? PublishQTProperties::AlphaOption?????? PublishQTProperties::LayerOption??????PublishHtmlProperties::Units???0???$PublishPNGProperties::OptimizeColors???1???PublishQTProperties::Width???100???&PublishRNWKProperties::singleRateAudio???0???&PublishRNWKProperties::speedSingleISDN???0???%PublishFormatProperties::projectorMac???0???&PublishFormatProperties::flashFileName???skin_scrollbar.swf???Vector::Compress Movie???1???PublishGifProperties::Smooth???1???#PublishRNWKProperties::flashBitRate???1200???%PublishRNWKProperties::mediaCopyright???(c) 2000???PublishFormatProperties::html???0???$PublishFormatProperties::pngFileName???skin_scrollbar.png???(PublishHtmlProperties::VerticalAlignment???1???PublishHtmlProperties::Quality???4???"PublishGifProperties::DitherOption??????"PublishRNWKProperties::exportAudio???1??? PublishRNWKProperties::speed384K???0???!PublishRNWKProperties::exportSMIL???1???Vector::Override Sounds???0???!PublishHtmlProperties::DeviceFont???0???"PublishPNGProperties::FilterOption??????'PublishRNWKProperties::mediaDescription??????PublishFormatProperties::gif???0???*PublishFormatProperties::generatorFileName???skin_scrollbar.swt???Vector::Protect???0???Vector::Quality???80???*PublishHtmlProperties::HorizontalAlignment???1???"PublishHtmlProperties::DisplayMenu???1???PublishGifProperties::Interlace???0???"PublishGifProperties::DitherSolids???0???PublishPNGProperties::Smooth???1???PublishPNGProperties::BitDepth???24-bit with Alpha???PublishJpegProperties::DPI???4718592???PublishQTProperties::Flatten???1???#PublishFormatProperties::qtFileName???skin_scrollbar.mov???PublishGifProperties::Width???100???PublishGifProperties::Loop???1???PublishRNWKProperties::speed28K???1???!PublishRNWKProperties::mediaTitle??????$PublishRNWKProperties::mediaKeywords??????PublishFormatProperties::flash???1???#PublishGifProperties::MatchMovieDim???1???#PublishGifProperties::PaletteOption??????"PublishPNGProperties::DitherOption??????PublishJpegProperties::Quality???80???$PublishRNWKProperties::realVideoRate???100000???$PublishRNWKProperties::speedDualISDN???0???-PublishFormatProperties::projectorWinFileName???skin_scrollbar.exe???PublishHtmlProperties::Align???0???#PublishPNGProperties::MatchMovieDim???1???#PublishPNGProperties::PaletteOption??????$PublishJpegProperties::MatchMovieDim???1???%PublishFormatProperties::jpegFileName???skin_scrollbar.jpg???Vector::Omit Trace Actions???0???Vector::Debugging Password??????PublishHtmlProperties::Width???100???PublishHtmlProperties::Height???300???"PublishPNGProperties::DitherSolids???0???"PublishJpegProperties::Progressive???0???#PublishQTProperties::PlayEveryFrame???0???Vector::AS3AutoDeclare???0???PublishFormatProperties::png???0???PublishFormatProperties::rnwk???0???-PublishFormatProperties::projectorMacFileName???skin_scrollbar.hqx???Vector::TopDown???0???!PublishHtmlProperties::WindowMode???0???'PublishHtmlProperties::TemplateFileName???eC:\Documents and Settings\edigre\Application Data\Macromedia\Flash MX\Configuration\Html\Default.html???PublishGifProperties::Height???300???PublishPNGProperties::Interlace???0???PublishJpegProperties::Size???0???"PublishFormatProperties::generator???0???Vector::Report???0???PublishGifProperties::LoopCount??????'PublishGifProperties::TransparentOption??????PublishGifProperties::MaxColors???255???%PublishPNGProperties::RemoveGradients???0???PublishQTProperties::Height???300???PublishRNWKProperties::speed56K???1???Vector::AS3Strict???0???PublishFormatProperties::qt???0???Vector::Stream Compress???7???Vector::Event Format???0???Vector::Version???6???$PublishGifProperties::OptimizeColors???1???"PublishRNWKProperties::audioFormat???0???Vector::ActionScriptVersion???1???Vector::Event Compress???7???PublishHtmlProperties::Scale???0???%PublishGifProperties::RemoveGradients???0???PublishPNGProperties::Width???100???PublishPNGProperties::Height???300???PublishJpegProperties::Height???300??? PublishRNWKProperties::speed512K???0???$PublishFormatProperties::gifFileName???skin_scrollbar.gif???Vector::Stream Format???0???PublishGifProperties::Animated???0???&PublishGifProperties::TransparentAlpha???128???!PublishPNGProperties::Transparent???0???!PublishPNGProperties::PaletteName??????PublishJpegProperties::Width???100???*PublishQTProperties::UseQTSoundCompression???0???PublishQTProperties::Looping???0???"PublishRNWKProperties::exportFlash???1???&PublishRNWKProperties::showBitrateDlog???1???(PublishRNWKProperties::speedCorporateLAN???0???"PublishRNWKProperties::mediaAuthor??????%PublishFormatProperties::defaultNames???1???%PublishFormatProperties::projectorWin???0???%PublishFormatProperties::rnwkFileName???skin_scrollbar.smil???PublishPNGProperties::MaxColors???255???%PublishQTProperties::ControllerOption???0???"PublishQTProperties::PausedAtStart???0????????????? CColorDef??????3?P??f?P?0???P?H???P?`???P?x?3???33?(??3f?<?0?3??C?H?3??F?`?3??H?x?f??0?f3??0?ff?(?0?f??5?H?f??<?`?f??@?x???333?0???3????33?x??f3?d?0??3?]?H??3?Z?`??3?X?x?33????333?0?3f3?PPH?3?3?Px`?3?3?P?x?3?3?P???f3???0?f33?PH?ff3?(PH?f?3?<x`?f?3?C?x?f?3?F?????fff?`???f???0?3f???0?ff?x?0??f?k?H??f?d?`??f?`?x?3f???0?33f??PH?3ff?xPH?3?f?dx`?3?f?]?x?3?f?Z???ff???0?f3f??PH?fff?`?f?f?P0x?f?f?Px??f?f?P?????????????????H?3????H?f????H????x?H???n?`????h?x?3????H?33???x`?3f???x`?3???xx`?3??k?x?3???d???f????H?f3???x`?ff???0x?f???x0x?f??dx??f???]?????????????????`?3????`?f????`??????`????x?`????p?x?3????`?33????x?3f????x?3?????x?3???x?x?3???n???f????`?f3????x?ff???x??f????x??f???xx??f???k?????????????????x?3????x?f????x??????x??????x????x?x?3????x?33??????3f??????3???????3???????3???x???f????x?f3??????ff??????f???????f???????f???x????????x??????H??3?
?H??f??H????(?H????2?`????8?x????`??3?
?`??f??`????`????(?`????0?x????x??3??x??f??x?????x???? ?x????(?x?????P?x????3???H??33?x`??f3?x`???3?(x`???3?5?x???3?<????3???`??33??x??f3?
?x??3??x???3?(?x???3?2????3???x??33?????f3?
?????3??????3??????3?(?????????x????f???H??3f??x`??ff?0x???f?(0x???f?<x????f?C????f???`??3f???x??ff?x???f?x????f?(x????f?5????f???x??3f??????ff??????f?
?????f??????f?(????????(?x????????H??3???x`??f???0x??????????PP??????P????????`??3????x??f???x?????P?????(P??????<????????x??3???????f???????????????????????(????????x?x????????`??3????x??f???x???????P??????xP??????d????????`??3????x??f???x??????P????????????P????????x??3???????f?????????????????????????(??????????x????????x??3???????f??????????????????????????x????????x??3???????f?????????????????????????x????????x??3???????f?????????????????????????????????????????????????????????????????x??f??`????z??????f??????????????*???]????????????????pmn??????pmn???c?????Placeholder Graphics<y?>?????????????????????????_Icons<y?>??>&?????????????????????????
MovieClipsR??>?????????????????????????"PublishQTProperties::QTSndSettings??CQTAudioSettings???????????????????????????????????? ?BSaved by Adobe Flash Windows 9.0 build 494 timecount = 1183408764s???PublishFonitclip????? ???Child Scroll Commands?????OO???????????????|????]
// Include the ActionScript files that know how to communicate with the
// Nav Host.
#initclip

function SetScrollRange(minScroll,maxScroll)
{
fhgeneric_comp.minScroll = minScroll;
fhgeneric_comp.maxScroll = maxScroll;
fhgeneric_comp.SizeHandle();
}

function SetItemHeight(newHeight)
{
fhgeneric_comp.itemHeight = newHeight;
fhgeneric_comp.SizeHandle();
}

function SetScrollbarPosition(yPos, SCHeight)
{
fhgeneric_comp.PositionScrollBar(yPos, SCHeight);
}

function SetSpaceColor(newColor)
{
fhgeneric_comp.SetBgColor(newColor);
}

function ShowResizeCursor(bShow)
{
fhgeneric_comp.bShowResizeCursor = bShow;
}

function SetResizeVisible(bVisible)
{
if (!fhgeneric_comp.bVertical)
{
fhgeneric_comp.bResizeVisible = bVisible;
}
}

function DoHideCursorOnResize(bHideCursorOnResize)
{
fhgeneric_comp.bHideCursorOnResize = bHideCursorOnResize;
}

function SetHandlePosition(newPosition)
{
currentItem = _parent.curScrollItem.pfnScroll;
fhgeneric_comp.MoveHandleToPosition(newPosition);
fhgeneric_comp.realPosition = newPosition;
}

function GetScrollEdgeAtPos(yPos)
{
nResult = Stage.width;
if (fhgeneric_comp.bCurved)
{
nResult = fhgeneric_comp.FindBarEdge(yPos);
}
else
{
if (yPos>fhgeneric_comp.ScrollYPos && yPos < fhgeneric_comp.ScrollYPos+fhgeneric_comp.ScrollHeight)
{
nResult = Stage.width - (fhgeneric_comp.userBar_mc._width);
}
else
{
for (i=0; i< miniScroll_array.length;i++)
{
if (yPos>miniScroll_array[i].ScrollYPos && yPos < miniScroll_array[i].ScrollYPos+miniScroll_array[i].ScrollHeight)
{
nResult = Stage.width - (miniScroll_array[i].scrollbar.userBar_mc._width);
}
}
}
if (!fhgeneric_comp.bVertical)
{
nResult -=5;
}
}
return nResult;
}

function GetScrollbarWidth()
{
var nWidth = 0;
if (!fhgeneric_comp.bCurved)
{
nWidth = fhgeneric_comp.userBar_mc._width;
}
else
{
nWidth = fhgeneric_comp.userBar_mc._width + (fhgeneric_comp.downArrowWidth/2);
}
return nWidth;
}

function HideAllMiniScroll()
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
miniScroll_array[i].Show(false);
}
}

function ShowMainScroll()
{
fhgeneric_comp.userTop_mc._visible = true;
fhgeneric_comp.userBottom_mc._visible = true;
fhgeneric_comp.userIcon_mc._visible = true;
fhgeneric_comp.userBar_mc._visible = true;
fhgeneric_comp.userSpace_mc._visible = true;
fhgeneric_comp.userUpArrow_mc._visible = true;
fhgeneric_comp.userDownArrow_mc._visible = true;
fhgeneric_comp.userHandle_mc._visible = true;
fhgeneric_comp.userTop_mc._visible = true;
fhgeneric_comp.userBottom_mc._visible = true;
fhgeneric_comp.userIcon_mc._visible = true;
}

#endinitclip????? ???Scrollbar commands?????OO???????????????????^#initclip

function ChildScroll(pfnCallback)
{
this.bVertical = fhgeneric_comp.bVertical;
this.pfnCallback = pfnCallback;
this.bCurved = fhgeneric_comp.bCurved
this.bResizeable = fhgeneric_comp.bResizeable;
if (this.bCurved)
{
this.bResizeable = false;
}

if (!this.bCurved)
{
this.userBar_mc = bar_mc.duplicateMovieClip("bar"+levelCount,levelCount++);
this.userBar_mc.tabEnabled = false;
this.userBar_mc.Owner = this;
}
else
{
this.userBar_mc = bar_mc;
}
if (this.bVertical)
{
this.scrollBorder_mc._visible = false;
this.bResizeVisible = false;
}

this.scrollID = levelCount;

this.userUpArrow_mc = uparrow_mc.duplicateMovieClip("uparrow"+levelCount,levelCount++);
this.userDownArrow_mc = downarrow_mc.duplicateMovieClip("downarrow"+levelCount,levelCount++);
this.userHandle_mc = handle_mc.duplicateMovieClip("handle"+levelCount,levelCount++);
this.userTop_mc = top_mc.duplicateMovieClip("top"+levelCount,levelCount++);
this.userBottom_mc = bottom_mc.duplicateMovieClip("bottom"+levelCount,levelCount++);
this.userIcon_mc = icon_mc.duplicateMovieClip("icon"+levelCount,levelCount++);

this.userUpArrow_mc.tabEnabled=false;
this.userDownArrow_mc.tabEnabled=false;
this.userHandle_mc.tabEnabled=false;
this.userTop_mc.tabEnabled=false;
this.userBottom_mc.tabEnabled=false;
this.userIcon_mc.tabEnabled=false;


this.enabled = true;
this.bPlayDisabled = true;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling
this.handleHeight = this.userHandle_mc._height;
this.origHandleHeight = 0;
this.origHandleWidth = this.userHandle_mc._width;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;
this.topOverlap = fhgeneric_comp.topOverlap;
this.bottomOverlap = fhgeneric_comp.bottomOverlap;
this.upArrowWidth = this.userUpArrow_mc._width;
this.downArrowWidth = this.userDownArrow_mc._width;
this.userUpArrow_mc.origWidth = this.userUpArrow_mc._width;
this.userDownArrow_mc.origWidth = this.userDownArrow_mc._width;

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 10;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 500;
this.realPosition = 0;
this.bResize = false; // This variable prevents us from changing data due to calculations
// that cause the loss of significant digits
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

this.bOver = false;

// Initialize Object
this.Init();
}

ChildScroll.prototype = new MovieClip();

ChildScroll.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height)
this.origHandleHeight = this.GetHandleHeight();
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.upArrowHeight);

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}

// Create movie event handlers
this.userHandle_mc.Owner = this;
this.userIcon_mc.Owner = this;
this.userTop_mc.Owner = this;
this.userBottom_mc.Owner = this;
this.userBar_mc.Owner = this;
this.userUpArrow_mc.Owner = this;
this.userDownArrow_mc.Owner = this;
this.userSpace_mc.Owner = this;

this.userHandle_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userHandle_mc.onPress = function()
{
this.Owner.onHandlePress();
};
if (!this.bCurved)
{
this.userBar_mc.onPress = function()
{
this.Owner.onBarPress();
}
}
this.userHandle_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userTop_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userTop_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userTop_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userBottom_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userBottom_mc.onPress = function()
{
this.Owner.onHandlePress();
};

this.userBottom_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};

this.userIcon_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onHandleRollOver();
};

this.userIcon_mc.onPr??CPicPage?? CPicLayer?? CPicFrame??CPicText??
????? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???????????(??????????6???????? ???Hint?????3??????
CPicSymbold???? ??????????? ??????? ???????? ??
?????????r??????? ?d???? ??
????????????????? ?d???? ??????????????????? ???????? ??
???????????????? ????? ????????????w???????? ???Handle????O????????????????A
?????????
????????????stop();
??????
?????????????stop();
?????? ?????????+???stop();
???????????????u???stop();
????? ???Actions?????OO????? ?????????normal3?????????
?????????overe7?????????
?????????downy?????????
?????????disabled(k??????????????????aD???????? ???Labels????O?O????38????? k\??s???)???????
=???? ?
0????.???0 ?
????????? !???????? ???Handle?????OO???????K????2?2??CPicPage?? CPicLayer?? CPicFrame??fff?pmn????????????pmn???????????????02??????J???????0?B?0L??
?
?
?
?
?
?
?
?
?
???L?L???L???
?
?L?L?
?L,?R?P?N?L?R?O?L??T?T?S?R?T?T?RT?L?N?P?O?L?O,?O?R?R?R?O?R?R?S?T?T?R?T?T ??????????????????????????????????????????????????????????????????????L????L????????L
L
L




L

RSTTRTT,????L????N????PR????L????OR,TT S RTT R R P
N
L R
L? R
L
L
L
L
L
L
L
L
L
L????????????????????????????????????,???????????????????????????????????????????????????????



?
?


?
?O?O?T?T?O?T
T
T
L
L
T
L
L
L
L
L
Lw
L
L
L
L
L
L
L??T?T
T
T?T
T?????????~5???????? ???Top?????OO?????
FG??CPicPage?? CPicLayer?? CPicFrame????CPicPage?? CPicLayer?? CPicFrame?? CPicShape??????????q??????????4_???????? ???BG????O???????????fff????0 ??  0a<f?V"???D? I?l? ??0?4???<???????????0?3 I|?0?????????????N???????? ???FG?????OO???b#??CPicPage?? CPicLayer?? CPicFrame?? ?????b??0~??0?1j~??0?1P~??0?????????????,PP?P?PP?P5P???/???????????????????????????????;???????????????????????????????=??????????????????????????!???????????????????? ???Layer 1????O?????();
???ess = function()
{
this.Owner.onHandlePress();
};

this.userIcon_mc.onRollOut = function()
{
this.Owner.onHandleRollOut();
};


this.userUpArrow_mc.onPress = function()
{
this.Owner.onUpArrowPress();
};

this.userUpArrow_mc.onRelease = function()
{
this.Owner.onUpArrowRelease();
};

this.userUpArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onUpArrowRollOver();
};

this.userUpArrow_mc.onRollOut = function()
{
this.Owner.onUpArrowRollOut();
};

this.userUpArrow_mc.onDragOut = function()
{
this.Owner.onUpArrowDragOut();
};

this.userDownArrow_mc.onPress = function()
{
this.Owner.onDownArrowPress();
};

this.userDownArrow_mc.onRelease = function()
{
this.Owner.onDownArrowRelease();
};

this.userDownArrow_mc.onRollOver = function()
{
this.useHandCursor = false;
this.Owner.onDownArrowRollOver();
};

this.userDownArrow_mc.onRollOut = function()
{
this.Owner.onDownArrowRollOut();
};

this.userDownArrow_mc.onDragOut = function()
{
this.Owner.onDownArrowDragOut();
};
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
ChildScroll.prototype.onBarPress = function()
{
_parent.debug_alert("onBarPress");
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
};

ChildScroll.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

ChildScroll.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
ChildScroll.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

if ((this.GetHandleHeight() > scrollRegion) || (scrollHeight < paneHeight))
{
if (this.bResizeable)
{
this.SetHandleHeight(scrollRegion);
}
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
ChildScroll.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

testPos = (truePosition)/(this.maxScroll - this.ScrollHeight);

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);
this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.upArrowHeight);

if (this.MakeHandleInBar())
{
this.PositionChanged();
}
};

ChildScroll.prototype.MakeHandleInBar = function()
{
var bMoved = false;

if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.upArrowHeight);
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (nLeftEdge != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


ChildScroll.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

ChildScroll.prototype.FindBarRightEdge = function(YPos,XStart)
{
var nResult = -123456;
var bFound = true;
var leftSide = XStart;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (!bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}
else
{
nResult = 1;
}

return nResult;
}

ChildScroll.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
}
}


ChildScroll.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
this.PositionChanged();
};

ChildScroll.prototype.onBarPress = function()
{
if (_ymouse >this.userUpArrow_mc._y && _ymouse < this.userDownArrow_mc._y)
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
}
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


ChildScroll.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = (yPos+this.userTop_mc._height) - this.topOverlap;
this.userBottom_mc._y = (this.userHandle_mc._y + this.userHandle_mc._height) - this.bottomOverlap;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

ChildScroll.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}

ChildScroll.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

ChildScroll.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (thi???? 
  
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~?s.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

ChildScroll.prototype.GetHandleHeight = function ()
{
var handleHeight;
if (this.bResizeable || this.origHandleHeight == 0)
{
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height - (this.topOverlap+this.bottomOverlap);
}
else
{
handleHeight = this.origHandleHeight;
}
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

ChildScroll.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



ChildScroll.prototype.onHandleRollOver = function()
{
if (this.enabled == true && !this.bOver)
{
this.bOver = true;
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

ChildScroll.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
this.PositionChanged();
}
};

ChildScroll.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};

ChildScroll.prototype.onHandleRollOut = function()
{
if (this.enabled && !this.MouseOnHandle())
{
this.bOver = false;
this.GotoDefaultHandleState();
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onUpArrowRelease = function()
{
if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true) && this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

ChildScroll.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

ChildScroll.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

ChildScroll.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true) && this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

ChildScroll.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

ChildScroll.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

ChildScroll.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

ChildScroll.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};

ChildScroll.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
if (!this.bCurved && !this.bVertical)
{
newXPos -=5;
}

var deltaX = newXPos - this.userBar_mc._x;
if (this.bCurved)
{
deltaX -= (this.downArrowWidth/2);
}

this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.upArrowHeight + this.downArrowHeight);
this.userUpArrow_mc._y = yPos;
if (!this.bCurved)
{
this.userBar_mc._x += deltaX;
this.userBar_mc._y = yPos + this.upArrowHeight;
this.userBar_mc._height = this.actualBar;
}

this.userDownArrow_mc._y = (yPos + SCHeight) - this.downArrowHeight;

if (this.userDownArrow_mc._y < (this.userUpArrow_mc._y+this.upArrowHeight))
{
this.userDownArrow_mc._y = (this.userUpArrow_mc._y+this.upArrowHeight);
}

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var nLeftEdge = this.FindBarEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2));
if (nLeftEdge == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
var nRightEdge = this.FindBarRightEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2),nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.upArrowWidth/2)
this.userUpArrow_mc._x = newXPos;
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position DownArrow
nLeftEdge = this.FindBarEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2));
if (nLeftEdge == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
var nRightEdge = this.FindBarRightEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2),nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.downArrowWidth/2)
this.userDownArrow_mc._x = newXPos;
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
}

this.SizeHandle();
}

ChildScroll.prototype.Show = function(bVisible)
{
if (!this.bCurved)
{
this.userBar_mc._visible = bVisible;
}
this.userUpArrow_mc._visible = bVisible;
this.userDownArrow_mc._visible = bVisible;
this.userHandle_mc._visible = bVisible;
this.userTop_mc._visible = bVisible;
this.userBottom_mc._visible = bVisible;
this.userIcon_mc._visible = bVisible;
}

ChildScroll.prototype.PositionChanged = function()
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = this.GetHandleYPos() - (this.userUpArrow_mc._y + this.upArrowHeight);

// Save the current posiiton for when the scrollbar is resized
this.realPosition = ((realPos / realBarHeight)*(this.maxScroll - this.ScrollHeight));

if (realBarHeight <= 0 || this.realPosition < 0)
{
this.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
this.pfnCallback(this.realPosition);
}
}

#endinitclip????? ???Child Scroll Actions????O????????????????X2????o?
#initclip

var RESIZEBAR_TIMEOUT = 2000; // 2 Seconds
var VERTICAL_SKIN = "vertical tripane"
var minMiddleHeight =20;
var wheelDeltaBase = 120;
var levelCount = 1;
var resizeCursorWidth = 9;
var resizeCursorHeight = 22;

function GenericScrollClass()
{
_global.NavHost.gVerticalSkin
this.bVertical = false;
if (_global.NavHost.gVerticalSkin == VERTICAL_SKIN)
{
this.bVertical = true;
}
this.bShowResizeCursor = true;
this.bHideCursorOnResize = true;
this.bResizeVisible = false;
this.resizeListener = new Object;
this.nResizeWidth = 4;
this.scrollBorder_mc = createEmptyMovieClip("ScrollBorder",levelCount++)
this.scrollBorder_mc.Owner = this;
this.scrollBorder_mc.useHandCursor = false;
this.resizeCursor_mc = createEmptyMovieClip("ResizeCursor",200)
this.resizeCursor_mc.Owner = this;
this.resizeCursor_mc.useHandCursor = false;
this.resizeCursor_mc._visible = false;
this.resizeInterval = undefined;
this.bResizing = false;

if (this.bCurved)
{
this.userSpace_mc = this._parent.space_mc;
this.spaceBg_mc = createEmptyMovieClip("SpaceColor",-16384);
this.spaceBg_mc._x = this.userSpace_mc._x;
this.spaceBg_mc._y = this.userSpace_mc._y;
this.spaceBg_mc.setMask(this.userSpace_mc);
this.spaceBg_mc.onPress = function() {};
this.spaceBg_mc.useHandCursor = false;
this.spaceBgColor = 0xffffff;
this.CreateResizeBar();
this.bResizeable = false;
this.scrollBorder_mc._visible = false;
}
else
{
this._parent.space_mc._visible = false;
}
if (this.bVertical)
{
this.scrollBorder_mc._visible = false;
this.bResizeVisible = false;
}

this.enabled = true;
this.bPlayDisabled = true;
this.userBar_mc = this._parent.bar_mc;
this.userUpArrow_mc = this._parent.uparrow_mc;
this.userDownArrow_mc = this._parent.downarrow_mc;

// Used to get the scroll position
this.actualBar = Stage.height;

// Handle Variables
this.dragYPos = 0;
this.bHandleDrag = false;
this.userHandle_mc = this._parent.handle_mc;
this.mouseListener = new Object();
this.mouseListener.Owner = this;
this.mouseInterval = undefined;

// Handle objects for resizeable scrollbar
this.userTop_mc = this._parent.top_mc;
this.userBottom_mc = this._parent.bottom_mc;
this.userIcon_mc = this._parent.icon_mc;
this.userBar_mc.tabEnabled=false;
this.userSpace_mc.tabEnabled=false;
this.userUpArrow_mc.tabEnabled=false;
this.userDownArrow_mc.tabEnabled=false;
this.userHandle_mc.tabEnabled=false;
this.userTop_mc.tabEnabled=false;
this.userBottom_mc.tabEnabled=false;
this.userIcon_mc.tabEnabled=false;

// Set Everything initially invisible
if (this._parent != _root)
{
this.userTop_mc._visible = false;
this.userBottom_mc._visible = false;
this.userIcon_mc._visible = false;
this.userBar_mc._visible = false;
this.userSpace_mc._visible = false;
this.userUpArrow_mc._visible = false;
this.userDownArrow_mc._visible = false;
this.userHandle_mc._visible = false;
this.userTop_mc._visible = false;
this.userBottom_mc._visible = false;
this.userIcon_mc._visible = false;
}

// Arrow Variables
this.bArrowPressed = false;
this.ArrowInterval = undefined;
this.bArrowIntervalFirst = false;
this.nArrowMoveScroll = 0;

// Original Sizes - used for scaling and positioning
this.handleHeight = this.userHandle_mc._height;
this.origHandleHeight = 0;
this.origHandleWidth = this.userHandle_mc._width;
this.barHeight = this.userBar_mc._height;
this.barWidth = this.userBar_mc._width;
this.upArrowHeight = this.userUpArrow_mc._height;
this.downArrowHeight = this.userDownArrow_mc._height;
this.topOverlap = 0;
this.bottomOverlap = 0;
this.upArrowWidth = this.userUpArrow_mc._width;
this.downArrowWidth = this.userDownArrow_mc._width;
this.userUpArrow_mc.origWidth = this.userUpArrow_mc._width;
this.userDownArrow_mc.origWidth = this.userDownArrow_mc._width;

if (this.userTop_mc != undefined)
{
this.topOverlap = (this.userTop_mc._y +this.userTop_mc._height) - (this.userHandle_mc._y);
}
if (this.userBottom_mc != undefined)
{
this.bottomOverlap = (this.userHandle_mc._y + this.userHandle_mc._height) - this.userBottom_mc._y;
}

// current scrollbar position and height set by the navigation components relative to the stage
this.ScrollYPos = 0;
this.ScrollHeight = Stage.height;

// used to calculate the arrowIncrement value
this.itemHeight = 20;

// distance to move the thumb up of down
this.arrowIncrement=0;

// find the position of the icon relative to the top of the bar
this.iconCenterPos = (this.userIcon_mc._y +(this.userIcon_mc._height/2)) - this.userHandle_mc._y;
// relative icon x pos
this.relIconXPos = this.userIcon_mc._x - this.userHandle_mc._x;

// Runtime varibles
this.pageSize = 0;
this.minScroll = 0;
this.maxScroll = 1000;
this.realPosition = 0;

this.bOver = false;
// Initialize Object
this.Init();
}

GenericScrollClass.prototype = new MovieClip();

GenericScrollClass.prototype.CreateResizeBar = function ()
{
this.resizeBar_array = new Array();
var i = 0;
for (i = 0; i < this.nResizeWidth; i++)
{
this.resizeBar_array[i] = bar_mc.duplicateMovieClip("Resizebar"+levelCount,levelCount++);
this.resizeBar_array[i].useHandCursor = false;
this.resizeBar_array[i]._alpha = 0;
this.resizeBar_array[i].onPress = this.BeginResize;
this.resizeBar_array[i].onRelease = this.EndResize;
this.resizeBar_array[i].onReleaseOutside = this.EndResize;
this.resizeBar_array[i].Owner = this;
this.resizeBar_array[i].onMouseMove = this.MouseOverResize;
this.resizeBar_array[i].onRollOut = this.MouseOutResize;
}
this.SetResizeDepth();
}

GenericScrollClass.prototype.PositionResizeBar = function ()
{
for (i = 0; i < this.nResizeWidth; i++)
{
this.resizeBar_array[i]._x = this.userBar_mc._x + (i+1);
this.resizeBar_array[i]._height = this.userBar_mc._height;
this.resizeBar_array[i]._y = this.userBar_mc._y;
}
}

GenericScrollClass.prototype.SetResizeBarDepth = function ()
{
var mc_array = new Array();
if (this.userSpace_mc !=undefined)
{
mc_array.push(this.userSpace_mc);
}
if (this.userBar_mc !=undefined)
{
mc_array.push(this.userBar_mc);
}
if (this.userHandle_mc !=undefined)
{
mc_array.push(this.userHandle_mc);
}
if (this.userIcon_mc !=undefined)
{
mc_array.push(this.userIcon_mc);
}
if (this.userTop_mc !=undefined)
{
mc_array.push(this.userTop_mc);
}
if (this.userBottom_mc !=undefined)
{
mc_array.push(this.userBottom_mc);
}
if (this.userUpArrow_mc !=undefined)
{
mc_array.push(this.userUpArrow_mc);
}
if (this.userDownArrow_mc !=undefined)
{
mc_array.push(this.userDownArrow_mc);
}

var nOffset = this.nResizeWidth;
var i = 0;
while (mc_array[i+nOffset] != undefined)
{
mc_array[i].swapDepths(mc_array[i+nOffset]);
i++;
}
var lastIndex = i;
for (i = 0; i < this.nResizeWidth; i++)
{
mc_array[lastIndex + i].swapDepths(this.resizeBar_array[i]);
}
}

GenericScrollClass.prototype.Init = function ()
{
// Position Items
this.PositionScrollBar(0,Stage.height);
this.origHandleHeight = this.GetHandleHeight();
this.GotoDefaultUpArrowState()
this.GotoDefaultDownArrowState()
this.GotoDefaultBarState()
this.GotoDefaultHandleState();

// Handle should appear at the top of the bar
this.SetHandleYPos(this.userBar_mc._y + this.upArrowHeight);

// Set the resizebar depth
if (this.bCurved)
{
this.SetResizeBarDepth();
}

// Create a mouse listener for the mouse up handle event
this.mouseListener.onMouseUp = function ()
{
this.Owner.onMouseRelease();
}
};

// This function handles the case when the user clicks directly on the scroll bar. It should move
// the thumb up or down one page
GenericScrollClass.prototype.onBarPress = function()
{
if (_ymouse >this.userUpArrow_mc._y && _ymouse < this.userDownArrow_mc._y)
{
if (_ymouse > this.GetHandleYPos())
{
this.MoveHandle(0,this.pageSize);
}
else
{
this.MoveHandle(0,-this.pageSize);
}
}
else if (this.bCurved)
{
for (var i=0; i< miniScroll_array.length;i++)
{
miniScroll_array[i].scrollbar.onBarPress();
}
}
};

GenericScrollClass.prototype.EnableItem = function ()
{
this.enabled = true;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
};

GenericScrollClass.prototype.DisableItem = function ()
{
if (this.enabled == true)
{
this.bPlayDisabled = true;
}
this.enabled = false;
this.userBar_mc.useHandCursor = false;
this.userUpArrow_mc.useHandCursor = false;
this.userDownArrow_mc.useHandCursor = false;
this.GotoDefaultUpArrowState();
this.GotoDefaultDownArrowState();
this.GotoDefaultBarState();
this.GotoDefaultHandleState();
this.bPlayDisabled = false;
};

// Used to calculate the size of the handle
GenericScrollClass.prototype.SizeHandle = function()
{
// The height of the object that will be scrolled
var scrollHeight = this.MaxScroll - this.MinScroll;
// The Display area
var paneHeight = this.ScrollHeight;
// Calculate the area where the handle can display
var scrollRegion = this.actualBar;
// The new Handle height
var handleHeight = (paneHeight / scrollHeight)*scrollRegion;

// Set the page size
this.pageSize = handleHeight;

// Set the handle increment
if (this.bResizeable)
{
this.arrowIncrement = (this.pageSize*this.itemHeight)/paneHeight;
}
else
{
this.arrowIncrement = (this.itemHeight * (this.actualBar - this.GetHandleHeight()))/(this.maxScroll - this.ScrollHeight);
}

if (this.bResizeable)
{
this.SetHandleHeight(handleHeight);
}

if ((this.GetHandleHeight() > scrollRegion) || (scrollHeight < paneHeight))
{
if (this.bResizeable)
{
this.SetHandleHeight(scrollRegion);
}
this.DisableItem();
}
else if (!this.enabled)
{
this.EnableItem();
}

// Set the new Handle position
this.MoveHandleToPosition(this.realPosition);
};

// Used to position the handle
GenericScrollClass.prototype.MoveHandleToPosition = function(truePosition)
{
// Get the scrollbar height
barHeight = this.actualBar;
// Get the thumb height
thumbHeight = this.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;

realPos = (truePosition*realBarHeight)/(this.maxScroll - this.ScrollHeight);

this.SetHandleYPos(realPos + this.userUpArrow_mc._y + this.upArrowHeight);

if (this.MakeHandleInBar())
{
PositionChanged();
}
};

GenericScrollClass.prototype.MakeHandleInBar = function()
{
var bMoved = false;

if ((this.GetHandleYPos() + this.GetHandleHeight()) >= this.userDownArrow_mc._y)
{
this.SetHandleYPos(this.userDownArrow_mc._y - this.GetHandleHeight());
bMoved = true;
}
if (this.GetHandleYPos() <= (this.userUpArrow_mc._y + this.upArrowHeight))
{
this.SetHandleYPos(this.userUpArrow_mc._y + this.upArrowHeight);
bMoved = true;
}

if (this.bCurved)
{
var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (nLeftEdge != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
else
{
this.userHandle_mc.Owner = this;
this.userHandle_mc.onEnterFrame = this.Recheck;
}
}

return bMoved;
};


GenericScrollClass.prototype.FindBarEdge = function(YPos)
{
var nResult = -123456;
var bFound = false;
var leftSide = this.userBar_mc._x;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (!bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}

return nResult;
}

GenericScrollClass.prototype.FindBarRightEdge = function(YPos,XStart)
{
var nResult = -123456;
var bFound = true;
var leftSide = XStart;
var rightSide = this.userBar_mc._x + this.userBar_mc._width;
var increment = .49;
var offset = 0;

while (bFound && (leftSide + offset)<=rightSide)
{
bFound = this.userBar_mc.hitTest(leftSide+offset,YPos,true);
offset+=increment;
}
if (!bFound)
{
offset-=increment;
nResult = (leftSide + offset);
}
else
{
nResult = 1;
}

return nResult;
}

GenericScrollClass.prototype.Recheck = function()
{
this.onEnterFrame = undefined;
this = this.Owner;

var YPos = this.GetHandleYPos() + (this.GetHandleHeight()/2);
var nLeftEdge = this.FindBarEdge(YPos)
if (newXPos != -123456)
{
var nRightEdge = this.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2) - (this.origHandleWidth / 2);
this.SetHandleXPos(newXPos);
}
}


GenericScrollClass.prototype.MoveHandle = function (dx,dy)
{
this.userHandle_mc._x +=dx;
this.SetHandleYPos(this.GetHandleYPos() + dy);
this.MakeHandleInBar();
PositionChanged();
};

///////////////////////////////////////////////////////////////////////////
//
// Functions to control the handles Y position and height
//
///////////////////////////////////////////////////////////////////////////


GenericScrollClass.prototype.SetHandleYPos = function (yPos)
{
this.userTop_mc._y = yPos;
this.userHandle_mc._y = (yPos+this.userTop_mc._height) - this.topOverlap;
this.userBottom_mc._y = (this.userHandle_mc._y + this.userHandle_mc._height) - this.bottomOverlap;
var iconPos = this.userHandle_mc._y + (((this.iconCenterPos / this.handleHeight)*this.userHandle_mc._height)-(this.userIcon_mc._height/2));
if (iconPos < this.userHandle_mc._y)
{
iconPos = this.userHandle_mc._y;
}
this.userIcon_mc._y = iconPos;
};

GenericScrollClass.prototype.SetHandleXPos = function (xPos)
{
this.userTop_mc._x = xPos;
this.userHandle_mc._x = xPos;
this.userBottom_mc._x = xPos;
this.userIcon_mc._x = xPos + this.relIconXPos;
}


GenericScrollClass.prototype.GetHandleYPos = function ()
{
var yPos;
if (this.userTop_mc != undefined)
{
yPos = this.userTop_mc._y;
}
else
{
yPos = this.userHandle_mc._y;
}
return yPos;
};

GenericScrollClass.prototype.SetHandleHeight = function (newHeight)
{
var newHandleHeight = newHeight - (this.userTop_mc._height + this.userBottom_mc._height);
if (newHandleHeight < this.userIcon_mc._height)
{
newHandleHeight = this.userIcon_mc._height;
}

if (this.userIcon_mc == undefined && newHandleHeight < minMiddleHeight)
{
var heightRatio = (this.ScrollHeight / this.barHeight);
newHandleHeight = minMiddleHeight * heightRatio;
}

this.userHandle_mc._height = newHandleHeight;
};

GenericScrollClass.prototype.GetHandleHeight = function ()
{
var handleHeight;
if (this.bResizeable || this.origHandleHeight == 0)
{
handleHeight = this.userHandle_mc._height + this.userTop_mc._height + this.userBottom_mc._height - (this.topOverlap+this.bottomOverlap);
}
else
{
handleHeight = this.origHandleHeight;
}
return handleHeight;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle all of the mouse movements from the scroll handle
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.GotoDefaultUpArrowState = function ()
{
if (this.enabled == true)
{
this.userUpArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userUpArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultDownArrowState = function ()
{
if (this.enabled == true)
{
this.userDownArrow_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userDownArrow_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultBarState = function ()
{
if (this.enabled == true)
{
this.userBar_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userBar_mc.gotoAndPlay("disabled");
}
return;
};

GenericScrollClass.prototype.GotoDefaultHandleState = function ()
{
if (this.enabled == true)
{
this.userTop_mc.gotoAndPlay("normal");
this.userBottom_mc.gotoAndPlay("normal");
this.userIcon_mc.gotoAndPlay("normal");
this.userHandle_mc.gotoAndPlay("normal");
}
else if (this.bPlayDisabled)
{
this.userTop_mc.gotoAndPlay("disabled");
this.userBottom_mc.gotoAndPlay("disabled");
this.userIcon_mc.gotoAndPlay("disabled");
this.userHandle_mc.gotoAndPlay("disabled");
}
return;
};



GenericScrollClass.prototype.onHandleRollOver = function()
{
if (this.enabled == true && !this.bOver)
{
this.bOver = true;
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
this.userHandle_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onHandleRollOut = function()
{
if (this.enabled && !this.MouseOnHandle())
{
this.bOver = false;
this.GotoDefaultHandleState();
}
};

GenericScrollClass.prototype.MouseOnHandle = function()
{
var bResult = false;
if (this.userTop_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userBottom_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userIcon_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
else if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
bResult = true;
}
return bResult;
};

GenericScrollClass.prototype.onHandlePress = function()
{
if (this.enabled == true)
{
this.dragYPos = _ymouse - this.GetHandleYPos();
this.bHandleDrag = true;
Mouse.addListener(this.mouseListener);
this.mouseInterval = setInterval(this.onHandleDrag,25,this);
this.userHandle_mc.gotoAndPlay("down");
this.userTop_mc.gotoAndPlay("down");
this.userBottom_mc.gotoAndPlay("down");
this.userIcon_mc.gotoAndPlay("down");
}
};

GenericScrollClass.prototype.onHandleDrag = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bHandleDrag)
{
var yPos = _ymouse - this.dragYPos;
this.SetHandleYPos(yPos);
this.MakeHandleInBar();
PositionChanged();
}
};

GenericScrollClass.prototype.onMouseRelease = function()
{
if (this.bHandleDrag)
{
this.onHandleDrag();
clearInterval(this.mouseInterval);
Mouse.removeListener(this.mouseListener);
this.bHandleDrag = false;
if (this.userHandle_mc.hitTest(_xmouse,_ymouse,true))
{
this.userHandle_mc.gotoAndPlay("over");
this.userTop_mc.gotoAndPlay("over");
this.userBottom_mc.gotoAndPlay("over");
this.userIcon_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultHandleState();
}
}
};


///////////////////////////////////////////////////////////////////////////
//
// Used when the used clicks on the up or down arrow to contine scrolling
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.ContinueScroll = function(scrollbarObj)
{
this = scrollbarObj;
if (this.bArrowPressed)
{
if (this.bArrowIntervalFirst)
{
bArrowIntervalFirst = false;
clearInterval(this.ArrowInterval);
this.ArrowInterval = setInterval(this.ContinueScroll,75,this);
}
this.MoveHandle(0,this.nArrowMoveScroll);
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onUpArrowPress = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,-this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = -this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onUpArrowRelease = function()
{

if (this.userUpArrow_mc.hitTest(_xmouse,_ymouse,true) && this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultUpArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onUpArrowRollOver = function()
{
if (this.enabled)
{
this.userUpArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onUpArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultUpArrowState();
}
};

GenericScrollClass.prototype.onUpArrowDragOut = function()
{
if (this.enabled)
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultUpArrowState();
}
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

GenericScrollClass.prototype.onDownArrowPress = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("down");
this.MoveHandle(0,this.arrowIncrement);
this.bArrowPressed = true;
this.nArrowMoveScroll = this.arrowIncrement;
this.ArrowInterval = setInterval(this.ContinueScroll,300,this);
this.bArrowIntervalFirst = true;
}
};

GenericScrollClass.prototype.onDownArrowRelease = function()
{
if (this.userDownArrow_mc.hitTest(_xmouse,_ymouse,true) && this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
else
{
this.GotoDefaultDownArrowState();
}
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
};

GenericScrollClass.prototype.onDownArrowRollOver = function()
{
if (this.enabled)
{
this.userDownArrow_mc.gotoAndPlay("over");
}
};

GenericScrollClass.prototype.onDownArrowRollOut = function()
{
if (this.enabled)
{
this.GotoDefaultDownArrowState();
}
};

GenericScrollClass.prototype.onDownArrowDragOut = function()
{
if (this.bArrowPressed)
{
this.bArrowPressed = false;
clearInterval(this.ArrowInterval);
}
this.GotoDefaultDownArrowState();
};

GenericScrollClass.prototype.onMouseWheel = function(wheelDelta)
{
this.MoveHandle(0,-(this.arrowIncrement*(wheelDelta/wheelDeltaBase)));
};


GenericScrollClass.prototype.PositionScrollBar = function(yPos, SCHeight)
{
// Set the XPosition
var newXPos = Stage.width-this.barWidth;
if (!this.bCurved && !this.bVertical)
{
newXPos -= 5;
}

var deltaX = newXPos - this.userBar_mc._x;
if (this.bCurved)
{
deltaX -= (this.downArrowWidth/2);
}

this.userTop_mc._x += deltaX;
this.userBottom_mc._x += deltaX;
this.userIcon_mc._x += deltaX;
this.userUpArrow_mc._x += deltaX;
this.userDownArrow_mc._x += deltaX;
this.userHandle_mc._x += deltaX;
this.userBar_mc._x += deltaX;
this.userSpace_mc._x +=deltaX;

// Set YPosition and height
this.actualBar = SCHeight - (this.upArrowHeight + this.downArrowHeight);
this.userUpArrow_mc._y = yPos;
if (this.bCurved)
{
this.userBar_mc._y = 0;
this.userBar_mc._height = Stage.height+5;
}
else
{
this.userBar_mc._y = yPos + this.upArrowHeight;
this.userBar_mc._height = this.actualBar;
this.userBar_mc.Owner = this;
this.userBar_mc.onEnterFrame = this.CorrectSize;
}
this.userSpace_mc._y = this.userBar_mc._y;
this.userSpace_mc._height = this.userBar_mc._height;
this.SetBgColor(this.spaceBgColor);
this.userDownArrow_mc._y = (yPos + SCHeight) - this.downArrowHeight;

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;
if (this.userDownArrow_mc._y < (this.userUpArrow_mc._y+this.upArrowHeight))
{
this.userDownArrow_mc._y = (this.userUpArrow_mc._y+this.upArrowHeight);
}

// Save the yPos and height
this.ScrollYPos = yPos;
this.ScrollHeight = SCHeight;

// If the scrollbar is curved recheck the XPosition
if (this.bCurved)
{
// Position Up Arrow
var nLeftEdge = this.FindBarEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2));
if (nLeftEdge == -123456)
{
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
var nRightEdge = this.FindBarRightEdge(this.userUpArrow_mc._y + (this.upArrowHeight/2),nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.upArrowWidth/2)
this.userUpArrow_mc._x = newXPos;
this.userUpArrow_mc.Owner = this;
this.userUpArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position DownArrow
nLeftEdge = this.FindBarEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2));
if (nLeftEdge == -123456)
{
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}
else
{
var nRightEdge = this.FindBarRightEdge(this.userDownArrow_mc._y + (this.downArrowHeight/2),nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.downArrowWidth/2)
this.userDownArrow_mc._x = newXPos;
this.userDownArrow_mc.Owner = this;
this.userDownArrow_mc.onEnterFrame = RepositionOnFail;
}

// Position Resize Bar
this.PositionResizeBar()
}

// Create the ScrollBorder
this.scrollBorder_mc.clear();
this.scrollBorder_mc.lineStyle(1,0x999999,100);
this.scrollBorder_mc.moveTo(4,0);
this.scrollBorder_mc.lineTo(4,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xD2D2D2,100);
this.scrollBorder_mc.moveTo(3,0);
this.scrollBorder_mc.lineTo(3,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xD5D5D5,100);
this.scrollBorder_mc.moveTo(2,0);
this.scrollBorder_mc.lineTo(2,Stage.height);
this.scrollBorder_mc.lineStyle(1,0xDADADA,100);
this.scrollBorder_mc.moveTo(1,0);
this.scrollBorder_mc.lineTo(1,Stage.height);
this.scrollBorder_mc.lineStyle(1,0x999999,100);
this.scrollBorder_mc.moveTo(0,0);
this.scrollBorder_mc.lineTo(0,Stage.height);
this.scrollBorder_mc.onPress = this.BeginResize;
this.scrollBorder_mc.onRelease = this.EndResize;
this.scrollBorder_mc.onReleaseOutside = this.EndResize;
this.scrollBorder_mc._x = Stage.width - 5;
if (!this.bCurved)
{
this.scrollBorder_mc.onMouseMove = this.MouseOverResize;
}
this.scrollBorder_mc.onRollOut = this.MouseOutResize;

// Create the resize cursor
this.resizeCursor_mc.clear();
this.resizeCursor_mc.lineStyle(1, 0x000000, 100);
this.resizeCursor_mc.beginFill(0x000000, 100);
this.resizeCursor_mc.moveTo(0, resizeCursorHeight / 2);
this.resizeCursor_mc.lineTo(resizeCursorWidth / 3, resizeCursorHeight / 2);
this.resizeCursor_mc.moveTo(resizeCursorWidth / 3, 0);
this.resizeCursor_mc.lineTo(resizeCursorWidth / 3, resizeCursorHeight);
this.resizeCursor_mc.moveTo(resizeCursorWidth * 2 / 3, 0);
this.resizeCursor_mc.lineTo(resizeCursorWidth * 2 / 3, resizeCursorHeight);
this.resizeCursor_mc.moveTo(resizeCursorWidth * 2 / 3, resizeCursorHeight / 2);
this.resizeCursor_mc.lineTo(resizeCursorWidth, resizeCursorHeight / 2);
this.resizeCursor_mc.endfill();

this.spaceBg_mc._x = this.userSpace_mc._x;
this.spaceBg_mc._y = this.userSpace_mc._y;

this.SizeHandle();
}

GenericScrollClass.prototype.SetBgColor = function(newColor)
{
this.spaceBgColor = newColor;
this.spaceBg_mc.clear();
this.spaceBg_mc.moveTo(0,0);
this.spaceBg_mc.lineStyle(1,newColor,100);
this.spaceBg_mc.beginFill(newColor,100);
this.spaceBg_mc.lineTo(0,this.userSpace_mc._height);
this.spaceBg_mc.lineTo(this.userSpace_mc._width,this.userSpace_mc._height);
this.spaceBg_mc.lineTo(this.userSpace_mc._width,0);
this.spaceBg_mc.lineTo(0,0);
this.spaceBg_mc.endFill();
};

GenericScrollClass.prototype.CorrectSize = function()
{
this.onEnterFrame = undefined;
this.Owner.userBar_mc._height = this.Owner.actualBar;
};

function RepositionOnFail()
{
var YPos = this._y + (this._height/2);
var nLeftEdge = this.Owner.FindBarEdge(YPos);
if (nLeftEdge != -123456)
{
var nRightEdge = this.Owner.FindBarRightEdge(YPos,nLeftEdge)
var newXPos = nLeftEdge + ((nRightEdge - nLeftEdge)/2);
newXPos -= (this.origWidth/2)
this._x = newXPos;
}
}

///////////////////////////////////////////////////////////////////////////
//
// Nav Pane resizing
//
///////////////////////////////////////////////////////////////////////////
GenericScrollClass.prototype.BeginResize = function()
{
if (this.Owner.bResizeVisible)
{
this.Owner.scrollBorder_mc._visible = true;
this.Owner.resizeCursor_mc._visible = false;
} else if (this.Owner.bShowResizeCursor)
{
this.Owner.resizeCursor_mc._visible = true;
}
_parent.BeginResize(_xmouse,_ymouse);
this.Owner.Drag();
this.Owner.resizeListener.onMouseMove = this.Owner.Drag;
this.Owner.bResizing = true;
if (this.Owner.bHideCursorOnResize)
{
Mouse.hide();
}
Mouse.addListener(this.Owner.resizeListener);
}

GenericScrollClass.prototype.EndResize = function()
{
Mouse.show();
this.Owner.resizeCursor_mc._visible = false;
Mouse.removeListener(this.Owner.resizeListener);
this.Owner.bResizing = false;
if (fhgeneric_comp.bResizeVisible)
{
fhgeneric_comp.scrollBorder_mc._x = _xmouse;
}
_parent.EndResize(_xmouse,_ymouse);
}

GenericScrollClass.prototype.MouseOverResize = function()
{
// Only do something if we are not resizing
if (!this.Owner.bResizing && !this.Owner.bVertical && !this.Owner.bHandleDrag && this.Owner.bShowResizeCursor)
{
// See if we are moving over a resize area
var bHit = false;
if (this.Owner.scrollBorder_mc.hitTest(_xmouse, _ymouse, true) && !this.Owner.bCurved) {
bHit = true;
} else {
if (!this.Owner.userBar_mc.hitTest(_xmouse, _ymouse, true) && DisplayResizeCursor())
{
for (var i = 0; i < this.Owner.nResizeWidth; i++)
{
if (this.Owner.resizeBar_array[i].hitTest(_xmouse, _ymouse, true)) {
bHit = true;
}
}
}
}

// Show (or don't) the resize cursor
if (bHit) {
if (this.Owner.bHideCursorOnResize)
{
Mouse.hide();
}
this.Owner.resizeCursor_mc._x = _xmouse - resizeCursorWidth / 2;
this.Owner.resizeCursor_mc._y = _ymouse - resizeCursorHeight / 2;
this.Owner.resizeCursor_mc._visible = true;
clearInterval(this.Owner.resizeInterval);
this.Owner.resizeInterval = setInterval(this.Owner.ResizeTimeout,RESIZEBAR_TIMEOUT,this.Owner);
} else {
Mouse.show();
this.Owner.resizeCursor_mc._visible = false;
}
}
}

GenericScrollClass.prototype.ResizeTimeout = function(Owner)
{
clearInterval(Owner.resizeInterval);
if (!Owner.bResizing)
{
Owner.resizeCursor_mc._visible = false;
Mouse.show();
}
}

GenericScrollClass.prototype.MouseOutResize = function()
{
this.Owner.resizeCursor_mc._visible = false;
Mouse.show();
}

GenericScrollClass.prototype.Drag = function()
{
if (fhgeneric_comp.bResizeVisible)
{
fhgeneric_comp.scrollBorder_mc._x = _xmouse;
}
else
{
fhgeneric_comp.resizeCursor_mc._x = _xmouse - resizeCursorWidth / 2;
fhgeneric_comp.resizeCursor_mc._y = _ymouse - resizeCursorHeight / 2;
}
_parent.Drag(_xmouse,_ymouse);
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Scroll Handle
//
///////////////////////////////////////////////////////////////////////////
handle_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

handle_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

handle_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

top_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

top_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

top_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

bottom_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

bottom_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

bottom_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

icon_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onHandleRollOver();
};

icon_mc.onPress = function()
{
fhgeneric_comp.onHandlePress();
};

icon_mc.onRollOut = function()
{
fhgeneric_comp.onHandleRollOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Up Arrow
//
///////////////////////////////////////////////////////////////////////////

uparrow_mc.onPress = function()
{
fhgeneric_comp.onUpArrowPress();
};

uparrow_mc.onRelease = function()
{
fhgeneric_comp.onUpArrowRelease();
};

uparrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onUpArrowRollOver();
};

uparrow_mc.onRollOut = function()
{
fhgeneric_comp.onUpArrowRollOut();
};

uparrow_mc.onDragOut = function()
{
fhgeneric_comp.onUpArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for the Down Arrow
//
///////////////////////////////////////////////////////////////////////////

downarrow_mc.onPress = function()
{
fhgeneric_comp.onDownArrowPress();
};

downarrow_mc.onRelease = function()
{
fhgeneric_comp.onDownArrowRelease();
};

downarrow_mc.onRollOver = function()
{
this.useHandCursor = false;
fhgeneric_comp.onDownArrowRollOver();
};

downarrow_mc.onRollOut = function()
{
fhgeneric_comp.onDownArrowRollOut();
};

downarrow_mc.onDragOut = function()
{
fhgeneric_comp.onDownArrowDragOut();
};

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse messages for ScrollBar
//
///////////////////////////////////////////////////////////////////////////

bar_mc.onPress = function()
{
fhgeneric_comp.onBarPress();
};

bar_mc.onRollOver = function()
{
this.useHandCursor = false;
}

///////////////////////////////////////////////////////////////////////////
//
// Handle mouse wheel messages
//
///////////////////////////////////////////////////////////////////////////

function OnMouseWheel(wheelDelta)
{
if (_ymouse >= fhgeneric_comp.ScrollYPos && _ymouse <= (fhgeneric_comp.ScrollYPos + fhgeneric_comp.ScrollHeight))
{
fhgeneric_comp.onMouseWheel(wheelDelta);
}
else
{
var i = 0;
for (i=0; i< miniScroll_array.length;i++)
{
if (_ymouse>=miniScroll_array[i].ScrollYPos && _ymouse <= miniScroll_array[i].ScrollYPos+miniScroll_array[i].ScrollHeight)
{
miniScroll_array[i].scrollbar.onMouseWheel(wheelDelta);
}
}
}
}

function DisplayResizeCursor()
{
var bResult = true;

if ((fhgeneric_comp.userHandle_mc.hitTest(_xmouse, _ymouse, true) ||
fhgeneric_comp.userUpArrow_mc.hitTest(_xmouse, _ymouse, true) ||
fhgeneric_comp.userDownArrow_mc.hitTest(_xmouse, _ymouse, true)) &&
fhgeneric_comp.enabled)
{
bResult = false;
}
for (var i =0; i < miniScroll_array.length; i++)
{
if ((miniScroll_array[i].scrollbar.userHandle_mc.hitTest(_xmouse, _ymouse, true) ||
miniScroll_array[i].scrollbar.userUpArrow_mc.hitTest(_xmouse, _ymouse, true) ||
miniScroll_array[i].scrollbar.userDownArrow_mc.hitTest(_xmouse, _ymouse, true)) &&
miniScroll_array[i].scrollbar.enabled)
{
bResult = false;
}
}
return bResult;
}

// Register the class
Object.registerClass("FGenericFHScroll", GenericScrollClass);

#endinitclip????? ???Main Scroll Actions????O????????????????@
?????#initclip

var debug_trace = _parent.debug_trace;
var currentItem = undefined;

function PositionChanged()
{
// Get the scrollbar height
barHeight = fhgeneric_comp.actualBar;
// Get the thumb height
thumbHeight = fhgeneric_comp.GetHandleHeight();
// Get the total scrolling distance - take into account the up and down arrows and height of the thumb
realBarHeight = barHeight - thumbHeight;
// Get the thumbposition on the total scrolling area - adjust for uparrow
realPos = fhgeneric_comp.GetHandleYPos() - (fhgeneric_comp.userUpArrow_mc._y + fhgeneric_comp.upArrowHeight);

// Save the current posiiton for when the scrollbar is resized
fhgeneric_comp.realPosition = ((realPos / realBarHeight)*(fhgeneric_comp.maxScroll - fhgeneric_comp.ScrollHeight));

// Check for .00001 instead of 0 because flash loses significant digits on some obscure browsers
if (realBarHeight <= .00001 || fhgeneric_comp.realPosition < 0 || !fhgeneric_comp.enabled)
{
fhgeneric_comp.realPosition=0;
realPos = 0;
}
// Send the command to the NavHost
if (currentItem == _parent.curScrollItem.pfnScroll || currentItem == undefined)
{
_parent.curScrollItem.pfnScroll(fhgeneric_comp.realPosition);
}
}

#endinitclip????? ???Scrollbar to Owner????O????? ??CPicPage?? CPicLayer?? CPicFrame????x??0 ?0? ??????????C^???????? ???Layer 1????O?????he normal??CPicPage?? CPicLayer?? CPicFrame??????h????? ?????pmn?? ???0?0 0?????????? ???????? ???BG????O?O??????????????B???????? ???Button?????OO???????????CPicPage?? CPicLayer?? CPicFrame??CPicText??
k??? &?C??CPicPage?? CPicLayer?? CPicFrame??CPicText??
? ???? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???????????)??????????Y???????? ???Hint??????O?????
CPicSymbol??&?3??????????????????r??????? ?!?????????
??????????h??????? ?+??&?3????????
?????????a$??????? ?5??M?f2??????????????????7??????? ?6d?????? ????????????????? ????????????????????????? ??? Button BG????O?O??? ?PPPP???????"???????????Z??????? ?PPPP???????"?? ?????????:??????? ?PPPP????"????????????O???????? ???Symbol?????3????????????????5???stop();??????
??????????5???stop();??????
??????????k???stop();?????? ?????????b???stop();???????????????P+???stop();????? ???Actions?????OO???????????????2??????????????????normal4{?????????
?????????over%g?????????
?????????down?n????????? ?????????disabledc???????? ???Labels????O???????CPicPage?? CPicLayer?? CPicFrame??CPicText??
s  &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???????????)?????????w???????? ???Hint??????O?????
CPicSymbold????????????????r??????? ?!?????????
?????????jM??????? ?+d??????
?????????9H??????? ?5d???????????????'u??????? ?6d?????? ?????????????????? ?????????????????/???????? ??? Button BG????O?O??? ???l(????z???????&???????????f??????? ???l(????z???????&?? ?????????????????? ???l(????z????&???????????????????? ???Symbol?????3??????????????????stop();??????
??????????m???stop();??????
?????????? ???stop();?????? ?????????-???stop();????????????????K???stop();????? ???Actions?????OO???????????????c??????????????????normalF?????????
?????????overri?????????
?????????down?????????? ?????????disabled?=???????? ???Labels????O????????V ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears. This is the normal, visible state of the scrollbar's Bar.

disabled: Plays when the scrollbar is not needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.?????????????????????E???????? ???Hint?????3??????
CPicSymbol???????
???????????xX??????? ?????
??????????? .??????? ??????
????????????5??????? ????????
?? ????????????????? ?????
????????????L???????? ???Bar Placeholder????O?O??????????????# ????????? ??????????<???stop();???????????????Vz???stop();????? ???Actions?????OO??????????????;??????????????????normal-D????????? ?????????disabled)_???????? ???Lables????O?????
?
???L?L???CPicPage?? CPicLayer?? CPicFrame??fff?pmn????? ??????pmn???
????0 ?
?k\??s?
(?????????
=????? ?
0?????
??A??CPicPage?? CPicLayer?? CPicFrame??CPicText??
?z??? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???????????(??????????&???????? ???Hint?????3??????
CPicSymbol????
??????d???????????????w??????? ?????
???????????????
????????????????? ?????
??????d??????
??????????"??????? ?????
??????d???????????????;??????? ?????
???????????????
??????????7??????? ?????
?????????????????????>???????? ???Bottom????O????????????????~?????????
?????????????stop();
??????
??????????Y???stop();
?????? ?????????????stop();
???????????????0???stop();
????? ???Actions?????OO????? ?????????normal?/?????????
?????????over`?????????
?????????down?1?????????
?????????disabled???????????????????)2???????? ???Labels????O?O?????CPicPage?? CPicLayer?? CPicFrame??CPicText??
? ???? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???????????(?????????????????? ???Hint?????3??????
CPicSymbold???????????????~??????? ??????????
????????????????? ?d??????
??????????o??????? ?3?3?3?P???????????????????Q??????? ??????????
??????????c??????? ????????????????????????? ???Icon????O??????????????????????????
??????????=???stop();
??????
?????????a???stop();
?????? ?????????????stop();
???????????????]\???stop();
????? ???Actions?????OO????? ?????????normal??????????
?????????over\%?????????
?????????down?-?????????
?????????disabled@o???????????????????8???????? ???Labels????O?O?????CPicPage?? CPicLayer?? CPicFrame??CPicText??
????? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???????????(????????????????? ???Hint?????3??????
CPicSymbold???????????????6/??????? ??????????
?????????s*??????? ?d??????
??????????P??????? ?d????????????????6??????? ??????????
?????????4??????? ????????????????=???????? ???Top????O????????????????M7?????????
?????????i???stop();
??????
?????????B8???stop();
?????? ?????????????stop();
????????????????!???stop();
????? ???Actions?????OO????? ?????????normalcm?????????
?????????over?h?????????
?????????down?$?????????
?????????disabled?B??????????????????????????? ???Labels????O?O???????    
???? !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????CPicPage?? CPicLayer?? CPicFrame??CPicText??
????? &?C??? ?_sans?(HINT:
Use the labeled frames to change states of the scrollbar.

normal: Plays when the scrollbar first appears, is enabled, or when the user moves the mouse out from this element.

over: Plays when the user mouses over this element. Because "normal" is played when the user moves the mouse out, the last frame of "over" should look similar to the first frame of "normal" to provide a smooth transition.

down: Plays when the user clicks or holds the mouse button down.

disabled: Plays when the scrollbar is no? ?_sans?(t needed (because all contents in the Navigation Pane can display without scrolling). Typically, the scrollbar will fade out here.???????????(?????????\???????? ???Hint?????3??????
CPicSymbold???? ???????????94??????? ???????? ??
?????????:H??????? ?d???? ??
??????????h??????? ?d???? ????????????f??????? ???????? ??
?????????Z??????? ????? ???????????/P???????? ???Handle????O????????????????Ex?????????
?????????86???stop();
??????
?????????.???stop();
?????? ?????????????stop();
????????????????{???stop();
????? ???Actions?????OO????? ?????????normal;?????????
?????????overBy?????????
?????????down?^?????????
?????????disabledM??????????????????>i???????? ???Labels????O?O????????38 ?????.?3 ??????????P ???????? ???Handle?????OO??????????????????CPicPage?? CPicLayer?? CPicFrame??fff?pmn????????????pmn???????????????02??????J???????0?B?0L???L?L???
?
?L?L?R?P?N?L?T?T?S?R?L?N?P?O?O?R?R?R?R?S?T?T????????????????????????????????????????????L????L
L
L



RSTT????L????N????PRTT S R R P
N
L??????????????????????????????????????????????????????



?
?
?O?O?T?T
T
T
L
L?T?T
T
T??????????J???????? ???Top?????OO???e????CPicPage?? CPicLayer?? CPicFrame????????????:???????? ???BG????O???????????fff????0 ??  0a<f?V"???D? I?l? ??0?4???<???????????0?3 I|?0?????????????)???????? ???FG?????OO?????CPicPage?? CPicLayer?? CPicFrame?? ?????bZ~??0?1?~??0?1?~??0?????????PP?P?P????????????????????????????????????????????????????????????B???????? ???Layer 1????O??????????;???????????????????????????????=??????????????????????????!???????????????????? ???Layer 1????O?????();
?????CPicPage?? CPicLayer?? CPicFrame??CPicText??
?(k/?4C??? ?_sans?(HINT:
The scrollbar is made up of several parts, many of which have labeled frames that allow you to define their look in various states.

uparrow_mc, downarrow_mc: These are the movie clips used for the up and down arrows. They will be placed at the top and bottom of the scrollbar at runtime.

bar_mc: This is the bar that displays behind the handle. It will stretch at runtime to be the same height as the navigation pane.

handle_mc: This is the handle of the scrollbar. If resizable (see options below), thi ?_sans?(s movie clip will stretch based on the height of the scrollable contents.

fhgeneric_comp: This component is needed for the scrollbar to behave correctly at runtime.

[Optional clips below]
top_mc, buttom_mc: These movie clips are positioned above and below handle_mc. These will not scale when handle_mc scales, so they will not become distorted.

icon_mc: This movie clip does not scale, and keeps its relative vertical location as handle_mc stretches. Use this if you want an icon in the center of the handle. ?_sans?(

space_mc: If you are using a curved scrollbar (see options below), create this clip to use on the right side of the scrollbar. The color of this movie clip will change at runtime to the color of the current topic, to give the illusion that the topic being viewed continues underneath the scrollbar. The left side of the movie clip should conform to the shape of bar_mc, and at runitme this clip will be stretched the same amount as bar_mc. NOTE: This sample uses a straight scrollbar, so this movie clip is not ?_sans?( included. If you are using a curved scrollbar, insert a movie clip on the Stage (main timeline) with the instance name "space_mc".


[Scrollbar Options]
The scrollbar compoent has two options. Select fhgeneric_comp on the stage to edit them.

thumbResizable: If true, the thumb (handle_mc) will stretch at runtime based on the height of the scrollable contents.

scrollbarCurved: If true, the thumb will center itself on bar_mc at run time. This is to allow curved scrollbars. The thumb will never be resizable I ?_sans?(with curved scrollbars, no matter how the "thumbResizable" option is set.????????????????????????????? ???Hint?????OO?????
CPicSprite@?@????????%m??????fhgeneric_comp???thumbResizeable???true??? bResizeable??}?oSL????|????????scrollbarCurved???false???bCurved6L@?d?E?FA7nM?????????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='1'>
</component>
????????????c???????? ??? Component?????????? ?????d????)v??????bar_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='2'>
</component>
???????????????????? ???Bar?????3???? ?  d?????4?????? handle_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='3'>
</component>
????????????b???????? ???Handle?????O???? ?P???5?P?d?????(??????icon_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='4'>
</component>
????????????U???????? ???Icon????O????? ???? ?d?????Z??????top_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='5'>
</component>
??????????? ???????? ???Top??????O??? ?
?J 
d????4N?????? bottom_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='6'>
</component>
????????????;???????? ???Bottom????O????? ?,L{@??@??,Ld????&~?????? downarrow_mc
????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='10'>
</component>
???????????m???????? ??? DownArrow????O?O??? ????d????!??????
uparrow_mc????<component metaDataFetched='true' schemaUrl='' schemaOperation='' sceneRootLabel='Scene 1' oldCopiedComponentPath='8'>
</component>
???????????? ???????? ???UpArrow????O?O??? ???
CDocumentPagePage 1???Scene 1????æ>
??????????????????????ub?F???????????????????????????????????????????????????????
???????? Symbol 21???Icon?????>&??>x??????????????? Symbol 21????????^?F??????????????????????????????????????????????????????????????? Symbol 13???Bar
???<y?>??>???????????????? Symbol 13???????e`?F???????????????????????????????????????????????????????????????Symbol 6???Handle Top Bottom???<y?>
??>w???????????????Symbol 6????????a?F???????????????????????????????????????????????????????????????Symbol 9???Handle ???<y?>`??>N???????????????,Placeholder Graphics/Handle Placeholder copy???????ra?F???????????????????????????????????????????????????????????????Symbol 5???Handle???R??>
}?> ???????????????Symbol 5????????^?F???????????????????????????????????????????????????????????????Symbol 8??? HandleTop???R??>?|?>???????????????MovieHandle copy????????_?F??????????????????????????????????????????????????????????????? Symbol 20???Icon???R??>?J?>V???????????????HandleTop copy???????:???????????????????????????????????????????????????????????????? Symbol 17??? HandleBottom???R??>??>????????????????HandleTop copy???????ob?F???????????????????????????????????????????????????????????????Symbol 2???MovieBar???R??>:?>???????????????Symbol 2???????a???????????????????????????????????????????????????????????????? Symbol 30???UpArrow???R??>K??>?????????????.\skin_button_nav_next.fla???MovieClips/Button???>?&?>???[^?F??????????????????????????????????????????????????????????????? Symbol 33??? DownArrow!???R??>v??>???????????????? UpArrow copy?????????>??????????????????????????????????????????????????????????????? Symbol 31???
ButtonGraphic???<y?> ??>%????????????.\skin_button_nav_next.fla???"Placeholder Graphics/ButtonGraphic ??> ??>%???1a?F??????????????????????????????????????????????????????????????? Symbol 32???UpArrow ?????>&Y??>?????????????.\skin_button_nav_next.fla??? Placeholder Graphics/_Icons/Nextp??>??>???Y??>??????????????????????????????????????????????????????????????? Symbol 34??? DownArrow"?????>&???>????????????????(Placeholder Graphics/_Icons/UpArrow copy??????????>??????????????????????????????????????????????????????????????? Symbol 37???Generic FH Scroll Component%???]O?>g???FGenericFHScroll???flashhelp_components.swf??????7..\..\..\..\..\FlashComponents\flashhelp_components.fla???Generic FH Scroll Component?8M?]O?>g????8M??????????thumbResizeable???true??? bResizeable??}?oSL????|????????scrollbarCurved???false???bCurved6L@?d?E?FA7nM????????????????????????????????????????????????thumbResizeable???true??? bResizeable??}?oSL????|????????scrollbarCurved???false???bCurved6L@?d?E?FA7nM??????????????????????S 38 1183407290???Next&?????>&??>????????????.\skin_button_nav_next.fla??? Placeholder Graphics/_Icons/Next?B?F??>????B?F??????????????????????????????????????????????????????????????'?p??hhhh???????? ????Vector::Template???0???legacyLineSpacing???0???PropSheet::ActiveTab???1599|??? PublishRNWKProperties::speed256K???0???!PublishGifProperties::PaletteName??????"PublishHtmlProperties::StartPaused???0???%PublishFormatProperties::htmlFileName???skin_scrollbar.html??? PublishQTProperties::LayerOption?????? PublishQTProperties::AlphaOption??????"PublishQTProperties::MatchMovieDim???1???PublishHtmlProperties::Loop???1???Vector::Debugging Permitted???0???PublishFormatProperties::jpeg???0???PublishProfileProperties::name???Flash CS3 Settings???&PublishRNWKProperties::speedSingleISDN???0???&PublishRNWKProperties::singleRateAudio???0???PublishQTProperties::Width???100???$PublishPNGProperties::OptimizeColors???1???PublishHtmlProperties::Units???0???%PublishRNWKProperties::mediaCopyright???(c) 2000???#PublishRNWKProperties::flashBitRate???1200???PublishGifProperties::Smooth???1???Vector::Compress Movie???1???&PublishFormatProperties::flashFileName???skin_scrollbar.swf???%PublishFormatProperties::projectorMac???0???!PublishRNWKProperties::exportSMIL???1??? PublishRNWKProperties::speed384K???0???"PublishRNWKProperties::exportAudio???1???"PublishGifProperties::DitherOption??????PublishHtmlProperties::Quality???4???(PublishHtmlProperties::VerticalAlignment???1???$PublishFormatProperties::pngFileName???skin_scrollbar.png???PublishFormatProperties::html???0???'PublishRNWKProperties::mediaDescription??????"PublishPNGProperties::FilterOption??????!PublishHtmlProperties::DeviceFont???0???Vector::Override Sounds???0???PublishQTProperties::Flatten???1???PublishJpegProperties::DPI???4718592???PublishPNGProperties::BitDepth???24-bit with Alpha???PublishPNGProperties::Smooth???1???"PublishGifProperties::DitherSolids???0???PublishGifProperties::Interlace???0???"PublishHtmlProperties::DisplayMenu???1???*PublishHtmlProperties::HorizontalAlignment???1???Vector::Quality???80???Vector::Protect???0???*PublishFormatProperties::generatorFileName???skin_scrollbar.swt???PublishFormatProperties::gif???0???$PublishRNWKProperties::mediaKeywords??????!PublishRNWKProperties::mediaTitle??????PublishRNWKProperties::speed28K???1???PublishGifProperties::Loop???1???PublishGifProperties::Width???100???#PublishFormatProperties::qtFileName???skin_scrollbar.mov???$PublishRNWKProperties::speedDualISDN???0???$PublishRNWKProperties::realVideoRate???100000???PublishJpegProperties::Quality???80???"PublishPNGProperties::DitherOption??????#PublishGifProperties::PaletteOption??????#PublishGifProperties::MatchMovieDim???1???PublishFormatProperties::flash???1???$PublishJpegProperties::MatchMovieDim???1???#PublishPNGProperties::PaletteOption??????#PublishPNGProperties::MatchMovieDim???1???PublishHtmlProperties::Align???0???-PublishFormatProperties::projectorWinFileName???skin_scrollbar.exe???#PublishQTProperties::PlayEveryFrame???0???"PublishJpegProperties::Progressive???0???"PublishPNGProperties::DitherSolids???0???PublishHtmlProperties::Height???300???PublishHtmlProperties::Width???100???Vector::Debugging Password??????Vector::Omit Trace Actions???0???%PublishFormatProperties::jpegFileName???skin_scrollbar.jpg???PublishJpegProperties::Size???0???PublishPNGProperties::Interlace???0???PublishGifProperties::Height???300???'PublishHtmlProperties::TemplateFileName???eC:\Documents and Settings\edigre\Application Data\Macromedia\Flash MX\Configuration\Html\Default.html???!PublishHtmlProperties::WindowMode???0???Vector::TopDown???0???-PublishFormatProperties::projectorMacFileName???skin_scrollbar.hqx???PublishFormatProperties::rnwk???0???PublishFormatProperties::png???0???Vector::AS3AutoDeclare???0???PublishRNWKProperties::speed56K???1???PublishQTProperties::Height???300???%PublishPNGProperties::RemoveGradients???0???PublishGifProperties::MaxColors???255???'PublishGifProperties::TransparentOption??????PublishGifProperties::LoopCount??????Vector::Report???0???"PublishFormatProperties::generator???0???"PublishRNWKProperties::audioFormat???0???$PublishGifProperties::OptimizeColors???1???Vector::Version???6???Vector::Event Format???0???Vector::Stream Compress???7???PublishFormatProperties::qt???0???Vector::AS3Strict???0??? PublishRNWKProperties::speed512K???0???PublishJpegProperties::Height???300???PublishPNGProperties::Height???300???PublishPNGProperties::Width???100???%PublishGifProperties::RemoveGradients???0???PublishHtmlProperties::Scale???0???Vector::Event Compress???7???Vector::ActionScriptVersion???1???"PublishRNWKProperties::mediaAuthor??????(PublishRNWKProperties::speedCorporateLAN???0???&PublishRNWKProperties::showBitrateDlog???1???"PublishRNWKProperties::exportFlash???1???PublishQTProperties::Looping???0???*PublishQTProperties::UseQTSoundCompression???0???PublishJpegProperties::Width???100???!PublishPNGProperties::PaletteName??????!PublishPNGProperties::Transparent???0???&PublishGifProperties::TransparentAlpha???128???PublishGifProperties::Animated???0???Vector::Stream Format???0???$PublishFormatProperties::gifFileName???skin_scrollbar.gif???"PublishQTProperties::PausedAtStart???0???%PublishQTProperties::ControllerOption???0???PublishPNGProperties::MaxColors???255???%PublishFormatProperties::rnwkFileName???skin_scrollbar.smil???%PublishFormatProperties::projectorWin???0???%PublishFormatProperties::defaultNames???1????????????? CColorDef??????3?P??f?P?0???P?H???P?`???P?x?3???33?(??3f?<?0?3??C?H?3??F?`?3??H?x?f??0?f3??0?ff?(?0?f??5?H?f??<?`?f??@?x???333?0???3????33?x??f3?d?0??3?]?H??3?Z?`??3?X?x?33????333?0?3f3?PPH?3?3?Px`?3?3?P?x?3?3?P???f3???0?f33?PH?ff3?(PH?f?3?<x`?f?3?C?x?f?3?F?????fff?`???f???0?3f???0?ff?x?0??f?k?H??f?d?`??f?`?x?3f???0?33f??PH?3ff?xPH?3?f?dx`?3?f?]?x?3?f?Z???ff???0?f3f??PH?fff?`?f?f?P0x?f?f?Px??f?f?P?????????????????H?3????H?f????H????x?H???n?`????h?x?3????H?33???x`?3f???x`?3???xx`?3??k?x?3???d???f????H?f3???x`?ff???0x?f???x0x?f??dx??f???]?????????????????`?3????`?f????`??????`????x?`????p?x?3????`?33????x?3f????x?3?????x?3???x?x?3???n???f????`?f3????x?ff???x??f????x??f???xx??f???k?????????????????x?3????x?f????x??????x??????x????x?x?3????x?33??????3f??????3???????3???????3???x???f????x?f3??????ff??????f???????f???????f???x????????x??????H??3?
?H??f??H????(?H????2?`????8?x????`??3?
?`??f??`????`????(?`????0?x????x??3??x??f??x?????x???? ?x????(?x?????P?x????3???H??33?x`??f3?x`???3?(x`???3?5?x???3?<????3???`??33??x??f3?
?x??3??x???3?(?x???3?2????3???x??33?????f3?
?????3??????3??????3?(?????????x????f???H??3f??x`??ff?0x???f?(0x???f?<x????f?C????f???`??3f???x??ff?x???f?x????f?(x????f?5????f???x??3f??????ff??????f?
?????f??????f?(????????(?x????????H??3???x`??f???0x??????????PP??????P????????`??3????x??f???x?????P?????(P??????<????????x??3???????f???????????????????????(????????x?x????????`??3????x??f???x???????P??????xP??????d????????`??3????x??f???x??????P????????????P????????x??3???????f?????????????????????????(??????????x????????x??3???????f??????????????????????????x????????x??3???????f?????????????????????????x????????x??3???????f?????????????????????????????????????????????????????????????????x??f??`????z??????f??????????????*???]????????????????pmn??????pmn??+c?????Placeholder Graphics<y?>?????????????????????????_Icons<y?>??>&?????????????????????????
MovieClipsR??>?????????????????????????"PublishQTProperties::QTSndSettings??CQTAudioSettings???????????????????????????????????? ?BSaved by Adobe Flash Windows 9.0 build 494 timecount = 1185895666