
function nocontextmenu() {
    event.cancelBubble = true
    event.returnValue = false;
    return false;
}

function norightclick(e) {
    if (window.Event) {
    if (e.which == 2 || e.which == 3)
    return false;
    } 
else
    if (event.button == 2 || event.button == 3) { 
    event.cancelBubble = true
    event.returnValue = false;
    return false;
    }
}

document.oncontextmenu = nocontextmenu; 
document.onmousedown = norightclick;


<!-- This Script Created by Randy Bennett: http://home.thezone.net/~rbennett/utility/javahead.htm -->
<!-- For this and 100s of other Free Javascripts, check out: -->
<!-- Free-Javascripts.com @ http://www.free-javascripts.com/ -->

function setVariables(){
         if (navigator.appName == "Netscape") {
 				horz=".left";
				vert=".top";
				docStyle="document.";
				styleDoc="";
				innerW="window.innerWidth";
				innerH="window.innerHeight";
				offsetX="window.pageXOffset";
				offsetY="window.pageYOffset";
				objectXY="layers[0]";

 }else{
 				horz=".pixelLeft";
				vert=".pixelTop";
				docStyle="";
				styleDoc=".style";
				innerW="document.body.clientWidth"
				innerH="document.body.clientHeight"
				offsetX="document.body.scrollLeft"
				offsetY="document.body.scrollTop"
				objectXY="object1"
		}

}

function checkLocation(){

imgwidth=79;  // logo width, in pixels
imgheight=70;  // logo height, in pixels


var availableX=eval(innerW)
var availableY=eval(innerH)

var currentX=eval(offsetX)
var currentY=eval(offsetY)

xmax=availableX-(imgwidth+20)+currentX
ymax=availableY-(imgheight+20)+currentY
}

var x=-100;
var y=50;
var a=5;
var b=5;

function startMoveR(){
checkLocation();
x += a;
y += b;
if (y>ymax) b=b*-1
if (y<10) b=b*-1
evalMove();
if (x<xmax+20) setTimeout("startMoveR()",100);
else setTimeout("startMoveL()",100);
}

function startMoveL(){
checkLocation()
x -= a;
y += b;
if (y>ymax-15) b=b*-1
if (y<10) b=b*-1
evalMove();
if (x>0) setTimeout("startMoveL()",100);
else setTimeout("startMoveR()",100);
}

//******************************
function evalMove(){
        eval(docStyle + objectXY + styleDoc + horz + "=" + x);
        eval(docStyle + objectXY + styleDoc + vert + "=" + y);
//setTimeout("checkLocation()",10)
//******************************
}