var correos_oficinas = false; var clicked = false; Proj4js.defs = { 'WGS84': "+title=long/lat:WGS84 +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees", 'EPSG:3875': "+title= Google Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"}; var source = new Proj4js.Proj('EPSG:3875'); var dest = new Proj4js.Proj('WGS84'); PuntosCorreos = Class.create(); PuntosCorreos.prototype = { initialize: function() { this.correosResultados = ''; this.codigoPostalVal = ''; this.correosMethod = ''; Event.observe(window, 'load', function() { //$('opc-shipping_method').on('change', '.radio', function(e) $$('body')[0].on('change', 'input:radio', function(e) { var element = e.element(); if (!element.disabled && element.name) { switch(element.getValue()) { case 'recogeroficina48_recogeroficina48': case 'recogeroficina72_recogeroficina72': if (!clicked) { clicked = true; PuntosCorreos.getPuntosCorreos(element.getValue()); } break; case 'envio48_envio48': case 'envio72_envio72': if (!clicked) { clicked = true; PuntosCorreos.getAddressPhone(element.getValue()); } break; case 'correosinter_correosinter': if (typeof ADDITIONAL_MSG_CORREOS_INTERNACIONAL != 'undefined') { $('s_method_correosinter_correosinter').next().insert({after: '
'+ADDITIONAL_MSG_CORREOS_INTERNACIONAL+'