/*
il menu in alto a destra nella mappa: email e link
*/

RegisterScript('t4uTopRightMenu', 1, 'toscana4u top right menu');
Require([ 'AnimeJ', { Name: 'AnimeJ', Version: 1 } ]);
Require([ 't4uMyLocations', { Name: 't4uMyLocations', Version: 1 } ]);


	function OpenLinkPopup()
	{
	  GetLocation();
	}
	
	function SetLinkLabel(l)
	{
      var txt = document.getElementById("linklabel");
      if (l == null) {
        var t = new Timeline();
        t.SetAt(0, AnimeJInterp.alpha(200, 30, txt.style, 0.9, 0.7));
        t.Run();
      } else {
        var t = new Timeline();
        t.SetAt(0, AnimeJInterp.alpha(200, 30, txt.style, 0.7, 0.9));
        t.Run();
      }	  
	}
	
	var LinkLabelChiuso = 0;
	
	function MoveLinkLabel()
	{
	  var linklabel = document.getElementById("linklabel");
      var container = document.getElementById("linklabel_content");
      var btn = document.getElementById("linklabel_scroller");
      if (LinkLabelChiuso == 1) {
      	LinkLabelChiuso = 0;
        var t = new Timeline();
        btn.innerHTML = "&raquo;";
        t.SetAt(0, AnimeJInterp.px(200, 30, linklabel.style, 'width', 18, 130));
        t.OnEnd = function (d) { container.style.display = 'inline'; }
        t.Run();
      } else {
      	LinkLabelChiuso = 1;
        var t = new Timeline();
        container.style.display = 'none';
        btn.innerHTML = "&laquo;";
        t.SetAt(0, AnimeJInterp.px(200, 30, linklabel.style, 'width', 130, 18));
        t.Run();
      }
	}
	
	function SetMouseOver(el, val)
	{
	  var linklabel = document.getElementById(el);		
	  linklabel.className = val;
	}
