 //var maxa = Number(document.getElementById("hdnNewsCount").value);		// Total number of cells (exculding repeating cells)
			var maxa;
		    var sdur = 1000;	// Scrolling animation duration
		    var dirc = true;	// true: Normal Direction - false: Reverse Direction
		    var scrid = 1;
		    var scriv;

		    function scrollme(){ 
			    var scroll = new Fx.Scroll('divNewsScroller', {
						    wait: false,
						    duration: sdur,
						    transition: Fx.Transitions.Quad.easeInOut
			    });

			    if (dirc){					
				    scrid++;
				    if (scrid > maxa-1) {
					    scrid = 1; 
					    // Setting duration to 0 for last element to first element animation, to start animation without delay while repeating
					    scroll = new Fx.Scroll('divNewsScroller', {
						    wait: false,
						    duration: 0,
						    transition: Fx.Transitions.Quad.easeInOut
					    });
					    setTimeout(scrollme, 100);
				    }
				    scroll.toElement('content' + scrid);
			    }else{
				    scrid--;
				    if (scrid < 1) {
					    scrid = maxa + 1; 
					    // Setting duration to 0 for first element to last element animation, to start animation without delay while repeating
					    scroll = new Fx.Scroll('divNewsScroller', {
						    wait: false,
						    duration: 0,
						    transition: Fx.Transitions.Quad.easeInOut
					    });
					    setTimeout(scrollme, 100);
				    }
				    scroll.toElement('content' + scrid);
			    }
				/*if(scrid==maxa)
				{
					dirc=true;
					scrid = 0;
					//scroll='';
					//document.getElementById('divNewsScroller').innerHTML='';
					scrollInit();
				}*/
		    }

		    function frwd(){
			    dirc = true;
		    }
    		
		    function bkwd(){
			    dirc = false;
		    }

		    function stp(){
			    clearInterval(scriv);
		    }

		    function srt(){
			    stp();
			    scrollInit();
		    }

		    function scrollInit(){
				maxa = document.getElementById("hdnNewsCount").value;
			
		        if (maxa > 3)
		        {
			        scriv = setInterval(scrollme, 3000);
                }
		    }