<!--
// Global variables for platform branching
var Doc, Sty, Htm, ScreenWidth, ScreenHeight

function Is()
{
	var agent  = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.ns    = ((agent.indexOf('mozilla')!=-1) &&	 ((agent.indexOf('spoofer') == -1) &&	 (agent.indexOf('compatible') == -1))); 
	this.ns2 = (this.ns && (this.major == 2));
	this.ns3 = (this.ns && (this.major == 3));
	this.ns4 = (this.ns && (this.major >= 4));
	this.ie  = (agent.indexOf("msie") != -1);
	this.ie3 = (this.ie && (this.major == 2));
	this.ie4 = (this.ie && (this.major >= 4));
	this.op3 = (agent.indexOf("opera") != -1);
}

var is = new Is();

if(is.ie4)
{
		Doc = "document.all";
		Sty = ".style";
		Htm = "";
}
else
{
	if(is.ns4)
	{
		Doc = "document";
		Sty = "";
		Htm = ".document";
	}
}

//Vars
var imgwidths=new Array()
imgwidths[0]=169;
imgwidths[1]=169;	//338
imgwidths[2]=169;	//507
imgwidths[3]=220;	//727
imgwidths[4]=169;	//896
imgwidths[5]=220;	//1116
imgwidths[6]=169;	//1285
imgwidths[7]=169;	//1454

var ImgArray = new Array()
ImgArray[0]='<a href="UnionSquare.html" target="_self"><img src="images/LaborDay2000.gif" width="169" height="65" alt="" border="0"></a>';
ImgArray[1]='<a href="mississippi.html" target="_self"><img src="images/Mississippi.gif" width="169" height="65" alt="" border="0"></a>';
ImgArray[2]='<a href="virtualmayday.html" target="_self"><img src="images/MayDay2000.gif" width="169" height="65" alt="" border="0"></a>';
ImgArray[3]='<a href="silkwood.html" target="_self"><img src="images/WomansDay2000.gif" width="220" height="65" alt="" border="0"></a>';
ImgArray[4]='<a href="eyesontheprize.html" target="_self"><img src="images/EyesOnThePrize.gif" width="169" height="65" alt="" border="0"></a>';
ImgArray[5]='<a href="harvestofshame.html" target="_self"><img src="images/ThanksgivingDay1999.gif" width="220" height="65" alt="" border="0"></a>';
ImgArray[6]='<a href="us97.html" target="_self"><img src="images/UnionSummer97.gif" width="169" height="65" alt="" border="0"></a>';
ImgArray[7]='<a href="motown.html" target="_self"><img src="images/ActionMotown97.gif" width="169" height="65" alt="" border="0"></a>';

var TotalWidth=1454;			//Summ of all Image Widths
var EndGraphicWidth = 169;	//Width of Last Graphic to be loaded.
var TotalNumImgs = 8;		//Total number of images.
var TotalHeight=65;			//Height of tallest image.
var SliderTitleWidth = 88	//Width of Slider Title
var BackForwardAmt = 50		//39;	//Amount of pixels to move back or forward
							//when the appropro button is clicked.
var ClipAmt = 1;			// Use where above TotalWidth is an odd number.
//var 						//ClipAmt = 2; Use where above TotalWidth is an even number.
var ScrollSpeed = 40;//1;	//Speed of scrolling. Lower number means faster speed.
							//40 70 is nice and slow.
var ScrollBGColor = "#000000";	//Background color of scroll area.
						
//DO NOT ALTER VARS BELOW THIS LINE

var LastClip = ClipAmt;
var TimerID = null;
var DoBackNow=0;
var DoForwardNow = 0;
var DoEndNow = 0;
var GoToEndAmt = ( TotalWidth - EndGraphicWidth );
var ResButIsOn = 0;		//State of Resume Button.
var SliderBGWidth = 248;
var ButtonsWidth = 107;
var ScrollerTop = 0;//-60; //145;	//Position from bottom where scroller will appear.
 						//96 + 65(imgs ht) + 10px space.
var ButTop = 96; //96;	//79;	//83 for IE;	//78; //Top Pos of button
var SliderCntrlPos = -180; //-110 40;	// Position of slider control from page bottom
							// And Search Buts Greater Negative Num  lower on page.
if(navigator.appName.indexOf("Microsoft") !=-1)
{
ScrollerTop = -110;	// More is higher on page 140 Full Page
SliderCntrlPos = -230;
ButTop = 96;
}
else
{
ScrollerTop = -120;
//ButTop = 160;
SliderCntrlPos = -250; //-110 40;	// Position of slider control from page bottom
							// And Search Buts Greater Negative Num  lower on page.
}



var ButStartPos = 0			//ScrollButton Start Pos
var ButCurPos = 0;			//Used to determine Current position of dragged button.
var ButOldPos = 0
var SIncrements = TotalWidth/11;
//var SIncrements = 250/11;
//Begin Slider Control Vars
var selectedObj;		// Global holds reference to selected element
var offsetX, offsetY;	// Globals hold location of click relative to element
// Drag an element
//var ButTop = 96;	//79;	//83 for IE;	//78; //Top Pos of button
var SliderTop = 0;
//var SliderCntrlPos = 40;	// Position of slider control from page bottom
//var ButTop = -18; //Top Pos of button
var ButtonWidth=21;
var SButLeftLimit = 53;	//3 + left pos
var SButRightLimit =275 ;	//489; 	//482; //Width of scroll background(250 
//var SliderBGWidth = 248;
var MIsMoving = 0;
var MDown = 0;

//End Slider Control Vars

//BEGIN SLIDER CONTROL FUNCTIONS
// Position an object at a specific pixel coordinate
function shiftTo(obj, x, y) 
{
	if (is.ns4) 
	{
		obj.moveTo(x,y)
	} 
	else 
	{
		obj.pixelLeft = x
		obj.pixelTop = y
	}
}

// Find out which element has been clicked on
function setSelectedElem(evt) 
{
	if (is.ns4) 
	{
		var clickX = evt.pageX
		var clickY = evt.pageY
		var testObj = document.layers.SliderButt;
		//for (var i = document.layers.length - 1; i >= 0; i--) 
		//{
			//testObj = document.layers[i]
				if ((clickX > testObj.left) && 
					(clickX < testObj.left + testObj.clip.width) && 
					(clickY > testObj.top) && 
					(clickY < testObj.top + testObj.clip.height)) 
					{
					selectedObj = testObj
						//if (selectedObj) 
						//{
							////setBorderColor(selectedObj, "red")
							//setZIndex(selectedObj, 100)
							return
						//}
					}
		//}
	} 
	else 
	{
		//var imgObj = window.event.srcElement
		
		//selectedObj = imgObj.parentElement.style
		
		selectedObj = document.all.SliderButt.style
		if (selectedObj) 
		{//alert("Here");
			//setBorderColor(selectedObj, "red")
			//setZIndex(selectedObj,100)
			
			MDown = 1;

			return
		}
	}
selectedObj = null
return
}

// MOUSEMOVE
//var DragImgsRight = 87;
var DraggingImgs
var DraggingImgs2
var DragingRight
var DragingLeft
var Increaser = 183;







function GetButPos()
{
if( ButCurPos >=ButStartPos && ButCurPos <=(ButStartPos + SIncrements) )
		return 1; 
else if( ButCurPos >ButStartPos + SIncrements  && ButCurPos<=(ButStartPos + (SIncrements * 2)) )
		return 2; 
else if ( ButCurPos >ButStartPos + (SIncrements * 2) && ButCurPos<=ButStartPos + (SIncrements * 3) )
		return 3;
else if ( ButCurPos >ButStartPos + (SIncrements * 3) && ButCurPos<=ButStartPos + (SIncrements * 4) )
		return 4;
else if (ButCurPos >ButStartPos + (SIncrements * 4) && ButCurPos<=ButStartPos + (SIncrements * 5))
		return 5;
else if (ButCurPos >ButStartPos + (SIncrements * 5) && ButCurPos<=ButStartPos + (SIncrements * 6))
		return 6;
else if (ButCurPos >ButStartPos + (SIncrements * 6) && ButCurPos<=ButStartPos + (SIncrements * 7))
		return  7;
else if (ButCurPos >ButStartPos + (SIncrements * 7) && ButCurPos<=ButStartPos + (SIncrements * 8))
		return 8;
else if (ButCurPos >ButStartPos + (SIncrements * 8) && ButCurPos<=ButStartPos + (SIncrements * 9))
		return 9;
else if (ButCurPos >ButStartPos + (SIncrements * 9) && ButCurPos<=ButStartPos + (SIncrements * 10))
		return 10;
}
// Set event capture for Navigator
function setNSEventCapture() 
{
	if (is.ns4) 
	{
		document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP)
	}
}
//END SLIDER CONTROL FUNCTIONS

//BEGIN DIRECTIONAL BUTTONS CONTROL FUNCTIONS
function whichbut(it)	//Which scroll direction button pressed.
{
	switch(it)
	{
	
		case 1:
			//START BUT
			ResetScroller(1);
			break;
		case 2:
			//LEFT BUT
			//alert("left But");
			//ScrollSpeed = 10
			//Scroller();
			//break;
			if(!ResButIsOn)
			ResetScroller(2);
		break;
		case 3:
			//STOP BUT
			ResetScroller(3);
		break;
		case 4:
			//RIGHT BUT
			if(!ResButIsOn)
			{
			ResumeButOff();
			ResetScroller(4);	
			}
		break;
		case 5:
			//END BUT
			ResetScroller(5);	
		break;	
		case 6:
			//RESUME BUT
			ResumeButOff();
			Scroller();
		break;	
		default:
			alert("ERROR: Which button switch!");
		break;	
	}
return;	
}

function Scroller()	//The scrolling machine.
{
	var Dist, Dist2;
	if(is.ie4)
	{
	
		Dist = document.all.SlidingImgs.style.left;
		Dist2 = Dist.substr(0,(Dist.length-2))
		Dist=Dist2;
	}
	else
	{
		Dist = parseInt( eval(Doc + '.SlidingImgs' + Sty + '.left'));
	}
	
			
	if(!DoEndNow)
	{
		eval(Doc + '.SlidingImgs' + Sty + '.left=' + (Dist - ClipAmt));
	
		//move SlidingImgs2 over 
		eval(Doc + '.SlidingImgs2' + Sty + '.left=' + (SliderTitleWidth + TotalWidth - LastClip ) );
			
		LastClip+=ClipAmt;
		//At end so reset.	
		if(LastClip>=TotalWidth)
		{
			ResetScroller(0);
		}	
		if(DoBackNow)
		{
			ClipAmt=1;
			whichbut(2);
			DoBackNow=0;
		}
		if(DoForwardNow)
		{
			ClipAmt=1;
			whichbut(4)
			DoForwardNow=0;
		}
TimerID=setTimeout("Scroller()",ScrollSpeed)	
	}	
	else
	{
		eval(Doc + '.SlidingImgs' + Sty + '.left=' + (SliderTitleWidth - ClipAmt) );
		eval(Doc + '.SlidingImgs2' + Sty + '.left=' + (SliderTitleWidth + (TotalWidth - ClipAmt)+1) );
		DoEndNow=0;
		ClipAmt=1;
		LastClip=(TotalWidth-EndGraphicWidth);

		clearTimeout(TimerID)
		ResumeButOn();
	}	
	
}
function ResetScroller(gotit)	//Reset scroler when necessary.
{

	var Dist = parseInt( eval(Doc + '.SlidingImgs' + Sty + '.left'));
	
	switch (gotit)
	{
	
		case 0:	//General Reset
			eval(Doc + '.SlidingImgs' + Sty + '.left=' + (SliderTitleWidth));
			eval(Doc + '.SlidingImgs2' + Sty + '.left=' + (SliderTitleWidth + TotalWidth) );
			LastClip= ClipAmt; //0;	
		break;
		
		case 1:	//Go To FIRST
			clearTimeout(TimerID)
		eval(Doc + '.SlidingImgs' + Sty + '.left=' + (SliderTitleWidth));
		eval(Doc + '.SlidingImgs2' + Sty + '.left=' + (SliderTitleWidth + TotalWidth) );
			LastClip= ClipAmt;  //0;
			ResButIsOn = 1;
			ResumeButOn();
		break;
		
		case 2:	//Go to PREVIOUS
			
		if(!ResButIsOn)
		{	
			if( !DoBackNow )
			{
				if(Dist <= 0 ) //if(Dist < SliderTitleWidth )
				{  //Enough advance to move something back.
					ClipAmt-= BackForwardAmt
					DoBackNow=1;	
				}
				else
				{
					ClipAmt=1;
				}	
			}
		}	
		break;
		
		case 3:	// STOP But
			clearTimeout(TimerID)
			ResButIsOn = 1;
			ResumeButOn();
		break;
		
		case 4:	//Goto Next
			if(!ResButIsOn)
			{
				if(!DoForwardNow)
				{
					ClipAmt+=BackForwardAmt
					DoForwardNow=1;	
				}
			}
		break;
		
		case 5:	//GoTo End
		ResButIsOn = 1;
			if(!DoEndNow)
			{
				ClipAmt+=GoToEndAmt;
				DoEndNow=1;
			}
		break;
		case 6:	//Started Using Scroller
		//clearTimeout(TimerID)
			//ResButIsOn = 1;
			//ResumeButOn();
		break; 
		case 7:	//Finished Using Scroller
					
			//ResButIsOn = 1;
			//ResumeButOn();
		break; 
		default:
		break;
	}

}

function ResumeButOff()
{	//if(ResButIsOn)
	eval(Doc + '.ResumeBut' + Sty + '.visibility="hidden"');	
	ResButIsOn=0;
}

function ResumeButOn()
{
	eval(Doc + '.ResumeBut' + Sty + '.visibility="visible"');
	ResButIsOn=1;
}

// Assign event handlers used by both Navigator and IE
function init() 
{
	if (is.ie4) 
	{
		ScreenWidth = document.body.clientWidth;
		ScreenHeight=document.body.clientHeight;
	}
	else
	{
		setNSEventCapture();
		ScreenWidth=innerWidth;
		ScreenHeight=innerHeight;
	}
		

		eval(Doc + '.SliderTitle' + Sty + '.left=0');	
		eval(Doc + '.SlidingImgs' + Sty + '.left='+SliderTitleWidth );	
		DraggingImgs = (parseInt(eval(Doc + '.SlidingImgs' + Sty + '.left') ))
		eval(Doc + '.SlidingImgs2' + Sty + '.left='+ (SliderTitleWidth+TotalWidth) );	
		DraggingImgs2 = (parseInt(eval(Doc + '.SlidingImgs2' + Sty + '.left') ))
		eval(Doc + '.CoverWindow' + Sty + '.left='+ (SliderTitleWidth+TotalWidth) );	

		eval(Doc + '.SearchButts' + Sty + '.left='+ ( (ScreenWidth/2)- ( (ButtonsWidth - 35)/2) ) );	
		eval(Doc + '.ResumeBut' + Sty + '.left='+ ( (ScreenWidth/2) + (ButtonsWidth - 65)));	
		//Used for Slider
		//eval(Doc + '.SliderBack' + Sty + '.left='+ ( (ScreenWidth/2)- (SliderBGWidth/2) ) );	
		//eval(Doc + '.SliderButt' + Sty + '.left='+ ( (ScreenWidth/2)- (SliderBGWidth/2)+4 ) );	
		
		eval(Doc + '.SliderTitle' + Sty + '.top='+ (ScreenHeight - ScrollerTop) );	
		eval(Doc + '.SlidingImgs' + Sty + '.top='+ (ScreenHeight - ScrollerTop) );	
		eval(Doc + '.SlidingImgs2' + Sty + '.top='+ (ScreenHeight - ScrollerTop) );	

		eval(Doc + '.CoverWindow' + Sty + '.top='+ (ScreenHeight - ScrollerTop) );	
		eval(Doc + '.CoverWindow' + Sty + '.width='+ (TotalWidth) );	
		eval(Doc + '.CoverWindow' + Sty + '.height='+ (TotalHeight) );	
				
		ButTop = parseInt((ScreenHeight - SliderCntrlPos) - 3 )
		ButStartPos = parseInt(( (ScreenWidth/2)- (SliderBGWidth/2)+4 ) );	
		eval(Doc + '.SearchButts' + Sty + '.top='+ ( (ScreenHeight) - (SliderCntrlPos + 35)) );	
		eval(Doc + '.ResumeBut' + Sty + '.top='+ ( (ScreenHeight) - (SliderCntrlPos + 35)) );	
		//Used for Slider
		//eval(Doc + '.SliderBack' + Sty + '.top='+ (ScreenHeight - SliderCntrlPos) );	
		//eval(Doc + '.SliderButt' + Sty + '.top='+ (ButTop) );		

		eval(Doc + '.SearchButts' + Sty + '.visibility="visible"');
		eval(Doc + '.ResumeBut' + Sty + '.visibility="hidden"');
		//Used for Slider
		//eval(Doc + '.SliderBack' + Sty + '.visibility="visible"');
		//eval(Doc + '.SliderButt' + Sty + '.visibility="visible"');
		eval(Doc + '.SlidingImgs2' + Sty + '.visibility="visible"');
		eval(Doc + '.CoverWindow' + Sty + '.visibility="visible"');
		//#SliderTitle  {position:absolute; left:-800;  top: 296; visibility:hidden; z-index:1; }

SButLeftLimit = parseInt(( (ScreenWidth/2) - (SliderBGWidth/2) + 4)) //4 is gap.
SButRightLimit = parseInt( ( (ScreenWidth/2) + (SliderBGWidth/2) - (ButtonWidth + 1) ) )
//SButRightLimit = ( (ScreenWidth/2) - (ButtonWidth +4) )
//Test REMOVE
//document.all.BMPos.value = "CurPos: " + ButCurPos;
//document.all.BPos.value =  "OldPos: " + ButOldPos;
//END Test REMOVE
//document.onmousedown = engage
//document.onmousemove = dragIt
//document.onmouseup = release
onresize=init;
}
//END Directional Buttons Control Functions
// BEGIN TESTING FUNCTIONS

// END TEST FUNCTIONS
