    var lastSubmenu = null;

    

    function subMenu(anchor, submenu)

    {

        if(submenu.style.display == 'block')

        {

            lastSubmenu = null;

            submenu.style.display = 'none';

            showSelect();

            return;

        }

        

        if(lastSubmenu != null) lastSubmenu.style.display = 'none';

        

        var pos = getPos(anchor.parentNode);

        Anim(submenu.id, 0);

        submenu.style.display = 'block';

		if (submenu == document.getElementById('submenu4')) submenu.style.left = pos.left + 1 - 208 + 'px';  // separatní posunutí pro Francii kvuli banneru

		else if (submenu == document.getElementById('submenu6')) submenu.style.left = pos.left + 1 - 95 + 'px'; // separatní posunutí pro Itálii kvuli banneru

		else submenu.style.left = pos.left + 1 + 'px';

        submenu.style.top = pos.top + pos.height - 3 + 'px';

        lastSubmenu = submenu; 

        closeSelect();

    }

    

    function closeSubmenu()

    {

        if(lastSubmenu == null) return;

        

        lastSubmenu.style.display = 'none';

        lastSubmenu = null;

        showSelect();       

    }

    

    function closeSelect()

    {

      if(navigator.appName == 'Microsoft Internet Explorer' && parseInt(navigator.appVersion.split('MSIE')[1]) <= 6)

        {  

            var list = document.getElementsByTagName('select');

            for(var i = 0; i < list.length; i++)

                list.item(i).style.visibility = 'hidden';

            

                

        }

    }

    

    function showSelect()

    {

        if(navigator.appName == 'Microsoft Internet Explorer' && parseInt(navigator.appVersion.split('MSIE')[1]) <= 6)

        {

            var list = document.getElementsByTagName('select');

            for(var i = 0; i < list.length; i++)

                list.item(i).style.visibility = 'visible';

        }

    }

    

    

    

    function getPos(owner)

    {

        if(owner == undefined)

            return {top : 0, left:0 , width : 0, height : 0};

        

        var e = owner;

        var res = {top: e.offsetTop, left: e.offsetLeft, width: e.offsetWidth, height: e.offsetHeight};

        

        while(e = e.offsetParent)

        {

            res.top += e.offsetTop;

            res.left += e.offsetLeft;

        }

        return res;

    }

    

    function Anim(elId, opa)

    {

        var el = document.getElementById(elId);

        

        if(opa > 95) opa = 99;

        if(el.style.opacity != null) el.style.opacity = parseFloat(opa / 100);

        else if (el.style.filter != null) el.style.filter = "alpha(opacity="+(opa)+")";

        if(opa < 98) setTimeout("Anim('"  + elId + "', " + (opa + parseInt((100 - opa) / 3))+ ");", 10);

    }



	function odkaz(url) {

		window.open(url+"odkaz.php?p="+document.location, "GTSintPop", "width=400,height=300,toolbars=no,status=no,resizable=no,scrollbars=no,menubar=no,directories=no");

	}



	function MM_findObj(n, d) { //v4.01

	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

	  if(!x && d.getElementById) x=d.getElementById(n); return x;

	}


