<!--
//preload images
if (document.images){
image1=new Image();
image1.src="images/rush.png";
}

//set any global variables needed
//cursor location
var xcurs = 400;
var ycurs = 300;

//location x and y, vector x and y
var locx1 = 75;
var locy1 = 15;
var vctx1 = -5;
var vcty1 = -5;

//establish the screensize
var minx = 1
var miny = 1
var maxx = 525
var maxy = 325
function measureScreen(){
if (document.layers){
	maxx = window.innerWidth - 25;
	maxy = window.innerHeight - 20;
	}else{}
if (document.all){
	maxx = document.body.offsetWidth - 25;
	maxy = document.body.offsetHeight - 20;
	}else{}
}

//this function makes it happen
function orbit(){
//update vectors
if (locx1 <= xcurs){vctx1 += 1}else{vctx1 -= 1}
if (locy1 <= ycurs){vcty1 += 1}else{vcty1 -= 1}

//regulate maxspeed
maxspeed = 15
if (vctx1 > maxspeed){vctx1 = maxspeed}else{}
if (vctx1 < (maxspeed * -1)){vctx1 = (maxspeed * -1)}else{}
if (vcty1 > maxspeed){vcty1 = maxspeed}else{}
if (vcty1 < (maxspeed * -1)){vcty1 = (maxspeed * -1)}else{}

//test for wallhit
if ((locx1 + vctx1) > maxx){vctx1 = vctx1 * -1}else{}
if ((locx1 + vctx1) < minx){vctx1 = vctx1 * -1}else{}
if ((locy1 + vcty1) > maxy){vcty1 = vcty1 * -1}else{}
if ((locy1 + vcty1) < miny){vcty1 = vcty1 * -1}else{}

//save old lead point
oldx1 = locx1; oldy1 = locy1;

//add on the vector
locx1 += vctx1; locy1 += vcty1;

//carry the trail fwd
if (document.all){
document.all("lay05").style.posTop;
	document.all("lay05").style.posLeft = document.all("lay04").style.posLeft; document.all("lay05").style.posTop = document.all("lay04").style.posTop;
	document.all("lay04").style.posLeft = document.all("lay03").style.posLeft; document.all("lay04").style.posTop = document.all("lay03").style.posTop;
	document.all("lay03").style.posLeft = document.all("lay02").style.posLeft; document.all("lay03").style.posTop = document.all("lay02").style.posTop;
	document.all("lay02").style.posLeft = document.all("lay01").style.posLeft; document.all("lay02").style.posTop = document.all("lay01").style.posTop;
	document.all("lay01").style.posLeft = locx1; document.all("lay01").style.posTop = locy1;
	}else{}
if (document.layers){
	document.lr05.left = document.lr04.left; document.lr05.top = document.lr04.top;
	document.lr04.left = document.lr03.left; document.lr04.top = document.lr03.top;
	document.lr03.left = document.lr02.left; document.lr03.top = document.lr02.top;
	document.lr02.left = document.lr01.left; document.lr02.top = document.lr01.top;
	document.lr01.left = locx1;	document.lr01.top = locy1;
	}else{}
//set self to go again
myTimer=setTimeout('orbit()',100)
}


function updatePosition(e){
if (document.all){						//IE version
xcurs = event.clientX;
ycurs = event.clientY;
}else{									//NN version
xcurs = e.pageX;
ycurs = e.pageY;
}
}

// ======================= Role Over ============================================================
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		Boer_Does_down = newImage("images/Boer-Does-down.gif");
		Boer_Does_over = newImage("images/Boer-Does-over.gif");
		Boer_Bucks_over = newImage("images/Boer-Bucks-over.gif");
		Boer_Bucks_down = newImage("images/Boer-Bucks-down.gif");
		Show_Wethers_over = newImage("images/Show-Wethers-over.gif");
		Show_Wethers_down = newImage("images/Show-Wethers-down.gif");
		Award_over = newImage("images/Award-over.gif");
		Award_down = newImage("images/Award-down.gif");
		Sales_over = newImage("images/Sales-over.gif");
		Sales_down = newImage("images/Sales-down.gif");
		LGD_over = newImage("images/LGD-over.gif");
		LGD_down = newImage("images/LGD-down.gif");
		Links_over = newImage("images/Links-over.gif");
		Links_down = newImage("images/Links-down.gif");
		e_Mail_over = newImage("images/e-Mail-over.gif");
		e_Mail_down = newImage("images/e-Mail-down.gif");
		preloadFlag = true;
	}
}


// ============================== Rnadomaize =================================================
function rndnum(n) {
	str=Math.floor(Math.random()*n)+1;
	return str;
}

//function blink_img() {
//	vStatus=document.img1.style;
//	vStatus.visibility = (vStatus.visibility=="visible") ? "hidden" : "visible";
//}


//-->
