var ostat = false;
var width, height;
var newscontent;
function scrollstop() {
	if(document.getElementById){
	 newscontent=document.getElementById("news");
	
	//alert("newscontent "+newscontent);
	}
	else if(document.all){
		
	newscontent=document.all.news;

    }
	else if(document.layers){
		newscontent=document.layers.news;
	}
//newscontent.scrollAmount = 0;
newscontent.setAttribute("scrollAmount", "0");
ostat = true;
//document.write("stop");
//alert(" newscontent.scrollAmount "+ newscontent.scrollAmount);
}
function scrollstart(event) {
	newscontent=document.getElementById("news");
newscontent.setAttribute("scrollAmount", "2");
ostat = false;
}
 
 /*function windowsize(){
   if (resizingWindowIsIE()) {
		// All modern versions of IE, including 7, give the
		// usable page dimensions here. 
		width = parseInt(document.documentElement.clientWidth); 	
		height = parseInt(document.documentElement.clientHeight); 	
	} else if (resizingWindowIsOpera()) {
		// This is slightly off: the width and height will include
		// scrollbar space we can't really use. Compensate by
		// subtracting 16 pixels of scrollbar space from the width
		// (standard in Opera). Fortunately, in Firefox and Safari,
		// we can use a third method that gives accurate results
		// (see below).
		width = parseInt(window.innerWidth) - 16;
		// If there is a horizontal scrollbar this will be
		// 16 pixels off in Opera. I can live with that.
		// You don't design layouts on purpose with
		// horizontal scrollbars, do you? (Shudder)
		height = parseInt(window.innerHeight);
	} else {
		// Other non-IE browsers give the usable page dimensions here.
		// We grab the info by discovering the visible dimensions 
		// of a hidden 100% x 100% div. Opera doesn't like this
		// method any more than IE does. Fun!
		testsize = document.getElementById('resizingWindowTestSizeDiv');
		width = testsize.scrollWidth;
		height = testsize.scrollHeight;
		
	}

    scrolldir();
 }
*/
function scrolldir() {
	//alert("width  "+width+"  height "+height);
newscontent=document.getElementById("news");
//mid = document.body.clientHeight ;
mid=height*40/100;
//document.write("newmx"+mousex+"  newmy"+mousey);
if(mousey>mid && mousey<(height*65/100) && mousex>(width*64/100) && mousex<(width*80/100)) {
//	alert("ostat  "+ostat);
if(ostat == false) {
//document.write(mousex);
//document.write("newmx"+mousex+"  newmy"+mousey);
//document.write("mx"+mousex+"  my"+mousey+"  oldmx"+oldmousex+"  oldmy"+oldmousey);
speed = (mousey - mid) / 25;
//alert("speed"+speed);
newscontent.setAttribute("scrollAmount", speed);

}
newscontent.setAttribute("direction", "down");
//newscontent.direction = "down";
}
else if(mousey<mid && mousey>(height*20/100) && mousex>(width*64/100) && mousex<(width*80/100)) {
if(ostat == false) {
//alert("lesser");
speed = (mid - mousey) / 25;
newscontent.setAttribute("scrollAmount", speed);
}
newscontent.setAttribute("direction", "up");
   }
}

if (!document.all) {
window.captureEvents(Event.MOUSEMOVE);
function nsmouse(evnt) {
	mousex=evnt.pageX;
mousey = evnt.pageY;
//alert("mousex "+mousex+"  mousey "+mousey);
windowsize();
}
window.onmousemove = nsmouse;
}
else  {
function iemouse() {
mousey = event.y;
mousex = event.x;
//alert("mx"+mousex+"  my"+mousey);
//windowsize();
}
window.document.onmousemove = iemouse;
}