greenSign=new Image(30,70);
yellowSign=new Image(30,70);
redSign=new Image(30,70);

error=false;
loaded=false;

function Load()
{
 greenSign.src='graphics/sign_green.gif';
 yellowSign.src='graphics/sign_yellow.gif';
 redSign.src='graphics/sign_red.gif';

 vlay.infoWindow.style.visibility='hidden';
 vlay.infoWindow.style.position='absolute';
 vlay.infoWindow.style.top=50;
 vlay.infoWindow.style.left=50;

 vlay.errorWindow.style.visibility='hidden';
 vlay.errorWindow.style.position='absolute';
 vlay.errorWindow.style.top=50;
 vlay.errorWindow.style.left=50;
}
function ShowPage()
{
 window.open('show.htm','IDH_Zakopane','left=15,top=5,width=980,height=680,status,resizable');
 if(error)STPE.I()['infoSign'].src=redSign.src; else STPE.I()['infoSign'].src=greenSign.src;
}
function HideWindow()
{
 vlay.infoWindow.style.visibility='hidden';
 vlay.errorWindow.style.visibility='hidden';
 if(error)STPE.I()['infoSign'].src=redSign.src; else STPE.I()['infoSign'].src=greenSign.src;
}
function Check()
{
 if(error)
 {
  if(loaded)
  {
   vlay.infoWindow.style.visibility='hidden';
   vlay.errorWindow.style.visibility='visible';
  }
  else loaded=true;
  STPE.I()['infoSign'].src=redSign.src;
 }
 else
 {
  if(loaded)
  {
   vlay.infoWindow.style.visibility='visible';
   vlay.errorWindow.style.visibility='hidden';
   STPE.I()['infoSign'].src=greenSign.src;
  }
  else
  {
   STPE.I()['infoSign'].src=yellowSign.src;
   loaded=true;
  }
 }
}
