function resetBoxes(){

	document.getElementById('list-scroller').style.top = '0px';
	
}

function moveElem(movement, direction) {
	
	var div = document.getElementById('list-scroller');
	var currentPos = div.style.top;
	var topLimit = 0;
	var bottomLimit = div.clientHeight - 75;
	
	if(currentPos == ''){
		resetBoxes();
	}
	
	switch(direction){
		
		case 'up':
			newPos = parseInt(div.style.top) - movement;
			if(newPos >= (-bottomLimit)){
				div.style.top = newPos+'px';
			}
		break;
		
		case 'down':
			newPos = parseInt(div.style.top) + movement;
			if(newPos <= topLimit){
				div.style.top = newPos+'px';
			}
		break;
		
	}
	
}


//----------------------------------------------------------
// GENERIC POPUP SCRIPT WITH scroll,width,height PARAMETERS
//----------------------------------------------------------
function popup(url, name, width, height, scroll)
{

// center the window
//var toppos = (screen.availHeight-height)/2;
//var leftpos = (screen.availWidth-width)/2;

// screen resolution
var scrheight = screen.availHeight;
var scrwidth = screen.availWidth;

// where to position the window
var toppos = (scrheight-height) / 2;
var leftpos = (scrwidth-width) / 2;

// create the window command
command = "aWindow=window.open('" + url + "', '" + name +"', 'width=" + width + ",height=" + height + ",scrollbars=" + scroll + ",toolbar=no,menubar=no,top=" + toppos +",left="+ leftpos +",screenX="+ toppos +",screenY="+ leftpos +",resizable=yes')";

//alert(command);
// execute the command
eval(command);

}