// JavaScript Document
// Logic for scrolling

function scrollUp2(scrollUp,scrollDown,text1,text2)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);

	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
		
	if (two.className=="show")
	{
		//going to one
		up.src="images/scrollEmpty.gif";
		down.src="images/scrollDown.gif";
		
		one.className="show";
		two.className="hide";
	}
}

function scrollUp3(scrollUp,scrollDown,text1,text2,text3)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);

	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	
	if (three.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
	}
	else if (two.className=="show")
	{
		//going to one
		up.src="images/scrollEmpty.gif";
		down.src="images/scrollDown.gif";
		
		one.className="show";
		two.className="hide";
		three.className="hide";
	}
}

function scrollUp4(scrollUp,scrollDown,text1,text2,text3,text4)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);

	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	
	if (four.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
	}
	else if (three.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
	}
	else if (two.className=="show")
	{
		//going to one
		up.src="images/scrollEmpty.gif";
		down.src="images/scrollDown.gif";
		
		one.className="show";
		two.className="hide";
		three.className="hide";
		four.className="hide";
	}
}

function scrollUp5(scrollUp,scrollDown,text1,text2,text3,text4,text5)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);

	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	var five=document.getElementById(text5);
	
	if (five.className=="show")
	{
		//going to four
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="show";
		five.className="hide";
	}
	else if (four.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
		five.className="hide";
	}
	else if (three.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
		five.className="hide";
	}
	else if (two.className=="show")
	{
		//going to one
		up.src="images/scrollEmpty.gif";
		down.src="images/scrollDown.gif";
		
		one.className="show";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
	}
}

function scrollUp6(scrollUp,scrollDown,text1,text2,text3,text4,text5,text6)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);

	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	var five=document.getElementById(text5);
	var six=document.getElementById(text6);
	
	if (six.className=="show")
	{
	    //going to five
	    up.src="images/scrollUp.gif";
	    down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="show";
		six.className="hide";
	}
	else if (five.className=="show")
	{
		//going to four
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="show";
		five.className="hide";
		six.className="hide";
	}
	else if (four.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
		five.className="hide";
		six.className="hide";
	}
	else if (three.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
	}
	else if (two.className=="show")
	{
		//going to one
		up.src="images/scrollEmpty.gif";
		down.src="images/scrollDown.gif";
		
		one.className="show";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
	}
}

function scrollUp7(scrollUp,scrollDown,text1,text2,text3,text4,text5,text6,text7)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);

	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	var five=document.getElementById(text5);
	var six=document.getElementById(text6);
	var seven=document.getElementById(text7);
	
	if (seven.className=="show")
	{
	    //going to six
	    up.src="images/scrollUp.gif";
	    down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="show";
		seven.className="hide";
	}
	else if (six.className=="show")
	{
	    //going to five
	    up.src="images/scrollUp.gif";
	    down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="show";
		six.className="hide";
		seven.className="hide";
	}
	else if (five.className=="show")
	{
		//going to four
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="show";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
	}
	else if (four.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
	}
	else if (three.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
	}
	else if (two.className=="show")
	{
		//going to one
		up.src="images/scrollEmpty.gif";
		down.src="images/scrollDown.gif";
		
		one.className="show";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
	}
}

function scrollUp8(scrollUp,scrollDown,text1,text2,text3,text4,text5,text6,text7,text8)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);

	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	var five=document.getElementById(text5);
	var six=document.getElementById(text6);
	var seven=document.getElementById(text7);
	var eight=document.getElementById(text8);

	if (eight.className=="show")
	{
	    //going to seven
	    up.src="images/scrollUp.gif";
	    down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="show";
		eight.className="hide";
	}	
	else if (seven.className=="show")
	{
	    //going to six
	    up.src="images/scrollUp.gif";
	    down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="show";
		seven.className="hide";
		eight.className="hide";
	}
	else if (six.className=="show")
	{
	    //going to five
	    up.src="images/scrollUp.gif";
	    down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="show";
		six.className="hide";
		seven.className="hide";
		eight.className="hide";
	}
	else if (five.className=="show")
	{
		//going to four
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="show";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
		eight.className="hide";
	}
	else if (four.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
		eight.className="hide";
	}
	else if (three.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
		eight.className="hide";
	}
	else if (two.className=="show")
	{
		//going to one
		up.src="images/scrollEmpty.gif";
		down.src="images/scrollDown.gif";
		
		one.className="show";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
		eight.className="hide";
	}
}

function scrollDown2(scrollUp,scrollDown,text1,text2)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);
	
	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	
	if (one.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollEmpty.gif";
		
		one.className="hide";
		two.className="show";
	}
}

function scrollDown3(scrollUp,scrollDown,text1,text2,text3)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);
	
	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	
	if (one.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
	}
	else if (two.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollEmpty.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
	}
}

function scrollDown4(scrollUp,scrollDown,text1,text2,text3,text4)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);
	
	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	
	if (one.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
	}
	else if (two.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
	}
	else if (three.className=="show")
	{
		//going to four
		up.src="images/scrollUp.gif";
		down.src="images/scrollEmpty.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="show";
	}
}

function scrollDown5(scrollUp,scrollDown,text1,text2,text3,text4,text5)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);
	
	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	var five=document.getElementById(text5);
	
	if (one.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
		five.className="hide";
	}
	else if (two.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
		five.className="hide";
	}
	else if (three.className=="show")
	{
		//going to four
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="show";
		five.className="hide";
	}
	else if (four.className=="show")
	{
		//going to five
		up.src="images/scrollUp.gif";
		down.src="images/scrollEmpty.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="show";
	}
}

function scrollDown6(scrollUp,scrollDown,text1,text2,text3,text4,text5,text6)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);
	
	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	var five=document.getElementById(text5);
	var six=document.getElementById(text6);
	
	if (one.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
	}
	else if (two.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
		five.className="hide";
		six.className="hide";
	}
	else if (three.className=="show")
	{
		//going to four
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="show";
		five.className="hide";
		six.className="hide";
	}
	else if (four.className=="show")
	{
		//going to five
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="show";
		six.className="hide";
	}
	else if (five.className=="show")
	{
		//going to six
		up.src="images/scrollUp.gif";
		down.src="images/scrollEmpty.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="show";
	}
}

function scrollDown7(scrollUp,scrollDown,text1,text2,text3,text4,text5,text6,text7)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);
	
	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	var five=document.getElementById(text5);
	var six=document.getElementById(text6);
	var seven=document.getElementById(text7);
	
	if (one.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
	}
	else if (two.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
	}
	else if (three.className=="show")
	{
		//going to four
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="show";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
	}
	else if (four.className=="show")
	{
		//going to five
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="show";
		six.className="hide";
		seven.className="hide";
	}
	else if (five.className=="show")
	{
		//going to six
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="show";
		seven.className="hide";
	}
	else if (six.className=="show")
	{
		//going to seven
		up.src="images/scrollUp.gif";
		down.src="images/scrollEmpty.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="show";
	}
}

function scrollDown8(scrollUp,scrollDown,text1,text2,text3,text4,text5,text6,text7,text8)
{
	var up=document.getElementById(scrollUp);
	var down=document.getElementById(scrollDown);
	
	var one=document.getElementById(text1);
	var two=document.getElementById(text2);
	var three=document.getElementById(text3);
	var four=document.getElementById(text4);
	var five=document.getElementById(text5);
	var six=document.getElementById(text6);
	var seven=document.getElementById(text7);
	var eight=document.getElementById(text8);
	
	if (one.className=="show")
	{
		//going to two
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="show";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
		eight.className="hide";
	}
	else if (two.className=="show")
	{
		//going to three
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="show";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
		eight.className="hide";
	}
	else if (three.className=="show")
	{
		//going to four
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="show";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
		eight.className="hide";
	}
	else if (four.className=="show")
	{
		//going to five
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="show";
		six.className="hide";
		seven.className="hide";
		eight.className="hide";
	}
	else if (five.className=="show")
	{
		//going to six
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="show";
		seven.className="hide";
		eight.className="hide";
	}
	else if (six.className=="show")
	{
		//going to seven
		up.src="images/scrollUp.gif";
		down.src="images/scrollDown.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="show";
		eight.className="hide";
	}
	else if (seven.className=="show")
	{
		//going to eight
		up.src="images/scrollUp.gif";
		down.src="images/scrollEmpty.gif";
		
		one.className="hide";
		two.className="hide";
		three.className="hide";
		four.className="hide";
		five.className="hide";
		six.className="hide";
		seven.className="hide";
		eight.className="show";
	}
}
