// JavaScript Document

var IE = document.all?true:false

var tempX = 0;
var tempY = 0;






function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX -150;
    tempY = document.documentElement.scrollTop + event.clientY;
  } else {  // grab the x-y pos.s if browser is NS or FF
    tempX = e.pageX;
    tempY = e.pageY;
  } 
  SearchBoxPos(tempX, tempY)
}



function SearchBoxPos(x, y) {
	var boxPos = document.getElementById("searchBox").style;
	if(boxPos.posTop) {
		// IE
		boxPos.posTop = y;
		boxPos.posLeft = x;
	} else {
		boxPos.top = y  + "px";
		boxPos.left = x  + "px";
	}
	
}

function OpenSearchBox(){
    tempX = (document.body.clientWidth/2)-100;
    tempY = 251;
SearchBoxPos(tempX, tempY);
}


function HideSearchBox(){
    tempX = 0;
    tempY = -100 ;
SearchBoxPos(tempX, tempY);
}

function moveSearchBox(){
document.onmousemove = getMouseXY;

}

function fixSearchBox(){
document.onmousemove = SearchBoxPos(tempX, tempY);

}