var current_request = '';  

function switchCurrency(obj)
{
   var switch_to = obj.value;
   current_request = switch_to;
   var loading_currency_div = document.getElementById('loading_currency_div');
   var currency_sheet_div = document.getElementById('currency_sheet_div');
   currency_sheet_div.style.display = 'none';
   var loading_text = (switch_to == 'EUR') ? loading_text_EUR.replace('?1',server_property_name) : loading_text_OTH.replace('?1',server_property_name).replace('?2',switch_to).replace('?3',currencies[switch_to]);
   var loading_html = '<table width="420"><tr><td align="center" valign="middle" style="font-family:Courier New;font-size:12px;color:#99BBDD;">?1</td></tr><tr><td align="center" valign="middle"><div style="padding-top:15px;padding-bottom:30px;"><img src="/images/loading.gif" border="0"></div></td></tr></table>'.replace('?1',loading_text);
   loading_currency_div.innerHTML = loading_html;
   loading_currency_div.style.display = '';
   var url = '/ajax/get_pricing_periods_in_currency.ajax.php?currency='+switch_to+'&id='+server_property_id;
   ajaxRequestAlt(url, true, 'switchCurrencyResponse');
}


function switchCurrencyResponse()
{
   if (xmlHttpAlt.readyState==4)
   {
      rc = xmlHttpAlt.responseText;
      var loading_currency_div = document.getElementById('loading_currency_div');
      var currency_sheet_div = document.getElementById('currency_sheet_div');
      loading_currency_div.style.display = 'none';
      currency_sheet_div.innerHTML = rc;
      currency_sheet_div.style.display = '';
      _gaq.push(['_trackPageview',server_request_uri+'-'+current_request]);   
   }
}


