function getAscendingLefts(elem)
{
	if (elem == null)
		return 0;
	else
		return elem.offsetLeft + getAscendingLefts(elem.offsetParent);
} 
function getAscendingTops(elem)
{
	if (elem == null)
		return 0;
	else
		return elem.offsetTop + getAscendingTops(elem.offsetParent);
}


//document.onselectstart=new Function("return false");document.ondragstart=new Function("return false");


function right(e) {
if (event.button==2||event.button==3)
  {
     var msg = "Sorry, you don't have permission to right-click.";
     alert(msg); return false;
  }
}

function trap() 
  {
  if(document.images)
    {
    for(i=0;i<document.images.length;i++)
      {
      document.images[i].onmousedown = right;
      document.images[i].onmouseup = right;
      }
    }
  }

