// JavaScript Document

var currentTop = 150;  // start at btoom of page
var myTimerId;  // variable for timer






// function to move header 
function moveHeader() {
	currentTop = currentTop - 2;  // decrease to move left
	// check to make sure header not off page
	//the id is 'move' .. reset the left to currentLeftpx .. need to add px to numerical data
	if(currentTop >=130) {
		document.getElementById("move").style.top=currentTop +"px";
	   }
	   else{
		   clearInterval(myTimerId);
		   myTimerId=setInterval("moving()",30);
	   }
}

// function to move header to up
function moving(){
	// check to make sure header has not gone off bottom edge
	if(currentTop <=210){
	currentTop = currentTop + 5; 
	
	document.getElementById("move").style.top= currentTop +"px";
	}
	// if at limits stop timer
	else{
		clearInterval(myTimerId);
		myTimerId=setInterval("moveHeader()",30);
	}
}


