// JavaScript Document
var Rows = 2;
var RowHeight = 90;
var CellsHeight = Rows * RowHeight;
var top = 18;
var time;
var Speed = 2;

var i = 0;
// Function on over top arrow
function TopArrow(Akcija){
	var Cells = document.getElementById("tbl_cell");
	while(Akcija == 'Start'){
		top = top - 1;
		if(top > - CellsHeight + RowHeight){
			Cells.style.top = top;
		}	
	}
}

function SelectTable(Red1, Red2, Problem, Solution, src){
	var oRed1 = document.getElementById("Red1");
	var oRed2 = document.getElementById("Red2");
	var oProblem = document.getElementById("Problem");
	var oSolution = document.getElementById("Solution");	
	var oimg_main = document.getElementById("img_main");	

if(navigator.appName == "Microsoft Internet Explorer"){
	oRed1.innerText = Red1;
	oRed2.innerText = Red2;
	oProblem.innerText = Problem;
	oSolution.innerText = Solution;	
	img_main.src = src;
} else{
	oRed1.textContent = Red1;
	oRed2.textContent = Red2;
	oProblem.textContent = Problem;
	oSolution.textContent = Solution;	
	oimg_main.src = src;
}





}


function TopStart(){
	Toprealscroll();	
}

function TopStop(){
	clearTimeout(time);
}

function BottomStart(){
	Bottomrealscroll();	
}

function BottomStop(){
	clearTimeout(time);
}


function Toprealscroll()
{
	var Cells = document.getElementById("tbl_cell");
	if(top <= 18){
		top += +Speed;
	}

	Cells.style.top = top + "px";
	time = setTimeout('Toprealscroll()',10);
}
function Bottomrealscroll()
{
	var Cells = document.getElementById("tbl_cell");
	if(top > -CellsHeight + RowHeight){
		top += -Speed;
	}
	Cells.style.top = top + "px";
	time = setTimeout('Bottomrealscroll()',10);
}

