<!--
//-------------------
//LAYER MOVEMENT
//-------------------

	var LayerTopDefault = -20
	var LayerTop = LayerTopDefault
	var moveLayerBy = 4
	var delay
	var animatedLayer = "dummy"

  	function startAnimate (Direction,Layer) {
  		clearInterval(delay)
		animatedLayer = Layer

		if (Direction == "forward") {
			delay = setInterval ("animate()",1)
		} else if (Direction == "reverse") {
			delay = setInterval ("reverseAnimate()",1)
		}
  	}

  	function stopAnimate () {
		clearInterval(delay)
		LayerTop = LayerTopDefault
		if (NN) document.layers[animatedLayer].top = LayerTop
		else if (IE) document.all[animatedLayer].style.top = LayerTop
		else if (Eid) document.getElementById(animatedLayer).style.top = LayerTop
	}

	function animate () {
		LayerTop += moveLayerBy

		if (LayerTop > 10) {
			clearInterval(delay)
		} else {
			if (NN) document.layers[animatedLayer].top = LayerTop
			else if (IE) document.all[animatedLayer].style.top = LayerTop
			else if (Eid) document.getElementById(animatedLayer).style.top = LayerTop
		}
	}

	function reverseAnimate () {
		LayerTop -= moveLayerBy
		if (LayerTop < LayerTopDefault) {
			clearInterval(delay)
		} else {
			if (NN) document.layers[animatedLayer].top = LayerTop
			else if (IE) document.all[animatedLayer].style.top = LayerTop
			else if (Eid) document.getElementById(animatedLayer).style.top = LayerTop
		}
	}

//---------------------------
//IMAGE STUFF
//--------------------------

	var preloadFlag = false

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

  	function swap(img,restoreImage,folioImage) {
		if (folioImage == true) {
			imageOver = "img/folio_ovr.png"
			imageReg = "img/folio.png"
		} else {
			imageOver = "img/"+img+"_ovr.png"
			imageReg = "img/"+img+".png"
		}

		if (document.images && (preloadFlag == true)) {
			if (restoreImage) {
				if (NN && !folioImage) document.navigation.document.images[img].src = imageReg
				else document.images[img].src = imageReg
			} else {
				if (NN && !folioImage) document.navigation.document.images[img].src = imageOver
				else document.images[img].src = imageOver
			}
		}
  	}

  	function preloadImages() {
		if (document.images) {
			for (i=0;i<preloadImages.arguments.length; i++) {
		  	imageArray = new Array()
		  	imageArray[i] = newImage(preloadImages.arguments[i])
			}
			preloadFlag = true
		}
  	}

//---------------------------------------------
//SWAPS LAYER HEIGHTS
//---------------------------------------------

	function swapLayers (t, b, tCover, bCover, tText, bText) {
		document.getElementById(t).style.zIndex = 100
		document.getElementById(tCover).style.zIndex = 99
		document.getElementById(tText).style.zIndex = 98
		
		document.getElementById(b).style.zIndex = 50
		document.getElementById(bCover).style.zIndex = 51
		document.getElementById(bText).style.zIndex = 52
	}

//-->

