function mousePos(E)
{
    var mouse={x:0,y:0};
    mouse.x = (isNS4) ? E.pageX :
            (isIE6) ? event.clientX +
                    document.documentElement.scrollLeft +
                    document.body.scrollLeft :
            (isIE)  ? event.clientX + window.scrollX :
                    E.clientX + window.pageXOffset;
    mouse.y = (isNS4) ? E.pageY :
            (isIE6) ? event.clientY +
                    document.documentElement.scrollTop +
                    document.body.scrollTop :
            (isIE)  ? event.clientY + window.scrollY :
                    E.clientY + window.pageYOffset;
    return mouse;
}    

function mouseRelative(E,obj)
{
    var mouse = mousePos(E);
    var p=getEid(obj);
    var pos = findPosition(p);
    mouse.x=mouse.x-pos.x;
    mouse.y=mouse.y-pos.y;
    return mouse;
}

function mouseFollow(E, obj) 
{
    var mouse=mousePos(E);
    var item=getEstyle(obj);
    if (!(isIE))
	{
		mouse.x+="px";
		mouse.y+="px";
	}
     item.left=mouse.x;
	item.top=mouse.y;
}
function mouseFollowCenter(E, obj) 
{
    var mouse=mousePos(E);
    var item=getEstyle(obj);
    var ele=getEid(obj);
    mouse.x+=5
    mouse.y-=(ele.clientHeight/2)
    //alert(ele.clientWidth);
    if (!(isIE))
	{
		mouse.x+="px";
		mouse.y+="px";
	}
     item.left=mouse.x;
	item.top=mouse.y;
}
