function wyslijDoFlasha()
{

 
 var id_x = document.getElementById('x');
 var id_y = document.getElementById('y');
 var id_zoom = document.getElementById('zoom');
 
 var vx = id_x.value;
 var vy = id_y.value;
 var vzoom = id_zoom.value;
 
 /*window.document.write('x = '+vx+'<br/>');
 window.document.write('y = '+vy+'<br/>');
 window.document.write('zoom = '+vzoom+'<br/>');*/
 
 
 window.document.nawigator.SetVariable('px' , vx);
 window.document.nawigator.SetVariable('py' , vy);
 window.document.nawigator.SetVariable('pzoom' , vzoom);
 window.document.nawigator.SetVariable('panimacja' , 'false');
 
 window.document.nawigator.SetVariable('js_command' , 'ustawZoom');

}

function ustawZoom(adresowanie_wzgledne, vzoom, vanimacja, vx, vy)
{
 
 // alert('ustawZoom('+adresowanie_wzgledne+', '+vzoom+', '+vanimacja+', '+vx+', '+ vy+' )');
 // wywolanie: ustawZoom(czy_adresowac_wzglednie, wartosc powiekszenia w %, czy_animowac (true/false), wspolrzedna x nowego srodka, wspolrzedna y nowego srodka
 // jezeli zostanie podana wartosc null to wartosc ta jest ignorowana (
 // Przykłady użycia
 // aby zmienić samo powiększenie: ustawZoom(false, nowe_powiekszenie, true, null, null)
 // aby tylko przesuąć mapę: ustawZoom(false, null, true, nowe_x, nowe_y)
 // aby przesunąć i zmienić powiększenie ustawZoom(false, nowe_powiekszenie, true, nowe_x, nowe_y)
 // aby zoomowanie i przesuwanie NIE bylo animowane parametr drugi musi byc false. (Domylsna wartosc = true)
 // Pierwszy parametr (adresowanie_wzgledne) pozwala wprowadzac wartosci wgledne, np. +20, -10  
 
 if (vx!=null) window.document.nawigator.SetVariable('px' , (vx*1));
 if (vy!=null) window.document.nawigator.SetVariable('py' , (vy*1));
 if (vzoom!=null) window.document.nawigator.SetVariable('pzoom' , (vzoom*1));
 if (vanimacja!=null) window.document.nawigator.SetVariable('panimacja' , vanimacja+'');
 if (adresowanie_wzgledne!=null) window.document.nawigator.SetVariable('pwzgledne' , adresowanie_wzgledne+'');
 
 window.document.nawigator.SetVariable('js_command' , 'ustawZoom');

}

function zablokujNawigacje()
{
 window.document.nawigator.SetVariable('nawigacjaOdblokowana' , 'false');
}

function odblokujNawigacje()
{
 window.document.nawigator.SetVariable('nawigacjaOdblokowana' , 'true');
}

function pokazWspolrzedne()
{
 window.document.nawigator.SetVariable('wspolrzedneWidoczne' , 'true');
}

function ukryjWspolrzedne()
{
 window.document.nawigator.SetVariable('wspolrzedneWidoczne' , 'false');
}

function pokazTyp(typ)
{
 // parametr '*' oznacza - WSZYSTKIE TYPY
 window.document.nawigator.SetVariable('js_command' , 'pokazTyp');
 window.document.nawigator.SetVariable('ptyp' , typ);
}

function ukryjTyp(typ)
{
 // parametr '*' oznacza - WSZYSTKIE TYPY
 window.document.nawigator.SetVariable('js_command' , 'ukryjTyp');
 window.document.nawigator.SetVariable('ptyp' , typ);
}

function wyroznijObiekt(id)
{
 // parametr '*' oznacza - WSZYSTKIE OBIEKTY (przywraca widocznosc 100%)
 window.document.nawigator.SetVariable('js_command' , 'wyroznijObiekt');
 window.document.nawigator.SetVariable('id' , id);

}

function pokazDymek(id)
{
 window.document.nawigator.SetVariable('js_command' , 'pokazDymek');
 window.document.nawigator.SetVariable('id' , id);
}

function schowajDymek()
{
 window.document.nawigator.SetVariable('js_command' , 'schowajDymek');
}



/* Obsluga transmisji FLASH -> JS */


function przekazWspolrzedne(px, py, pzoom)
{
 document.getElementById('x').value = px;
 document.getElementById('y').value = py;
 document.getElementById('zoom').value = pzoom;
}


function onMapLoad()
{
 // window.document.nawigator.SetVariable('przekazujWspolrzedne', true);
}

/*
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function nawigator_DoFSCommand(command, args)                
{
  var nawigatorObj = InternetExplorer ? nawigator : document.nawigator;
  // alert (command);
  if (command=='przekaz_x') document.getElementById('x').value = args;
  if (command=='przekaz_y') document.getElementById('y').value = args;
  if (command=='przekaz_z') document.getElementById('zoom').value = args;
  if (command=='onLoad') onMapLoad(args);
}

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 nawigator_FSCommand(ByVal command, ByVal args)\n');
  document.write(' call nawigator_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCRIPT\> \n');
} 
*/


