var browser = navigator.appName;
var isLoad = false;
var isCadcursorShow = false
var ver = parseInt(navigator.appVersion);
var docHeight, docWidth 

if ((browser == "Netscape" && ver >= "4") || (browser == "Microsoft Internet Explorer" && ver >= "4"))
	isCadcursorShow = true;
	
if ( browser == "Netscape"  && ver >= "4")
{
	window.captureEvents(Event.MOUSEMOVE);
	window.onMouseMove = SetCursor;
}
	  
function init()
{
	if(isCadcursorShow)
	{
		isLoad = true
		docHeight = main.offsetHeight
		docWidth = main.offsetWidth
	}
}
	  
function SetCursor(ev)   
{  
	if(!isLoad)
		return

	if (browser == "Netscape")
	{
		document.layers['LINEH'].top = ev.pageY - 1; 
		document.layers['LINEH'].left = self.pageXOffset;      
		document.layers['LINEV'].left = ev.pageX - 1;      
		document.layers['LINEV'].top = self.pageYOffset;           
	}  
	else   
	{   
		if(event.clientY - 1 + document.body.scrollTop < docHeight)
		{
		 document.all.item('LINEH').style.top = event.clientY - 1 + document.body.scrollTop;  
	 	 document.all.item('LINEH').style.left = document.body.scrollLeft;  
		 }
		 if(event.clientX - 1 + document.body.scrollLeft < docWidth)
		 {
		 document.all.item('LINEV').style.left = event.clientX - 1 + document.body.scrollLeft;   
		 document.all.item('LINEV').style.top = document.body.scrollTop;    	 
		 }
	}  

}
