

		
		
function initiateScroll(){ 
    // may not want to push back up to the top, maybe just make sure it's aligned at bottom
		document.getElementById('iconsDiv').style.left = "0";
		document.getElementById('iconsDiv').style.top = "0";
		document.getElementById('prevArrow').style.visibility = "hidden";
		//disableArrow("iconsDivContainer", "iconsDiv", 'nextArrow');
}
		
    function disableArrow(containerID, divID, arrowImgID) {
        var containerObj = document.getElementById(containerID);
        var divObj = document.getElementById(divID);
        
        if (parseInt(containerObj.style.width) >= parseInt(divObj.offsetWidth)) {
            document.getElementById(arrowImgID).style.visibility = "hidden";
        }
        else {
            document.getElementById(arrowImgID).style.visibility = "visible";
        }
    }


	function scroll(direction, div, arrowImgID1, arrowImgID2) {
		
		var move=0;	
		var scrollBy=120;

		var scrollingDiv=document.getElementById(div);
		var currentLeft=parseInt(scrollingDiv.style.left);
		var currentTop=parseInt(scrollingDiv.style.top);
		
		var container = document.getElementById(div+'Container');
		var containerWidth = parseInt(container.style.width);
		var containerHeight = parseInt(container.style.height);
		
		var scrollingWidth;
		var scrollingHeight;
		var arrowImg1 = document.getElementById(arrowImgID1);
		var arrowImg2 = document.getElementById(arrowImgID2);

		if (navigator.userAgent.indexOf('Firefox')>0) {
			scrollingWidth = parseInt(document.getElementById("scrollContainer").style.width) + containerWidth;
			scrollingHeight = 0;
		}
		else {
	    		scrollingWidth=scrollingDiv.offsetWidth;
	    		scrollingHeight=scrollingDiv.offsetHeight;
		}
		
		switch (direction) {
		    case 'right':
		    	var newLeft=currentLeft-scrollBy;
			var hDiff=scrollingWidth+newLeft;

			    if (hDiff>=containerWidth){
				    move=parseInt(scrollingDiv.style.left)-scrollBy;
				    arrowImg2.style.visibility='visible';
                		}
			    else {
				    move=(containerWidth-scrollingWidth-5);
				    arrowImg1.style.visibility='hidden';
				    arrowImg2.style.visibility='visible';				
               			 }
                		scrollingDiv.style.left = move+'px';
                		break;
                
            case 'left':            
			    var newLeft=currentLeft+scrollBy;
			    if (newLeft<0) {
				    move=parseInt(scrollingDiv.style.left)+scrollBy;
				    arrowImg2.style.visibility='visible';
			    }
			    else {
				    move='0';
				    arrowImg1.style.visibility='hidden';
				    arrowImg2.style.visibility='visible';
			    }     
			    scrollingDiv.style.left = move+'px';       
		        break;
		        
		        
		    case 'up':
		    	var newTop=currentTop+scrollBy;
			    var hDiff=scrollingHeight+newTop;

			    if (hDiff>containerHeight){
				    move=parseInt(scrollingDiv.style.top)+scrollBy;
                }
			    else {
				    move=(containerHeight+scrollingHeight+5);			
                }
                if (move <= 0) {
                    scrollingDiv.style.top = move+'px';
                }
		        break;
		        
		    case 'down':
		    	var newTop=currentTop-scrollBy;
			    var hDiff=scrollingHeight-newTop;
			    

			    if (hDiff>containerHeight){
				    move=parseInt(scrollingDiv.style.top)-scrollBy;
                }
			    else {
				    move=(containerHeight-scrollingHeight);			
                }
                if (Math.abs(move) <= (parseInt(scrollingDiv.style.height)-containerHeight)) {
                    scrollingDiv.style.top = move+'px';
                }
		        break;
		    
		    default:
		        break;
		        
		}
		
    }