 /**
  * Retrieve the coordinates of the given event
  *
  * @param event
  *  A mouse-related DOM event.
  * @return
  *    A hash containing keys 'x' and 'y'.
  */
  function getCoordinates(e) {
	/*var posx = 0;
	var posy = 0;
	if (!e) var e = window.event;

	if (e.pageX || e.pageY) 	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}

    return { x: posx, y: posy };*/
		if(document.body.scrollTop == 0)
 			return { x: screen.availWidth/5, y: screen.availHeight/5 + document.body.scrollTop  + 20};
 		else
    	return { x: screen.availWidth/5, y: screen.availHeight/5 + document.body.scrollTop };
  }



  function displayLabel(event, id) {
    var e = event || window.event;
    var pos = getCoordinates(event);

   //$(id).style.top = pos.y+"px";
    //$(id).style.left = pos.x+"px";
	$(id).style.top = "100px";
    $(id).style.left = "450px";
	new Effect.Appear(id);
	
  }
  
   function displayInstruction(event, id) {
    var e = event || window.event;
    var pos = getCoordinates(event);

   $(id).style.top = pos.y+"px";
    $(id).style.left = pos.x+"px";
	//$(id).style.top = "100px";
    //$(id).style.left = "450px";
	new Effect.Appear(id);
	
  }

  function hideLabel(event, id) {
    var e = event || window.event;
    var pos = getCoordinates(event);

   // $(id).style.top = pos.y+"px";
   // $(id).style.left = pos.x+"px";
	new Effect.Fade(id);
  }
  

	