function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);}
function preload(imgName) {i=new Image(); i.src="img/"+imgName;}

preload("bckg_body.gif");
preload("bckg_zahl.gif");
preload("cze.gif");
preload("deu.gif");
preload("eng.gif");
preload("odr_off.gif");
preload("odr_on.gif");
preload("p_tisk.gif");
preload("sipka.gif");
preload("zahl_ost_1.jpg");
preload("zahl_ost_2.jpg");
preload("odr_modra.gif");

function T_gobj(x){var m;if(document.getElementById){m=document.getElementById(x)}else if(document.all){m=document.all[x]}else if(document.layers){m=document[x]}return m;}
function T_gstyle(x){var m;m=T_gobj(x);if(!(document.layers)){if(m)m=m.style;}return m;}
function T_ostyle(m){if(!(document.layers)){if(m)m=m.style;}return m;}

function oWin(pFileName, i_width, i_height, pTitle, pClose) {
  var owidth=(i_width+50>screen.width)?screen.width-62:i_width , oheight=(i_height+86>screen.height)?screen.height-166:i_height;
//  photoWin = window.open( "", "photo", "width=600,height=450,status,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40");
  if ((owidth!=i_width) || (oheight!=i_height))
    photoWin = window.open( "", "", "width="+(owidth+50)+",height="+(oheight+86)+",menubar,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40");
  else
    photoWin = window.open( "", "", "width="+(owidth+50)+",height="+(oheight+86)+",resizable,screenX=20,screenY=40,left=20,top=40");
  photoWin.document.write('<html><head><title>' + pTitle + '</title>');
  photoWin.document.write('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">');
  photoWin.document.write('<style type="text/css">a.window:hover {color: #FF0000;}</style>');
  photoWin.document.write('</head>');
  photoWin.document.write('<body bgcolor="#ffffff" text="#333333" link="#FFFFFF" vlink="#333333" alink="#FF0000" style="font-family: Arial, Helvetica, sans-serif;">');
  photoWin.document.write('<div align="center"><b>' + pTitle + '</b><br />');
  photoWin.document.write('<a class="window" href="javascript:self.close()">');
  photoWin.document.write('<img style="border-color: #D8D8D8 #D8D8D8 #D8D8D8 #D8D8D8;" src="' + pFileName + '" width="' + i_width + '" height="' + i_height + '" border="1" alt="' + pClose + '" /><br />');
  photoWin.document.write('<small>' + pClose + '</small></a><br /></div>');
  photoWin.document.write('</body></html>');
  photoWin.document.close();
  photoWin.focus();
}


function newsWin(soubor) {
	x = 640;
	y = 480;
	okno = window.open (soubor + ".html","news","width="+x+",height="+y+",toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=1,copyhistory=0");
	okno.moveTo(((screen.availWidth-x)/2),((screen.availHeight-y)/2));
}


var divCurrent=0;

function popup(divNumber,nohide) {
 var divName='popup';
 if(divCurrent!=0 && !nohide) {
   var divHide=divName+divCurrent;
   T_gstyle(divHide).visibility='hidden';
 }
 if(divNumber!=0) {
   var divShow=divName+divNumber;
   T_gstyle(divShow).visibility='visible';
 }
 divCurrent=divNumber;
}

function hidepopup(divNumber) {
 var divName='popup';
 if(divNumber!=0) {
   var divHide=divName+divNumber;
   T_gstyle(divHide).visibility='hidden';
 }
}

function highlight(id,show) {
 if (id!='') {
   if (show) { T_gstyle(id).color='#FF0000'; }
   else { T_gstyle(id).color=''; }
 }
}


var divCurrenttext=1;

function htext(divNumber) {
 var divName='htext';
 if(divCurrenttext!=0) {
   var divHide=divName+divCurrenttext;
   T_gstyle(divHide).display='none';
 }
 if(divNumber!=0) {
   var divShow=divName+divNumber;
   T_gstyle(divShow).display='block';
 }
 divCurrenttext=divNumber;
}

function fixed(id) {
if (document.body.scrollTop > 200)
  {
    T_gstyle(id).display = 'block';
    T_gstyle(id).top = document.body.scrollTop + document.body.clientHeight - T_gobj(id).clientHeight - 2;
  }
else T_gstyle(id).display = 'none';
}


function zobraz(elementID)
{
	//reset
	document.getElementById("PARKHOTEL").style.display 	= "none";
	document.getElementById("EXPO").style.display 		= "none";
	document.getElementById("ALTA_BEST_WESTERN").style.display 	= "none";
	document.getElementById("SPLENDID").style.display 	= "none";
	document.getElementById("HENRY").style.display 		= "none";
	document.getElementById("OLGA").style.display 		= "none";

	//zobrazit
  document.getElementById(elementID).style.display = "";
};
