  function showbig(picname,alt){     
    
    window.open('http://www.gorodu.net/includes/foto.php5?pic='+picname+'&alt='+alt,'_blank','scrollbars=yes,taskbar=no,resizeable=no,status=no,menubar=no,top=30,left=30,width=30,height=30');
  }


  function showFlash(path,alt,width,height, mode){
    /*(function($){        
        ff = $('#frame');
        
        ff.attr('src', 'http://www.gorodu.net/includes/flash.php5?id='+path,'_blank','scrollbars=yes,taskbar=no,resizeable=no,status=no,menubar=no,top=0,left=0,width='+width+',height='+height);
        ff.attr('onload', function(){            
            ff.show();            
        });
    })(jQuery);*/
    /*$.get('http://www.gorodu.net/includes/flash.php5?id='+path,'_blank','scrollbars=yes,taskbar=no,resizeable=no,status=no,menubar=no,top=0,left=0,width='+width+',height='+height, {}, function(){
        alert('tyt');
    });*/
    /*var tt = document.getElementById("frame");    
    tt.style.display = 'block';    
    tt.src = 'http://www.gorodu.net/includes/flash.php5?id='+path,'_blank','scrollbars=yes,taskbar=no,resizeable=no,status=no,menubar=no,top=0,left=0,width='+width+',height='+height;*/
    //tt.innerHTML='';
       var src = '';
       var width = '';
       var height = '';
       var isiPad;
      (function($){
          $(document).ready(function(){
              isiPad = navigator.userAgent.match(/iPad/i) != null;                                  
              //isiPad = true;
              src = $('.src.'+path).val();
              width = $('.width.'+path).val();
              height = $('.height.'+path).val();
              
              
              $('.plan').css({
                  visibility: "hidden"
              });
              
              $('#plan1').show();
              
              /*alert($('body').width());
              alert($(document).width());
              alert($(document).height());*/
              $(document).scrollTop(0);
              $('#plan1').height($(window).height());
              $('#plan1').css({
                  top: '0px',                  
              });
              
              
              $('#plan1 .pos').css({
                  marginTop: Math.max($(window).height()/2 - height/2,0) + 'px',
                  marginLeft: Math.max($(window).width()/2 - width/2,0) + 'px',
                  width: width + 'px'
              });              
              $(window).resize(function(){                  
                  $('#plan1 .pos').css({
                    marginTop: Math.max($(window).height()/2 - height/2,0) + 'px',
                    marginLeft: Math.max($(window).width()/2 - width/2,0) + 'px'
                  });
              });
              if (!isiPad) {
                  $('html, body').css({
                      overflow: "hidden"
                  });
              }  else {                  
                  $('#plan1').height(Math.max($(window).height(), parseInt(height)+150));
              }
              
                  
                  
                            
              $('#closePlan').click(function(){
                  $('html, body').css({
                      overflow: 'auto'
                  });
                  $('#plan1').hide();
                  $('#genplan').attr('src', '');
                  $('.plan').css({
                    visibility: "visible"
                  });
                  return false;
              });
              $('#genplan').width(width);
              $('#genplan').height(height);
              $('#genplan').attr('src', src);
              $('#genplan').show();
              $(window).resize(function(){   
                  if (!isiPad) {
                    $('#plan1').height($(window).height());
                  } else {
                    $('#plan1').height(Math.max($(window).height(), parseInt(height)+50));
                  }
                  $('#plan1').css({
                      top: '0px'
                  });
              });
          });
          
          
      })(jQuery);            
      //swfobject.embedSWF(src, "genplan", width, height, "9.0.0", "expressInstall.swf", {}, {"quality": "hight", "bgcolor": "#222024", "play": "true", "loop":"true", "scale": "showall", "menu": "true", "wmode": "transparent", "allowScriptAccess": "always"});
      //window.open('http://www.gorodu.net/includes/flash.php5?id='+path,'_blank','scrollbars=yes,taskbar=no,resizeable=no,status=no,menubar=no,top=0,left=0,width='+width+',height='+height);
    
  }
  
  
  function showPlayer(){  
  	
      window.open('http://gorodu.net/includes/player.html','_blank','scrollbars=no,taskbar=no,resizeable=no,status=no,menubar=no,top=0,left=0,width=138,height=10');
  }

  function show(param){
    window.setTimeout('showr("'+param+'");',30);
  }
  
  function showr(param){
    objects = new Array('zerk','peski','sale','boris','podg','olsh');
    flag = true;
    for(i in objects){
      if(document.getElementById('big_'+objects[i]).style.visibility  == 'visible'){
        flag = false;
        break;
      }
    }
    if(flag)
     document.getElementById('big_'+param).style.visibility = "visible";
  }

  function hide(param){
    obj_big = document.getElementById('big_'+param);
    obj_big.style.visibility = 'hidden';
  }



  function PreLoad(source){
    var NewImage = new Image();
    NewImage.src = source;
  }

  function prepareSubmit(frm){
   var len = frm.all("editbox").length; if (!len) len = 1;
    for (var i=0; i<len; i++)
      frm.all("codebox", i).innerText = frm.all("codebox", i).style.display ? borderOn(frm.all("codebox", i).innerText) : borderOn(frm.all("editbox", i).innerHTML);
  }

 function menuProcess(menuId){
    if(menuId.style.display == 'none'){
     menuId.style.display = 'block';
   }else{
      menuId.style.display = 'none';
   }
 }


