<!--// damn the romulans and their cloaking technology //

// spinner by: morpheo@anti.nu 

/*
if (brw.ns4) document.captureEvents (Event.MOUSEDOWN);
document.onmousedown = spinMouseDown;
*/

		var value = new Array();
		var orbPosX = new Array();
		var orbPosY = new Array();
		var orbOriginX, orbOriginY;
		var from, to, adj;
		var fromSpeed, toSpeed, adjSpeed, speedOrb, speeder;
		var fromSize, fromX, fromY, toSize, toX, toY, sizeOrb, speed;
		var spinOrb, spinAngle, items;
		var i;
		var orbSize = orbSizeX = orbSizeY = 148, orbSizeMax = orbSizeMaxX = orbSizeMaxY = 208;
		var spinSpeed = 0.0005;
		var itemName = "menu"


		function getSpinAmount(menuid) {
			for (s = 0; s < 100; s++) {
				if (brw.w3c){if (document.getElementById("menu" +s)) { items = s+1; } else return; }	
				else if (brw.ns4){if (document.layers["menu" +s]) { items = s+1; } else return; }
				else { if (document.all("menu" +s)) { items = s+1; } else return; }
			}
		}

		function spinItemAngles(spinItems) {
			items = spinItems;
			spinAngle = ((360/items)*Math.PI/180);
			for (i=0; i<=items - 1; i++) {
				value[i] = spinAngle * i;
			}
		}

		function initMenu() {
			resetOrb();
			setTimeout("orbSpin('menu', items, .0005)", 10);
//			setTimeout("orbSizer(orbSize, orbSize, orbSizeMax, orbSizeMax, 5)", 100);
			setTimeout("showMenuItems()", 250);
		}

		function showMenuItems() {
			for (i=0; i<items; i++) { layShow(itemName + i); }
		}

		function exitMenu() {
			for (i=0; i<items; i++) { layHide(itemName + i); }
			resetOrb();
		}

		function resetOrb() {
			if (speedOrb) clearTimeout(speedOrb);
			if (sizeOrb) clearTimeout(sizeOrb);
			if (spinOrb) clearTimeout(spinOrb);
			return;
		}

		function orbSpin(itemName, items, speed, dir) {
			this.itemName = itemName;
			this.items = items;
			this.speed = speed;
			this.dir = dir;
			if (speeder) this.speed = speeder;
			for (i=0; i<=this.items - 1; i++) {
				if (this.dir == "cw") { value[i] = value[i] - this.speed; }
				else { value[i] = value[i] + this.speed; }
				orbPosX[i] = orbOriginX + (orbSizeX*Math.sin(value[i])); orbPosY[i] = orbOriginY + (orbSizeY*Math.cos(value[i]));

				if (brw.ie) { document.all(this.itemName + i).style.posLeft = orbPosX[i]; document.all(this.itemName + i).style.posTop = orbPosY[i]; }
				if (brw.w3c) { spinObj = document.getElementById(this.itemName + i).style;}
				else if (brw.ns4) { spinbObj = document.layers[this.itemName + i]; }
				else { spinObj = document.all(this.itemName + i).style; }

				if ((spinObj) && (!brw.ie)) spinObj.left = orbPosX[i] +"px";
				if ((spinObj) && (!brw.ie)) spinObj.top = orbPosY[i] +"px";
				if (value[i] == 6.30) { value[i] = 0; }
			}
			spinOrb = setTimeout('orbSpin(this.itemName, this.items, this.speed, this.spinDir)',145);
		}

		function orbSizer(fromX, fromY, toX, toY, adj) {
			if (sizeOrb) clearTimeout(sizeOrb);
			this.fromX = fromX;
			this.fromY = fromY;
			this.toX = toX;
			this.toY = toY;
			this.adj = adj;
			if (((this.fromX > this.toX) && (this.fromX != this.toX)) || ((this.fromY > this.toY) && (this.fromY != this.toY))) {
				this.fromX = this.fromX - this.adj;
				this.fromY = this.fromY - this.adj;
			}
			else if (((this.fromX < this.toX) && (this.fromX != this.toX)) || ((this.fromY < this.toY) && (this.fromY != this.toY))) {
				this.fromX = this.fromX + this.adj;
				this.fromY = this.fromY + this.adj;
			}
			else {
				setTimeout("orbSpeeder(0.005, spinSpeed, .1)", 10);
				sizeOrb = -1;
				return;
			}
			orbSizeX = this.fromX;
			orbSizeY = this.fromY;
			sizeOrb = setTimeout("orbSizer(this.fromX, this.fromY, this.toX, this.toY, this.adj)", 50);
		}

		function orbSpeeder(from, to, adj) {
			if (speedOrb) clearTimeout(speedOrb);
			this.from = from;
			this.to = to;
			this.adj = adj;
			if ((this.from > this.to) && (this.from != this.to)) this.from = this.from - this.adj;
			else if ((this.from < this.to) && (this.from != this.to)) this.from = this.from + this.adj;
			speeder = this.from;
			speedOrb = setTimeout("orbSpeeder(this.from, this.to, this.adj)", 20);
		}

/*
		function spinMenu() {
			orbSizer(80, 80, 150, 150, 1);
			spinInfo.width(150);
			spinInfo.height(130);
			spinInfo.x(orbOriginX-(spinInfo.WIDTH/2)+15);
			spinInfo.y(orbOriginY-(spinInfo.HEIGHT/2)+15);
			spinInfo.topTxt = '<table cellpadding="0" cellspacing="0" border="0"><TR><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="line"><img src="img/dot.gif" width="'+(spinInfo.WIDTH - 12)+'" height="1" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td></tr>';
			spinInfo.topTxt += '<TR><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="spintxt"><img src="img/dot.gif" width="5" height="5" border="0"></td><TD class="spintxt"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="spintxt"><img src="img/dot.gif" width="5" height="5" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td></tr>';
			spinInfo.topTxt += '<TR><TD class="line"><img src="img/dot.gif" width="1" height="'+(spinInfo.HEIGHT - 12)+'" border="0"></td><TD class="spintxt"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="spintxt" align="left" valign="top">';
			spinInfo.btmTxt = '</td><TD class="spintxt"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td></tr>';
			spinInfo.btmTxt += '<TR><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="spintxt"><img src="img/dot.gif" width="5" height="5" border="0"></td><TD class="spintxt"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="spintxt"><img src="img/dot.gif" width="5" height="5" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td></tr>';
			spinInfo.btmTxt += '<TR><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td><TD class="line"><img src="img/dot.gif" width="1" height="1" border="0"></td></tr></table>';

			spinInfo.txt("the spinning gears are menu-items.<BR><BR>Hover your mouse pointer over the menu items to stop them from spinning, then klick to activate the link.<BR><BR>Use your left mousebutton to close all menus.<BR>");
			spinInfo.vis("visible");
		}
*/
// Mr. Zulu, fire phasers at will //-->
