Lat = new String("\" S]        F,DULT;PBQRKVYJGHCNEA[WXIO]SM'.Zf,dult;pbqrkvyjghcnea[wxio]sm'.z    \" s]");
Buf = new String();
Wbuf = new String();


function cyr()	// Перекодирование в латиницу:
{

        var src;
        var dest;
        var code;
        var obj = document.getElementById('search');


        Buf = obj.value;

        Wbuf = '';
        for (var i = 0; i < Buf.length; i++)
        {
                src = Buf.charAt(i);
                code = Buf.charCodeAt(i);
                dest = src;


                if ((code > 1024) && (code < 1112)){

                        dest = Lat.charAt(code - 1028);
                }

                Wbuf = Wbuf + dest;

        }

        if (Buf != Wbuf) {
                obj.value = Wbuf;
        }

}

function init() {
	
	if (document.getElementById('tableContent')) {
	    document.getElementById('divContent').style.width =
	    	   document.getElementById('tableContent').clientWidth + 18;
	}

}


$(document).ready(function() {
    $('#buttonLogin').click(function() {
        location.href='/login.php';
    });

    $('#buttonLogout').click(function() {
        location.href='/login.php?logout';
    });

    $('#buttonRegister').click(function() {
        location.href='/register.php';
    });
});
