
// 
// Some sample functions for customization
//

$.extend(PM.Custom,
{
    // Sample Hyperlink function for result window
    openHyperlink: function(layer, fldName, fldValue) {
        switch(layer) {
            case 'muni_hmosocampo':
              window.open('http:/' + '/etisig.siup.gov.ar/dptos/hermosocampo.php' );
            break;
            case 'muni_corzuela':
              window.open('http:/' + '/etisig.siup.gov.ar/dptos/corzuela.php' );
            break;
            case 'departamentos':
              window.open('http:/' + '/etisig.siup.gov.ar/dptos/' + fldValue + '.html' );
            break;
            case 'desnutridos_casasol':
                //if (fldName == 'CITY_NAME') {
                    window.open('http:/' + '/en.wikipedia.org/wiki/' + fldValue, 'wikiquery');
                //}
                break;
                
            default:
                alert ('Verificar la funcion openHyperlink en custom.js: ' + layer + ' - ' + fldName + ' - ' + fldValue);
        }
    },

    showCategoryInfo: function(catId) {
        var catName = catId.replace(/licat_/, '');
        alert('Info about category: ' + catName);
    },

    showGroupInfo: function(groupId) {
        var groupName = groupId.replace(/ligrp_/, '');
        alert('Info about layer/group: ' + groupName);
    }

});

