
function NewWindow(mypage,w,h,myname,scroll){
    var win = null;
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;


   settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no';

    win = window.open(mypage,myname,settings).focus();
}


function sc(){
    window.scrollTo(0,300);
    window.focus();
}

function MapWindowKrakow(mypage){
    var win = null;
    var w=640;
    var h=525;
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    myname="MAP";
    
    settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no, resizable=no';
    
    win = window.open('',myname,settings);
    win.location.href=mypage;    
    win.onload=sc;
    //window.scrollTo(0,500);
    
}

function MapWindow(mypage){
    var win = null;
    var w=640;
    var h=750;
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    myname="MAP";
    
    settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no, resizable=no';
    
    win = window.open('',myname,settings);
    win.location.href=mypage;    
    win.onload=sc;
    //window.scrollTo(0,500);
    
}

//area pics
var DHTML = (document.getElementById || document.all || document.layers);

function invi(flag)
{
	if (!DHTML) return;
	var x = new getObj('modAreas');
	if (x.style.visibility == 'visible')
		flag = 1;
	else
		flag = 0;
	x.style.visibility = (flag) ? 'hidden' : 'visible';
	x.style.display = (flag) ? 'none' : 'block';
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}
