| Line 38... |
Line 38... |
| 38 |
var rect = targ.getBoundingClientRect();
|
38 |
var rect = targ.getBoundingClientRect();
|
| 39 |
eventX = rect.left;
|
39 |
eventX = rect.left;
|
| 40 |
eventY = rect.bottom;
|
40 |
eventY = rect.bottom;
|
| 41 |
|
41 |
|
| 42 |
//Find out how close the mouse is to the corner of the window
|
42 |
//Find out how close the mouse is to the corner of the window
|
| 43 |
var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
|
43 |
var rightedge=(document.body.clientWidth||window.innerWidth)-eventX;
|
| 44 |
var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY
|
44 |
var bottomedge=(document.body.clientHeight||window.innerHeight)-eventY;
|
| 45 |
|
45 |
|
| 46 |
//position the horizontal position of the menu where the mouse was clicked
|
46 |
//position the horizontal position of the menu where the mouse was clicked
|
| 47 |
var left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX
|
47 |
var left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX
|
| 48 |
|
48 |
|
| 49 |
//if the horizontal distance isn't enough to accomodate the width of the context menu
|
49 |
//if the horizontal distance isn't enough to accomodate the width of the context menu
|