function change (id){
    $(id).src='pics/'+id+'.png';
}

function back (id){
    $(id).src='pics/'+id+'o.png';
}


var timer;
var i=0;
function scrollup(){
    clearTimeout(timer);
    d=document.getElementById('text')
    y=d.scrollTop;
    if(y<=d.scrollHeight-d.offsetHeight){
        y=y-3;
        d.scrollTop=y;
        timer=setTimeout('scrollup()',10);
    }
    else{
        clearTimeout(timer);
    }
}

function scrolldown(){
    clearTimeout(timer);
    d=document.getElementById('text')
    y=d.scrollTop;
    if(y<d.scrollHeight-d.offsetHeight){
        y=y+3;
        d.scrollTop=y;
        timer=setTimeout('scrolldown()',10);
    }
    else{
        clearTimeout(timer);
    }
}

function stopscroll(){
    clearTimeout(timer);
}


function ajax (zahl)
{

    if (window.XMLHttpRequest) {
        http = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
        http = new ActiveXObject("Microsoft.XMLHTTP");
    }
    if (http != null) {
        switch (zahl)
        {
            case 0:	new Ajax.Request("bio.html", {
                method: 'get',
                onSuccess: function(transport){
                    ausgeben(transport.responseText)
                }
            });
            break;
            case 1:new Ajax.Request("per.html", {
                method: 'get',
                onSuccess: function(transport){
                    ausgeben(transport.responseText)
                }
            });
            break;
            case 2: new Ajax.Request("lin.html", {
                method: 'get',
                onSuccess: function(transport){
                    ausgeben(transport.responseText)
                }
            }); break;
            case 3: new Ajax.Request("kon.html", {
                method: 'get',
                onSuccess: function(transport){
                    ausgeben(transport.responseText)
                }
            }); break;
            case 4: new Ajax.Request("imp.html", {
                method: 'get',
                onSuccess: function(transport){
                    ausgeben(transport.responseText)
                }
            }); break;

            case 5: new Ajax.Request("gal.html", {
                method: 'get',
                onSuccess: function(transport){
                    ausgeben(transport.responseText)
                }
            }); break;
        }
    }
    else
    {
        alert("falsch");
    }
}



function ausgeben(text){
    $('inhalt').innerHTML = text;
    $('inhalt').style.visibility = "visible";
}

function inhaltclose () {
    $('inhalt').style.visibility = "hidden";
}

var scrolldelay;
function pageScroll() {
    	window.scrollBy(0,50); // horizontal and vertical scroll increments
    	scrolldelay = setTimeout('pageScroll()',100); // scrolls every 100 milliseconds
}

function stopScroll() {
    	clearTimeout(scrolldelay);
}

