var actions = "nothin";

function mo(sth){
  sth.className='mout';
}
function mh(sth){
  sth.className='mover';
}
function mt(sth, loc){  // just for copy
  sth.className='mclick';
  window.location = loc;
}
function mc(sth, loc, pic){  // for others
  sth.className='mclick';
  document.getElementById("mainframe").src = "pages/" + loc + ".html";

  actpic = document.getElementById("mainpic").src;
  newpic = pic;
  check = actpic.match(newpic);
  if(check == null){
    actions = "minimizing";
    image_minimize(pic);
  }
  return false;
}

function image_minimize(pic){
 document.getElementById("mainpic").width = document.getElementById("mainpic").width - 20;
 if(document.getElementById("mainpic").width > 1){
   if(actions == "minimizing") setTimeout("image_minimize('"+pic+"')", 1);
 }
 else{
   document.getElementById("mainpic").src = pic;
   document.getElementById("mainpic").width = 5;
   actions = "maximizing";
   image_maximize();
 }
}

function image_maximize(){
 if(document.getElementById("mainpic").width < 760){
   document.getElementById("mainpic").width = document.getElementById("mainpic").width + 20;
   if(actions == "maximizing") setTimeout("image_maximize()", 1);
 }
 else {
   document.getElementById("mainpic").width = 770;
   actions = "nothin";
 }
}

//browser test
var version_ok = false;
if((navigator.appName.substring(0,8) == "Netscape") && (navigator.appVersion.charAt(0) >= "3")) version_ok = true;
if((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.charAt(0) >= "4")) version_ok = true;

//preload universal images
if (version_ok)
{
  img1 = new Image(770,220);
  img1.src = "head_a.jpg";

  img2 = new Image(770,220);
  img2.src = "head_vozovypark.jpg";
}

