var DIRECTORIES = "directories";  // show directory buttons
var LOCATION    = "location";     // show location bar
var MENUBAR     = "menubar";      // show menu bar
var RESIZABLE   = "resizable";    // make window resizable
var SCROLLBARS  = "scrollbars";   // show scrollbars (if needed)
var STATUS      = "status";       // show status bar
var TOOLBAR     = "toolbar";      // show toolbar
var CENTER      = "center";       // center window
var UPPERLEFT   = "upperleft";    // display window in upper-left corner
var UPPERRIGHT  = "upperright";   // display window in upper-right corner


function openWin(url, jsName, htmlName, width, height)
  {
  var is4up = true;   // for CENTER, UPPERLEFT, UPPERRIGHT features
  var features = "";  // string to hold features argument

  if (parseInt(navigator.appVersion) < 4)  // set is4up to true/false
    is4up = false;

  // build features string
  features += "width=" + width + ",";     // width
  features += "height=" + height + ",";   // height
  for (var i=5; i<arguments.length; i++)  // additional (optional) features
    {
    if (arguments[i] == CENTER && is4up)  // center window
      {
      features += "screenx=" + (screen.width-width) / 2 + ",";
      features += "left=" + (screen.width-width) / 2 + ",";
      features += "screeny=" + (screen.height-height) / 2 + ",";
      features += "top=" + (screen.height-height) / 2 + ",";
      }
    if (arguments[i] == UPPERLEFT && is4up)  // upper-left window
      {
      features += "screenx=0,left=0,screeny=0,top=0";
      }
    if (arguments[i] == UPPERRIGHT && is4up)  // upper-right window
      {
      features += "screenx=" + (screen.width-width-(screen.width/100)) + ",";
      features += "left=" + (screen.width-width-(screen.width/100)) + ",";
      features += "screeny=0,top=0,";
      }
    else  // all additional features besides CENTER, UPPERLEFT, UPPERRIGHT
      {
      features += arguments[i] + "=1,";
      }
    }
  jsName = window.open(url, htmlName, features);
  }


if (document.images) {

hotel = new Image(130,25);
hotel.src = "images/hotel_button.jpg";
hotel_r = new Image(130,25);
hotel_r.src = "images/hotel_button_on.jpg";

apie = new Image(130,25);
apie.src = "images/apie_button.jpg";
apie_r = new Image(130,25);
apie_r.src = "images/apie_button_on.jpg";

rasti = new Image(130,25);
rasti.src = "images/rasti_button.jpg";
rasti_r = new Image(130,25);
rasti_r.src = "images/rasti_button_on.jpg";

kontaktai = new Image(130,25);
kontaktai.src = "images/kontaktai_button.jpg";
kontaktai_r = new Image(130,25);
kontaktai_r.src = "images/kontaktai_button_on.jpg";

sveciai = new Image(130,25);
sveciai.src = "images/sveciai_button.jpg";
sveciai_r = new Image(130,25);
sveciai_r.src = "images/sveciai_button_on.jpg";

pervezimai = new Image (130,25);
pervezimai.src = "images/pervezimai_button.jpg";
pervezimai_r = new Image (130,25);
pervezimai_r.src = "images/pervezimai_button_on.jpg";

}


function on_off(htmlName,image) {
if (document.images) {
document.images[htmlName].src = eval(image + ".src")
}}


