<!--
//òû èå?
var ie = 0/*@cc_on+@_jscript_version*10/10@*/;


if (!window.opera) {
        try {
                        document.execCommand("BackgroundImageCache", false, true);
        } catch(err) {}
}

$(document).ready(
        function() {
                $('#search div input').focus(function(){
                        if ($(this).val()=='ïîèñê') $(this).val('');
                });
                $('#search div input').blur(function(){
                        if (!/[\wà-ÿÀ-ß]/.test($(this).val())) $(this).val('ïîèñê');
                });
                $('#menu li li li:last').css('border-color','#f4f3ef');
                i = 0;
                fsize = new Array("12px","13px","14px","15px","16px", "17px");
                $('#font a').click(function(){
                        i++;
                        if (i>5) i = 0;
                        $('#text').css('font-size',fsize[i]);
                        $('#text table td').css('font-size',fsize[i]);
                        return false;
                });
                $('#form input').add('#form textarea').focus(function(){
                        $(this).css('background','#fff');
                });
                $('#form input').add('#form textarea').blur(function(){
                        $(this).css('background','#f4f3ef');
                });
        }
);

function closeme() {

  $('#sovet').remove();
  $('#TB_window').hide();
  $('#TB_overlay').hide();
}

function getClientHeight()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}

function getClientWidth()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}

//îòêðûâàåì ïîïàï
function openme(id) {

                      $('#TB_overlay').show();

/////////ñ÷èòàåì îòñòóïû ñâåðõó-ñëåâà
        hght=400 /* ÂÛÑÎÒÀ òàáëèöû  */
        wdth = 500 //øèðèíà

        var theBody = document.getElementsByTagName('body')[0];

    height = getClientHeight();
    width = getClientWidth();

        mg = height-hght;
        mg=mg/2;

        wg = width-wdth;
        wg=wg/2;

/*        if(ie)
        {
          $("#TB_window").css('padding-top', mg);
          $("#TB_window").css('padding-left', wg);
        }
        else
        {*/
          $("#TB_window").css('margin-top', mg);
          $("#TB_window").css('margin-left', wg);
//        }

/////ïîñ÷èòàëè

 path = '/to_ajax/action_sovet/';
if (id)
  path += 'id_'+id+'/';
                      $('#TB_window').load(path);
                      $('#TB_window').show();

}



// -->
