//Funciones para devolucion de textos tooltip o labels

function textAreaGuia(lang) {

    var sText1 = "";
    var sText2 = "";
    var sText3 = "";
    var sText4 = "";
    var sText5 = "";
    var sText6 = "";
    var sText7 = "";
    var sText8 = "";
    var sText9 = "";
    
        switch (lang) {
            case "es":
                sText1 = "Ir al origen";
                sText2 = "Este";
                sText3 = "Oeste";
                sText4 = "Norte";
                sText5 = "Sur";
                sText6 = "Noreste";
                sText7 = "Sureste";
                sText8 = "Suroeste";
                sText9 = "Noroeste";
                break;
            case "en":
                sText1 = "Go to origin";
                sText2 = "East";
                sText3 = "West";
                sText4 = "North";
                sText5 = "South";
                sText6 = "North-East";
                sText7 = "South-East";
                sText8 = "South-West";
                sText9 = "North-West";
                break;
            case "ct":
                sText1 = "Anar a l\u0027origen";
                sText2 = "Est";
                sText3 = "Oest";
                sText4 = "Nord";
                sText5 = "Sud";
                sText6 = "Nord-est";
                sText7 = "Sud-est";
                sText8 = "Sud-oest";
                sText9 = "Nord-oest";
                break;
            case "vl":
                sText1 = "Anar a l\u0027origen";
                sText2 = "Est";
                sText3 = "Oest";
                sText4 = "Nord";
                sText5 = "Sud";
                sText6 = "Nord-est";
                sText7 = "Sud-est";
                sText8 = "Sud-oest";
                sText9 = "Nord-oest";
                break;
            case "ek":
                sText1 = "Jatorrira joan";
                sText2 = "Ekialdea";
                sText3 = "Mendebaldea";
                sText4 = "Iparraldea";
                sText5 = "Hegoaldea";
                sText6 = "Ipar-ekialdea";
                sText7 = "Hego-ekialdea";
                sText8 = "Hego-mendebaldea";
                sText9 = "Ipar-mendebaldea";
                break;
            case "gl":
                sText1 = "Ir \u00e1 orixe";
                sText2 = "Leste";
                sText3 = "Oeste";
                sText4 = "Norte";
                sText5 = "Sur";
                sText6 = "Nordeste";
                sText7 = "Sueste";
                sText8 = "Sudoeste";
                sText9 = "Noroeste";
                break;
            case "pt":
                sText1 = "Ir \u00e0 origem";
                sText2 = "Este";
                sText3 = "Oeste";
                sText4 = "Norte";
                sText5 = "Sul";
                sText6 = "Nordeste";
                sText7 = "Sudeste";
                sText8 = "Sudoeste";
                sText9 = "Noroeste";
                break;
            case "fr":
                sText1 = "Aller \u00e0 l\u0027origine";
                sText2 = "Est";
                sText3 = "Ouest";
                sText4 = "Nord";
                sText5 = "Sud";
                sText6 = "Nord-est";
                sText7 = "Sud-est";
                sText8 = "Sud-ouest";
                sText9 = "Nord-ouest";
                break;
            default:
                sText1 = "Ir al origen";
                sText2 = "Este";
                sText3 = "Oeste";
                sText4 = "Norte";
                sText5 = "Sur";
                sText6 = "Noreste";
                sText7 = "Sureste";
                sText8 = "Suroeste";
                sText9 = "Noroeste";
                break;
        }

        return { origen: sText1, east: sText2, west: sText3, north: sText4, south: sText5, northeast: sText6, southeast: sText7, southwest: sText8, northwest: sText9 };
}

function textPlusMinus(lang) {

        var sText1 = "";
        var sText2 = "";
       
        switch (lang) {
            case "es":
                sText1 = "Ampliar Mapa";
                sText2 = "Reducir Mapa";
                break;
            case "en":
                sText1 = "Enlarge Map";
                sText2 = "Reduce Map";
                break;
            case "ct":
                sText1 = "Ampliar Mapa";
                sText2 = "Reduir Mapa";
                break;
            case "vl":
                sText1 = "Ampliar Mapa";
                sText2 = "Reduir Mapa";
                break;
            case "ek":
                sText1 = "Mapa handiagotu";
                sText2 = "Mapa txikiagotu";
                break;
            case "gl":
                sText1 = "Ampliar Mapa";
                sText2 = "Reducir Mapa";
                break;
            case "pt":
                sText1 = "Ampliar Mapa";
                sText2 = "Reduzir Mapa";
                break;
            case "fr":
                sText1 = "Agrandir Carte";
                sText2 = "Réduire Carte";
                break;
            default:
                sText1 = "Ampliar Mapa";
                sText2 = "Reducir Mapa";
                break;
        }

        return { plus: sText1, minus: sText2};
}

function textAmpliarReducir(lang) {

    var sText1 = "";
    var sText2 = "";

    switch (lang) {
        case "es":
            sText1 = "Ampliar";
            sText2 = "Reducir";
            break;
        case "en":
            sText1 = "Enlarge";
            sText2 = "Reduce";
            break;
        case "ct":
            sText1 = "Ampliar";
            sText2 = "Reduir";
            break;
        case "vl":
            sText1 = "Ampliar";
            sText2 = "Reduir";
            break;
        case "ek":
            sText1 = "Handitu";
            sText2 = "Txikiagotu";
            break;
        case "gl":
            sText1 = "Ampliar";
            sText2 = "Reducir";
            break;
        case "pt":
            sText1 = "Ampliar";
            sText2 = "Reduzir";
            break;
        case "fr":
            sText1 = "Agrandir";
            sText2 = "Réduire";
            break;
        default:
            sText1 = "Ampliar";
            sText2 = "Reducir";
            break;
    }

    return { plus: sText1, minus: sText2 };
}

function textVista3D(lang) {

        var sText1 = "";
        var sText2 = "";

        switch (lang) {
            case "es":
                sText1 = "Vista 3D";
                sText2 = "Ver Mapa";
                break;
            case "en":
                sText1 = "3D View";
                sText2 = "See map";
                break;
            case "ct":
                sText1 = "Vista 3D";
                sText2 = "Veure mapa";
                break;
            case "vl":
                sText1 = "Vista 3D";
                sText2 = "Veure mapa";
                break;
            case "ek":
                sText1 = "3Dtako ikuspegia";
                sText2 = "Ikus mapa";
                break;
            case "gl":
                sText1 = "Vista 3D";
                sText2 = "Ver Mapa";
                break;
            case "pt":
                sText1 = "Vista 3D";
                sText2 = "Ver Mapa";
                break;
            case "fr":
                sText1 = "Vue 3D";
                sText2 = "Voir le plan";
                break;
            default:
                sText1 = "Vista 3D";
                sText2 = "Ver Mapa";
                break;
        }

        return { vista3d: sText1, mapa: sText2 };
}

function textVista3DActiva(lang) {

    var sText1 = "";

    switch (lang) {
        case "es":
            sText1 = "Activar vista 3d";
            break;
        case "en":
            sText1 = "Activate 3D view";
            break;
        case "ct":
            sText1 = "Activar vista 3d";
            break;
        case "vl":
            sText1 = "Activar vista 3d";
            break;
        case "ek":
            sText1 = "3Dtako ikuspegia aktibatu";
            break;
        case "gl":
            sText1 = "Activar vista 3d";
            break;
        case "pt":
            sText1 = "Activar vis\u00e3o 3D";
            break;
        case "fr":
            sText1 = "Activer vue 3D";
            break;
        default:
            sText1 = "Activar vista 3d";
            break;
    }

    return { text: sText1 };
}

function textVista360(lang) {

    var sText1 = "";
    
    switch (lang) {
        case "es":
            sText1 = "Vista 360";
            break;
        case "en":
            sText1 = "360 View";
            break;
        case "ct":
            sText1 = "Vista 360";
            break;
        case "vl":
            sText1 = "Vista 360";
            break;
        case "ek":
            sText1 = "360 ikuspegia";
            break;
        case "gl":
            sText1 = "Vista 360";
            break;
        case "pt":
            sText1 = "Vista 360";
            break;
        case "fr":
            sText1 = "Vue 360";
            break;
        default:
            sText1 = "Vista 360";
            break;
    }

    return { vista360: sText1 };
}

function textCiudad3D(lang) {

    var sText1 = "";
    
    switch (lang) {
        case "es":
            sText1 = "Ciudad 3D";
            break;
        case "en":
            sText1 = "3D City";
            break;
        case "ct":
            sText1 = "Ciutat 3D";
            break;
        case "vl":
            sText1 = "Ciutat 3D";
            break;
        case "ek":
            sText1 = "Hiria 3Dn";
            break;
        case "gl":
            sText1 = "Cidade 3D";
            break;
        case "pt":
            sText1 = "Cidade 3D";
            break;
        case "fr":
            sText1 = "Ville 3D";
            break;
        default:
            sText1 = "Ciudad 3D";
            break;
    }

    return { ciudad3d: sText1 };
}

function textClick(lang) {

    var sText1 = "";

    switch (lang) {
        case "es":
            sText1 = "Click para mantener";
            break;
        case "en":
            sText1 = "Click to hold";
            break;
        case "ct":
            sText1 = "Clic per a mantenir";
            break;
        case "vl":
            sText1 = "Clic per a mantenir";
            break;
        case "ek":
            sText1 = "Klikatu honi eusteko";
            break;
        case "gl":
            sText1 = "Clic para manter";
            break;
        case "pt":
            sText1 = "Clique para manter";
            break;
        case "fr":
            sText1 = "Choisir communauté autonome";
            break;
        default:
            sText1 = "Click para mantener";
            break;
    }

    return sText1;
}

function textCallejeroFotografico(lang) {

    var sText1 = "";

    switch (lang) {
        case "es":
            sText1 = "Callejero fotogr\u00e1fico";
            break;
        case "en":
            sText1 = "Photos of cities";
            break;
        case "ct":
            sText1 = "Pl\u00e0nols fotogr\u00e0fics";
            break;
        case "vl":
            sText1 = "Pl\u00e0nols fotogr\u00e0fics";
            break;
        case "ek":
            sText1 = "Agazkia/Mapa";
            break;
        case "gl":
            sText1 = "Rueiros fotogr\u00e1ficos";
            break;
        case "pt":
            sText1 = "Fotos de cidades";
            break;
        case "fr":
            sText1 = "Photos de Villes";
            break;
        default:
            sText1 = "Callejero fotogr\u00e1fico";
            break;
    }

    return { text: sText1 };
}

function cargaTextos() {

    try {
        var toolTipGuia = textAreaGuia(strLang);
        //Origen
        document.getElementById("areaorigen").alt = toolTipGuia.origen;
        document.getElementById("areaorigen").title = toolTipGuia.origen;
        //areaeast
        document.getElementById("areaeast").alt = toolTipGuia.east;
        document.getElementById("areaeast").title = toolTipGuia.east;
        //areawest
        document.getElementById("areawest").alt = toolTipGuia.west;
        document.getElementById("areawest").title = toolTipGuia.west;
        //areanorth
        document.getElementById("areanorth").alt = toolTipGuia.north;
        document.getElementById("areanorth").title = toolTipGuia.north;
        //areasouth
        document.getElementById("areasouth").alt = toolTipGuia.south;
        document.getElementById("areasouth").title = toolTipGuia.south;
        //areanortheast
        document.getElementById("areanortheast").alt = toolTipGuia.northeast;
        document.getElementById("areanortheast").title = toolTipGuia.northeast;
        //areasoutheast
        document.getElementById("areasoutheast").alt = toolTipGuia.southeast;
        document.getElementById("areasoutheast").title = toolTipGuia.southeast;
        //areanorthwest
        document.getElementById("areanorthwest").alt = toolTipGuia.northwest;
        document.getElementById("areanorthwest").title = toolTipGuia.northwest;
        //areasouthwest
        document.getElementById("areasouthwest").alt = toolTipGuia.southwest;
        document.getElementById("areasouthwest").title = toolTipGuia.southwest;
    } catch (err) { }

    try {
        var toolTipPlusMinus = null;
        if (lnk != '3D') {
            toolTipPlusMinus = textPlusMinus(strLang);
        } else {
            toolTipPlusMinus = textAmpliarReducir(strLang);
        }
        document.getElementById("imgplusminus").alt = toolTipPlusMinus.plus;
        document.getElementById("imgplusminus").title = toolTipPlusMinus.plus;
    } catch (err) { }

    try {
        var toolTipVista3D = textVista3D(strLang);
        document.getElementById("imgopt3d").alt = toolTipVista3D.vista3d;
        document.getElementById("imgopt3d").title = toolTipVista3D.vista3d;
    } catch (err) { }

    try {
        var toolTipCiudad3D = textCiudad3D(strLang);
        document.getElementById("imgoptcity3d").alt = toolTipCiudad3D.ciudad3d;
        document.getElementById("imgoptcity3d").title = toolTipCiudad3D.ciudad3d;
    } catch (err) { }

    try {
        var toolTipVista360 = textVista360(strLang);
        document.getElementById("imgoptchangeview").alt = toolTipVista360.vista360;
        document.getElementById("imgoptchangeview").title = toolTipVista360.vista360;
    } catch (err) { }
}    
    