function otvor (theURL,wx,wy) {
mx=Math.round((screen.width-wx)/2);
tab=window.open(theURL,"tab","width="+wx+",height="+wy+",toolbar=no,directories=no,scrollbars=no,location=no,resizable=no,menubar=no,left="+mx+",top=10").focus();
}
function otvor1 (theURL,wx,wy) {
mx=Math.round((screen.width-wx)/2);
tab=window.open(theURL,"tab","width="+wx+",height="+wy+",toolbar=no,directories=no,scrollbars=no,location=no,resizable=yes,menubar=no,left="+mx+",top=10").focus();
}
function otvor2 (theURL,wx,wy) {
mx=Math.round((screen.width-wx)/2);
tab=window.open(theURL,"tab","width="+wx+",height="+wy+",toolbar=no,directories=no,scrollbars=yes,status=no,location=no,resizable=no,menubar=no,left="+mx+",top=5").focus();
}
browser_version= parseInt(navigator.appVersion);
browser_type = navigator.appName;
if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4))
{
document.write('<style type="text/css">');
document.write('html ');
document.write('{scrollbar-arrow-color: #FFFFFF;scrollbar-base-color: #B3B3B3;scrollbar-dark-shadow-color: #B3B3B3;');
document.write('scrollbar-track-color: #EEEEEE;scrollbar-face-color: #B3B3B3;scrollbar-shadow-color: #B3B3B3;');
document.write('scrollbar-highlight-color: #B3B3B3;scrollbar-darkshadow-color: #B3B3B3;scrollbar-3d-light-color: #B3B3B3;}');
document.write('</style>');
}

var mousefollow=true;


var dofade=true;
var centertext=false;

var xoffset=1;
var yoffset=1;

function altProps(){
this.ns4=(navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? true : false;
this.ie4=(document.all && !document.getElementById)? true : false;
this.ie5=(document.getElementById && document.all)? true : false;
this.ns6=(document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
this.w3c=(document.getElementById)? true : false;
this.w_y=0;
this.w_x=0;
this.navtxt=0;
this.boxheight=0;
this.boxwidth=0;
this.ishover=false;
this.isloaded=false;
this.ieop=0;
this.op_id=0;
this.oktomove=false;
}

var AT=new altProps();

function getwindowdims(){
AT.w_y=(AT.ie5||AT.ie4)?document.body.clientHeight:window.innerHeight;
AT.w_x=(AT.ie5||AT.ie4)?document.body.clientWidth:window.innerWidth;
}

function getboxwidth(){
if(AT.ns4)AT.boxwidth=(AT.navtxt.document.width)? AT.navtxt.document.width : AT.navtxt.clip.width;
else if(AT.ie4)AT.boxwidth=(AT.navtxt.style.pixelWidth)? AT.navtxt.style.pixelWidth : AT.navtxt.offsetWidth;
else AT.boxwidth=(AT.navtxt.style.width)? parseInt(AT.navtxt.style.width) : parseInt(AT.navtxt.offsetWidth);
}

function getboxheight(){
if(AT.ns4)AT.boxheight=(AT.navtxt.document.height)? AT.navtxt.document.height : AT.navtxt.clip.height;
else if(AT.ie4)AT.boxheight=(AT.navtxt.style.pixelHeight)? AT.navtxt.style.pixelHeight : AT.navtxt.offsetHeight;
else AT.boxheight=parseInt(AT.navtxt.offsetHeight);
}

function movenavtxt(x,y){
if(AT.ns4)AT.navtxt.moveTo(x,y);
else{
AT.navtxt.style.left=x+'px';
AT.navtxt.style.top=y+'px';
}}

function getpagescrolly(){
if(AT.ie5||AT.ie4)return document.body.scrollTop;
else return window.pageYOffset;
}

function getpagescrollx(){
if(AT.ie5||AT.ie4)return document.body.scrollLeft;
else return window.pageXOffset;
}

function writeindiv(text){
if(AT.ns4){
AT.navtxt.document.open();
AT.navtxt.document.write(text);
AT.navtxt.document.close();
}
else AT.navtxt.innerHTML=text;
}

function writetxt(text){
if(AT.isloaded){
if(text!=0){
AT.oktomove=true;
AT.ishover=true;
if(AT.ns4)text='<div class="navtext">'+((centertext)?'<center>':'')+text+((centertext)?'</center>':'')+'</div>';
writeindiv(text);
if(AT.ns4)AT.navtxt.visibility="show";
else{
AT.navtxt.style.visibility="visible";
AT.navtxt.style.display="block";
}
getboxheight();
if((AT.w3c || AT.ie4) && dofade){
if(AT.ie4||AT.ie5)AT.navtxt.style.filter="alpha(opacity=0)";
if(AT.ns6)AT.navtxt.style.MozOpacity=0;
AT.ieop=0;
AT.op_id=setInterval('incropacity()',50);
}}else{
if(AT.ns4)AT.navtxt.visibility="hide";
else{
if(dofade)clearInterval(AT.op_id);
AT.navtxt.style.display="none";
AT.navtxt.style.visibility="hidden";
}
writeindiv('');
//AT.ishover=false;
}}}

function incropacity(){
if(AT.ieop<=100){
AT.ieop+=7;
if(AT.ie4||AT.ie5)AT.navtxt.style.filter="alpha(opacity="+AT.ieop+")";
if(AT.ns6)AT.navtxt.style.MozOpacity=AT.ieop/100;
}else clearInterval(AT.op_id);
}

function moveobj(evt){
if(AT.isloaded && AT.ishover && AT.oktomove){
margin=(AT.ie4||AT.ie5)?5:25;
if(AT.ns6)if(document.height+27-window.innerHeight<0)margin=15;
if(AT.ns4)if(document.height-window.innerHeight<0)margin=10;
mx=(AT.ie5||AT.ie4)?event.clientX:evt.pageX;
my=(AT.ie5||AT.ie4)?event.clientY:evt.pageY;
if(AT.ns4||AT.ns6)mx-=getpagescrollx();
if(AT.ns4)my-=getpagescrolly();
xoff=mx+xoffset;
yoff=(my+AT.boxheight+25-((AT.ns6)?getpagescrolly():0)+margin>=AT.w_y)? -15-AT.boxheight: 30;
movenavtxt( Math.min(AT.w_x-AT.boxwidth-margin , Math.max(2,xoff))+getpagescrollx(), my+yoff+((!AT.ns6)?getpagescrolly():0));
if(!mousefollow)AT.oktomove=false;
}}

if(AT.ns4)document.captureEvents(Event.MOUSEMOVE);

document.onmousemove=moveobj;

window.onload=function(){
  AT.navtxt=(AT.ns4)? document.layers['navtxt'] : (AT.ie4)? document.all['navtxt'] : (AT.w3c)? document.getElementById('navtxt') : null;
  getboxwidth();
  getboxheight();
  getwindowdims();
  AT.isloaded=true;
  if((AT.w3c || AT.ie4) && centertext)AT.navtxt.style.textAlign="center";
  if(AT.w3c)AT.navtxt.style.padding='4px';
  if(AT.ie4 || AT.ie5 && dofade)AT.navtxt.style.filter="alpha(opacity=0)";
  }

window.onresize=getwindowdims;

function Sound(surl) {
  document.getElementById("dummy").innerHTML=
    "<embed src='"+surl+"' hidden=true autostart=true loop=true>";
}

function EvalSound(soundobj) {
  var thissound=document.getElementById(soundobj);
  thissound.Play();
}

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

function blockError(){return true;}
window.onerror = blockError;

<!--
var text=" Priorita celého projektu: Sídlisko bude odovzdané do užívania zákazníkom v jednom termíne (08/2008), čo umožní ihneď po<BR>nasťahovaní vysokú kvalitu bývania bez namáhania životného prostredia stavebným ruchom.";

var delay=50;
var currentChar=1;
var destination="[none]";
function type()
{
	//if (document.all)
	{
		var dest=document.getElementById(destination);
		if (dest)// && dest.innerHTML)
		{
			dest.innerHTML=text.substr(0, currentChar)+"_";
			currentChar++;
			if (currentChar>text.length)
			{
				currentChar=1;
				setTimeout("type()", 5000);
			}	
			else
			{
				setTimeout("type()", delay);
			}
		}
	}
}

function startTyping(textParam, delayParam, destinationParam)
{
	text=textParam;
	delay=delayParam;
	currentChar=1;
	destination=destinationParam;
	type();
}
//-->





