function awesomeSearchButton(){
 var button = document.getElementById('searchButton');
 // Remove Go Text
 if(button)
	 button.value = "";
 
 /* Comment out this block to remove rollover functionality. */

 	//Apply base mousout state
	button.className='searchButton_off';
 	//Event Handlers
	button.onmouseover = function (){this.className='searchButton_on'};
	button.onmouseout = function (){this.className='searchButton_off'};
}
window.onload = awesomeSearchButton;

function getleftoffset(obj){
  var offset=obj.offsetLeft
  var parent=obj.offsetParent;
  while (parent!=null){
    offset=offset+parent.offsetLeft
    parent=parent.offsetParent;
  }
  return offset;
}

function gettopoffset(obj){
  var offset=obj.offsetTop
  var parent=obj.offsetParent;
  while (parent!=null){
    offset=offset+parent.offsetTop
    parent=parent.offsetParent;
  }
  return offset;
}

function showlogin(obj, classID){
  searchobj=document.getElementById(classID)
  searchobj.style.visibility='visible'
  searchobj.style.left=getleftoffset(obj)+'px'
  searchobj.style.top=gettopoffset(obj)+obj.offsetHeight+'px'
}

function hidelogin(classID){
  searchobj=document.getElementById(classID)
  searchobj.style.visibility='hidden'
}

function showwhy(obj, classID){
  searchobj=document.getElementById(classID)
  searchobj.style.visibility='visible'
  searchobj.style.left=getleftoffset(obj)+'px'
  searchobj.style.top=gettopoffset(obj)+obj.offsetHeight+'px'
}

function hidewhy(classID){
  searchobj=document.getElementById(classID)
  searchobj.style.visibility='hidden'
}

function getleftoffset(obj){
  var offset=obj.offsetLeft
  var parent=obj.offsetParent;
  while (parent!=null){
    offset=offset+parent.offsetLeft
    parent=parent.offsetParent;
  }
  return offset;
}

function gettopoffset(obj){
  var offset=obj.offsetTop
  var parent=obj.offsetParent;
  while (parent!=null){
    offset=offset+parent.offsetTop
    parent=parent.offsetParent;
  }
  return offset;
}

function popupsearch(obj, classID){
  searchobj=document.getElementById(classID)
  searchobj.style.visibility='visible'
  searchobj.style.left=getleftoffset(obj)+'px'
  searchobj.style.top=gettopoffset(obj)+obj.offsetHeight+'px'
}

function killsearch(classID){
  searchobj=document.getElementById(classID)
  searchobj.style.visibility='hidden'
}

