
var Random = Class.create({

    initialize: function()
    {
        //	this.headbackgroundColors = new Array('#23850B', '#889BBD', '#8ABDCA', '#8ACA9C', '#BDCA8A', '#A3CA8A', '#94A3D3', '#94D3C2', '#51B14B', '#65AAF8');
        this.headbackgroundColors = new Array('#a3c535');
        this.animalGraphics = new Array('kolibri', 'libelle', 'schmetterling');
        // this.slogans = new Array(1, 2, 3, 4, 9);
        this.slogans =  9;
        this.bgColor = this.getRandArrElem(this.headbackgroundColors);

        animalImageSuffix = '.png';
        stoererImageSuffix = '.png';
        leavesImageSuffix = '.png';

        if((browserInfo.getBrowserName().toLowerCase() == 'internet explorer') && (parseInt(browserInfo.getBrowserVersion()) <= 6)){
            animalImageSuffix = '.gif';
            stoererImageSuffix = '.gif';
            leavesImageSuffix = '.gif';

            $('slogan').style.textAlign = 'center';
            this.slogans = new Array();
            this.slogans.push('<div style="margin-top:60px">Naturverbunden.</div>');
            this.slogans.push('<div style="margin-top:50px">Nat&uuml;rlich<br/>&nbsp;verbunden.</div>');
            this.slogans.push('<div style="margin-top:60px">Umweltfreundlich.</div>');
            this.slogans.push('<div style="margin-top:70px;">Recyclebar.</div>');
            this.slogans.push('<div style="margin-top:50px">Die gr&uuml;ne<br/>&nbsp;Alternative.</div>');

        /*
    if($('slogan')) Element.update($('slogan'), this.slogans[this.rand(0, 4)]);
        } else {
            if($('slogan')) Element.update($('slogan'), '<img src="img/slogan'+this.slogans[this.rand(0, 4)]+'.png" width="290" height="200" alt="" />');
        }
*/
        }
     //   if($('head')) $('head').style.backgroundColor = this.bgColor;

        if($('headpic')) $('headpic').src = 'img/headpic'+this.rand(1, 6)+'.jpg';

   //     if($('stoerer')) $('stoerer').src = 'img/stoerer'+stoererImageSuffix;

     //   if($('leaves')) $('leaves').src = 'img/blaetterreihe'+leavesImageSuffix;

    //    if($('animal')) $('animal').src ='img/'+this.getRandArrElem(this.animalGraphics)+animalImageSuffix;

   //     if($('footer')) $('footer').style.backgroundColor = this.bgColor;

        $('container').show();

    },

    rand: function(mini, maxi) {

        return Math.floor(Math.random() * (maxi - mini + 1)) + mini;


    },


    getRandArrElem: function(obj) {

        return ( obj[this.rand(0, obj.length-1)] );

    }



});




