var yBase = window.innerHeight/2; var xBase = window.innerWidth/2; var delay = 20; var yAmpl = 10; var yMax = 40; var step = .2; var ystep = .5; var currStep = 0; var tAmpl=1; var Xpos = 10; var Ypos = 10; var j = 0;

function MoveHandler(evnt) {
	Xpos = evnt.pageX ;
	Ypos = evnt.pageY ;
}
function FlyBabyFly() {
	yBase = window.innerHeight / 4 ;
	xBase = window.innerWidth / 4;

	document.layers.layerDot.top = Ypos + Math.cos( ( 20 * Math.sin( currStep / ( 20 + j ) ) ) + j * 70 ) * yBase * (Math.sin( 10 + currStep / 10 ) + 0.2 ) * Math.cos( ( currStep + j * 25 ) / 10);
	document.layers.layerDot.left =Xpos + Math.sin( ( 20 * Math.sin( currStep / 20 ) ) + j * 70 ) * xBase * (Math.sin( 10 + currStep / (10 + j ) ) + 0.2 ) * Math.cos( (currStep + j * 25 ) / 10);

	currStep += step;
}

function InvokeDot() {
	if(!bAgentNetscape4)
		return;
	window.captureEvents(Event.MOUSEMOVE);
	window.onMouseMove = MoveHandler;
	setInterval("FlyBabyFly()", delay) ;
}


function SetMenuPosition(leftPixel) {
	if (bAgentNetscape4) {
		document.layers.layerMenu.left=leftPixel; 
	}
	else if (bAgentExplorer4) {
		document.all("spanMenu").style.left=leftPixel; 
	}
	return true;
}

function PositionMenu() {
	if (bAgentNetscape4) { 
		document.layers.layerMenu.top = top.pageYOffset; 
	}
	else if (bAgentExplorer4) { 
		document.all("spanMenu").style.top=bbody.scrollTop; 
	}
	return true;
}

function InvokeMenu () {
	if (bAgentNetscape4) { 
		document.write('<layer id="layerMenu" left="-95" width="120" top="0" height="391" clip="0,0,121,392" onMouseOver="javascript:SetMenuPosition(-2);" onMouseOut="javascript:SetMenuPosition(-95);">\n<img src="menu.jpg" width=120 height=391 border=0 usemap="#menu">\n</layer>\n'); 
	}
	else if (bAgentExplorer4) { 
		document.write('<span id="spanMenu" onMouseOver="javascript:SetMenuPosition(-2);" onMouseOut="javascript:SetMenuPosition(-95);">\n<img src="menu.jpg" width=120 height=391 border=0 usemap="#menu">\n</span>\n'); 
	}
	if (bAgentNetscape4 || bAgentExplorer4) { 
		setInterval("PositionMenu()", 200);
	}
	return true;
}