function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


var ith = new Array();
var sth = new Array();

function build_menu() {
  if (self.location.hash == "#h1") sth[1] = "_over"; else sth[1] = "";
  if (self.location.hash == "#h2") sth[2] = "_over"; else sth[2] = "";
  if (self.location.hash == "#h3") sth[3] = "_over"; else sth[3] = "";
  if (self.location.hash == "#h4") sth[4] = "_over"; else sth[4] = "";
  if (self.location.hash == "#h5") sth[5] = "_over"; else sth[5] = "";

  if ( (self.location.hash == "#1_1") || (self.location.hash == "#1_2") || (self.location.hash == "#1_3") || (self.location.hash == "#1_4") || (self.location.hash == "#1_5") || (self.location.hash == "#1_6") || (self.location.hash == "#1_7") || (self.location.hash == "#1_8") ) sth[1] = "_over";
  if ( (self.location.hash == "#2_1") || (self.location.hash == "#2_2") || (self.location.hash == "#2_3") || (self.location.hash == "#2_4") || (self.location.hash == "#2_5") || (self.location.hash == "#2_6") || (self.location.hash == "#2_7") || (self.location.hash == "#2_8") ) sth[2] = "_over";
  if ( (self.location.hash == "#3_1") || (self.location.hash == "#3_2") || (self.location.hash == "#3_3") || (self.location.hash == "#3_4") || (self.location.hash == "#3_5") ) sth[3] = "_over";
  if ( (self.location.hash == "#4_1") || (self.location.hash == "#4_2") ) sth[4] = "_over";
  if ( (self.location.hash == "#5_1") || (self.location.hash == "#5_2") ) sth[5] = "_over";
  if (!self.location.hash) sth[2] = "_over";

  ith[1] = "<a href=\"hotel.html#h1\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image25','','images/menu_01_over.gif',1)\"><img name=\"Image25\" border=\"0\" src=\"images/menu_01" + sth[1] + ".gif\" width=\"50\" height=\"19\"></a><img src=\"images/menu_spacer_top.gif\" width=\"2\" height=\"19\">";
  ith[2] = "<a href=\"index.php#h2\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image27','','images/menu_02_over.gif',1)\"><img name=\"Image27\" border=\"0\" src=\"images/menu_02" + sth[2] + ".gif\" width=\"69\" height=\"19\"></a><img src=\"images/menu_spacer_top.gif\" width=\"2\" height=\"19\">";
  ith[3] = "<a href=\"rest_05.html#h3\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image29','','images/menu_03_over.gif',1)\"><img name=\"Image29\" border=\"0\" src=\"images/menu_03" + sth[3] + ".gif\" width=\"172\" height=\"19\"></a><img src=\"images/menu_spacer_top.gif\" width=\"2\" height=\"19\">";
  ith[4] = "<a href=\"reservation_02.php#h4\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image12','','images/menu_04_over.gif',1)\"><img name=\"Image12\" border=\"0\" src=\"images/menu_04" + sth[4] + ".gif\" width=\"90\" height=\"19\"></a><img src=\"images/menu_spacer_top.gif\" width=\"2\" height=\"19\">";
  ith[5] = "<a href=\"contact_02.php#h5\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image14','','images/menu_05_over.gif',1)\"><img name=\"Image14\" border=\"0\" src=\"images/menu_05" + sth[5] + ".gif\" width=\"75\" height=\"19\"></a><img src=\"images/menu_spacer_top.gif\" width=\"2\" height=\"19\">";
  for (i=1; i<ith.length; i++) {
    document.write(ith[i]);
  }
}

function build_banners() {
  //document.write('<a href="last_minute.html#0">');
  //document.write('<img src="images/banners/baner2.gif" width="100" height="200" border="0" vspace="1">');
  document.write('<a href="reservation_02.php#h4">');
  document.write('<img src="images/banners/baner_informator.gif" width="100" height="200" border="0" vspace="1">');
  document.write('</a>');
}

function show_source_page() {
    window.location="view-source:" + window.location.href;
}

function openWindow(url, width, height, slide, foot) {
    if (!slide) slide = 'no';
    if (!foot) foot = 'no';
        var left = (screen.width-width)/2;
        var top = (screen.height-height)/2 - 35;
        window.open(url,"okno",'width='+ width +',height='+ height +',resizable=no,scrollbars='+ slide + ',menubar=no,status=' +foot+',top='+top+',left='+left+'');
}

function openWindowPop(url, width, height, slide, foot) {
    if (!slide) slide = 'no';
    if (!foot) foot = 'no';
        var left = 10;
        var top = 10;
        window.open(url,"okno",'width='+ width +',height='+ height +',resizable=no,toolbar=no,scrollbars='+ slide + ',menubar=no,status=' +foot+',top='+top+',left='+left+'');
	//window.open(url,"okno",'width='+ screen.width +',height='+ height +',resizable=no,toolbar=no,scrollbars='+ slide + ',menubar=no,status=' +foot+',top='+top+',left='+left+'');
}
