// JavaScript Document

//var scrollContent;
getScrollContent = function()
{
	//alert(scrollContent);
	return scrollContent;
}
<!--

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop - 130;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY - 175;
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  //document.Show.MouseX.value = tempX
  //document.Show.MouseY.value = tempY
  

  return true
}



///////////////////////// Manage events  ////////////////////////////////////////////
    function addEvent( obj, type, fn ) 
	{
		if ( obj.attachEvent ) 
		{
			obj['e'+type+fn] = fn;
            obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
            obj.attachEvent( 'on'+type, obj[type+fn] );
        }
	    else
           obj.addEventListener( type, fn, false );
    }
	
    function removeEvent( obj, type, fn ) 
	{
		if ( obj.detachEvent ) 
		{
			obj.detachEvent( 'on'+type, obj[type+fn] );
            obj[type+fn] = null;
			obj["e"+type+fn] = null;
        } 
		else
          obj.removeEventListener( type, fn, false );
    }
//////////////////////////////////////////////////////////////////////////////////////




////////////////////// Ad remove liteners ///////////////////////////////////////////
  
          function moveMe()
          {
			  document.body.style.cursor = "pointer";
			  addEvent(document.body, "mousemove", move);
	          addEvent(document.body, "mouseup", removeMove);
          }
  
  		  
		  function removeMove()
		  {
			  document.body.style.cursor = "default";
			  removeEvent(document.body, "mousemove", move);
		  }
			  
		  
		  function move()
		  {
			  var scrollContent = getScrollContent();
			  var contentHeight = document.getElementById(scrollContent).offsetHeight;
			  var offset = document.getElementById(scrollContent).offsetTop;
			  var ratio = Math.round(contentHeight / 370);
			  if (tempY < 370 && tempY > 0)
			  {
				  document.getElementById("scroll").style.top = tempY + "px" ;
				  if (contentHeight > 370)
				  {
					  if (BrowserDetect.browser == "Explorer" || BrowserDetect.browser == "Safari")
	                  {
					      document.getElementById(scrollContent).style.top = ratio * -(tempY) + 15 + "px";
					  }
					  else
					  {
						  document.getElementById(scrollContent).style.top = ratio * -(tempY) + "px";
					  }
				  }
			  }
		  }

///////////////////////////////////////////////////////////////////////////////////////////  
  

//////////// Return current position of a div (obj)  /////////////////////////////////////////////
  function getPosition(obj)
  {
	  var top = 0;
	  var left = 0;
	  
      while(obj)
	  {
		  left+= who.offsetLeft;
          top+= who.offsetTop;
          who= who.offsetParent;
      }
      return [left,top];    
   }
//////////////////////////////////////////////////////////////////////////////////////////////  


/*function getWidth()
{
	if (document.getElementById("innertext"))
    {
		return parseInt(document.getElementById("innertext").style.width.substring(0, document.getElementById("innertext").style.width.length - 3));
	}
    else if (document.all) 
    {
	    return parseInt(document.innertext.style.width.substring(0,document.innertext.style.width.length-3));
	}
    else if (document.ids.innertext)
    {
		return parseInt(document.ids.innertext.width.substring(0,document.ids.innertext.width.length-3));
    } 
}*/



/***********************************************
* Disable Text Selection script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

function disableSelection(target)
{
	if (typeof target.onselectstart!="undefined") //IE route
	{
		target.onselectstart=function(){return false}
	}
    else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	{
		target.style.MozUserSelect="none"
	}
    else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
    target.style.cursor = "default"
}








