﻿Prototype.Browser.IE6=Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5))==6;
Prototype.Browser.IE7=Prototype.Browser.IE && !Prototype.Browser.IE6;

function showLang(){
    if(Prototype.Browser.IE6){ // Solo se IE6
        $('lang').className="langLinks"; // Assegno la classe visibile
        $('MenuMarket').observe('mouseout', function() { // Attacco l'evento mouseout
            $('lang').className="langHiddenLinks"; // Assegno la classe invisibile 
	        $('MenuMarket').stopObserving('mouseout'); // Tolgo l'evento
        });
    }
}



function submitSearch(tipo)
{
    
    var selID="SearchText";
    var obj = (document.getElementById) ? document.getElementById(selID) : eval("document.all['" + selID + "']");
    
    var inviaSearch = false;
    
    if (tipo == '0')
        {
            if(window.event) // solo se IE
                {
                    if (window.event.keyCode == 13)
                        {
                            window.event.keyCode = 0;
                            inviaSearch = true;
                        }
                }
        }
    else if (tipo == '1')
        {
            inviaSearch = true;
        }
    
    if (inviaSearch == true)
        {
            document.location.href = '../search.athx?SearchText=' + encodeURI(obj.value) + '&searchword=false&searchmode=2';    
        }
}




