//window.defaultStatus = 'www.mv-wittnau.de';
tt = null;
window.onload = stripe;
onerror = stopError;

function stopError(){
    return true;
}

function logo(logo){
    parent.head.document.getElementById("logo").src = logo;
}

function Fenster(Bild,breit,hoch){
    var mode = 'width='+breit+',height='+hoch+'left='+(window.screen.width-breit)/2+',top='+(window.screen.height-hoch)/2+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no';
    var bild = window.open(Bild,'_splash',mode);
    bild.moveTo((window.screen.width-breit)/2,((window.screen.height-hoch)/2)-16);
    bild.focus();
}

function stripe() {
  	var tables = document.getElementsByTagName("table");
	for (var g = 0; g < tables.length; g++) {
		if (tables[g].id != "zebratable") continue;
    	var table = tables[g];
        var tbodies = table.getElementsByTagName("tbody");

        for (var h = 0; h < tbodies.length; h++) {
            var even = false;
            var trs = tbodies[h].getElementsByTagName("tr");

            for (var i = 0; i < trs.length; i++) {
                trs[i].onmouseover=function(){
                    this.className += " ruled"; return false
                }
                trs[i].onmouseout=function(){
                    this.className = this.className.replace("ruled", ""); return false
                }
                if(even)
                    trs[i].className += " even";
                even = !even;
            } // for trs
        } // for bodies
	} // for tables
} // function

/*function Fenster(Bild){
    var mode = toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no';
    var bild = window.open(Bild,'_splash',mode);
    bild.focus();
}*/

function goToUrl(selObj, goToLocation){
    eval("document.location.href = '" + goToLocation + "limit=" + selObj.options[selObj.selectedIndex].value + "'");
}


function popUp(URL, id) {
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=320,left = 100,top = 100');");
}

function zurueck(){
    var pos=5000;
    do {
    i=pos/10;
    pos=pos-i;
    window.scrollTo(0,pos);}
    while(pos > 1);
}

function drucken(){
    javascript:self.print();
    }

function updateTIP(e){
    x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
    y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
    if (tt != null)
    {
        tt.style.left = (x + 20) + "px";
        tt.style.top     = (y + 20) + "px";
    }
}
function updateTIP_left(e){
    x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
    y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
    if (tt != null)
    {
        tt.style.left = (x - 550) + "px";
        tt.style.top     = (y + 20) + "px";
    }
}

function showTIP(id){
    document.onmousemove = updateTIP;
    tt = document.getElementById(id);
    tt.style.display = "block"
}

function showTIP_left(id){
    document.onmousemove = updateTIP_left;
    tt = document.getElementById(id);
    tt.style.display = "block"
}

function hideTIP(){
    tt.style.display = "none";
}

