/*
Tento javascriptový kód je můj vlastní.
Pokud ho chcete použít je šířen pod licencí:
Uveďte autora-Neužívejte dílo komerčně-Zachovejte licenci 3.0 Česko
http://creativecommons.org/licenses/by-nc-sa/3.0/cz/
Jaroslav "Rajmund" Hutař
*/
raja = new fce();
function fce() {
    this.rotate = function (id, uhel) {  
        document.getElementById(id).style.WebkitTransform="rotate("+uhel+"deg)";
        document.getElementById(id).style.MozTransform="rotate("+uhel+"deg)";
        document.getElementById(id).style.OTransform="rotate("+uhel+"deg)";
        }
     this.bubble_down = function(pole){
        var x,newn;
        n=pole.length;
        while (n > 1) {
            newn=0;
            for (i=0;i<(n-1);i++){
                if (pole[i]<pole[i+1]) {
                    x=pole[i];
                    pole[i]=pole[i+1];
                    pole[i+1]=x;
                    newn=i;
                    }
                }
            n=newn+1;
            }
        }
    this.bubble_up = function(pole){
        var x,newn;
        n=pole.length;
        while (n > 1) {
            newn=0;
            for (i=0;i<(n-1);i++){
                if (pole[i]>pole[i+1]) {
                    x=pole[i];
                    pole[i]=pole[i+1];
                    pole[i+1]=x;
                    newn=i;
                    }
                }
            n=newn+1;
            }
        }
    this.array = function(pole){
        var vys="";
        n=pole.length;
        for (i=0;i<n;i++){
            if (i!=n) vys+=pole[i]+"; ";
            else vys+=pole[i]; 
            }
        return vys;
        } 
  }

