var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function MAP_BPB_DoFSCommand(command, args) {
  var MAP_BPBObj = InternetExplorer ? MAP_BPB : document.MAP_BPB;
  //
  // Place your code here...
  
  var strKK = escape(args);
  //DO what you want with name of choosen branch Pay attention is escaped! test on IE and Firefox
  document.forms["MapForm"].BranchID.value = strKK;
  if ((document.forms["MapForm"].ShowsATM.value + document.forms["MapForm"].ShowsBranches.value == 0))
  {   document.forms["MapForm"].ShowsBranches.value = 1;   }
  document.forms["MapForm"].submit();
}

function goShowATM()
{
//alert ('Show ATM');
document.forms["MapForm"].ShowsATM.value = 1;
document.forms["MapForm"].ShowsBranches.value = 0;
document.forms["MapForm"].submit();
}

function goShowBranches()
{
//alert ('Show Branches');
document.forms["MapForm"].ShowsBranches.value = 1;
document.forms["MapForm"].ShowsATM.value = 0;
document.forms["MapForm"].submit();
}


// Hook for Internet Explorer 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
   navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
 document.write('<SCRIPT LANGUAGE=VBScript\> \n');
 document.write('on error resume next \n');
 document.write('Sub MAP_BPB_FSCommand(ByVal command, ByVal args)\n');
 document.write('  call MAP_BPB_DoFSCommand(command, args)\n');
 document.write('end sub\n');
 document.write('</SCRIPT\> \n');
}





