window.Status = 0;
 
  function Show(id, el) {
    document.getElementById('submenu'+id).style.display = "";
    el.blur();
  }

  function OfferForm() {
    if(window.Status == 0) {
      window.Formsl = new FSite2.Layer('form_layer', true, 'formlayer');
      window.Black = new FSite2.Layer('black_layer', false, 'blacklayer');
      LoadForm();
      Black.fullScreen();
      Formsl.show();
    } else {
      document.getElementById('formlayer').style.display = "";
      document.getElementById('blacklayer').style.display = "";      
    }
  }

  function OfferClose() {
    document.getElementById('formlayer').style.display = "none";
    document.getElementById('blacklayer').style.display = "none";
    //window.Status = 0;
  }

  function LoadForm() {
    var Req = new Request({
      url:'/offer2.php',
      onSuccess: function(HTML) {
        $('formlayer').set('text', '');
        $('formlayer').innerHTML = HTML;
        window.Status = 1;
      }
    }).get();
  }
  
  function Offer() {
    var Req = new Request({
      url:'/offer.php',
      onSuccess: function(HTML) {
        $('formlayer').set('text', '');
        $('formlayer').innerHTML = HTML;
      }
    }).post($('offer_'));
  }
  
  
  function Flash(swf, id, write, w, h, baner) {
    var flash = new SWFObject('/'+swf, id, w, h, '8');
    flash.addParam("quality", "high");
    flash.addParam("wmode", "transparent");
    if(baner) {
      flash.addVariable("id", baner);
    }
    flash.write(write);
  }
  
  function Contact() {
    var Req = new Request({
      url:'/contact.php',
      onSuccess: function(HTML) {
        $('contact__').set('text', '');
        $('contact__').innerHTML = HTML;
      }
    }).post($('contact_'));
  }


  function Fullscreen(url) {
    var Bg = new FSite2.Layer('layer', true, 'fsimage');
    var Bg2 = new FSite2.Layer('layer2');
    Bg2.fullScreen();
    img=document.createElement('img');
    img.src=url;
    img.onclick=function () {
     Bg.remove();
     Bg2.remove();
    }
    img.style.border='4px solid #fff';
    img.style.margin='5px';
    img.style.cursor='pointer';
    Bg.object.appendChild(img);
    img.onload=function() {
      Bg.show();
    }
  }
  
  function Loc(l) {
    document.location = l;
  }
  
  function Over(el, C) {
    el.style.cursor = "pointer";
    td = el.getElementsByTagName("td");
    for(i=0; i<td.length; i++) {
      td[i].style.cursor = "pointer";
    }
    el.style.background = "#8c6577";
  }
  
  function Out(el, C) {
    el.style.cursor = "pointer";
    td = el.getElementsByTagName("td");
    for(i=0; i<td.length; i++) {
      td[i].style.cursor = "pointer";
    }
    el.style.background = "url('img/dot.gif') repeat-x  bottom";
  }

function onItem(nr)
{
  document.getElementById('first_' + nr).className='';
}

function outItem(nr)
{
  document.getElementById('first_' + nr).className='first';
}

