/*  */
/*  */

function popup (adresse, name, parameter) {
  popupWindow = window.open(adresse, name, parameter);
  popupWindow.focus();
}

var fsCookie = 0;
var fsString = new Array();
if(document.cookie.indexOf('fontsize=3') >= 0) {
    fsCookie = 3;
    document.write('<link rel="stylesheet" type="text/css" href="/cps/rde/xchg/SID-3E93EC07-CBEABC5A/bms_de/hs.xsl/scale150.css" />\n');
} else if (document.cookie.indexOf('fontsize=2') >= 0) {
    fsCookie = 2;
    document.write('<link rel="stylesheet" type="text/css" href="/cps/rde/xchg/SID-3E93EC07-CBEABC5A/bms_de/hs.xsl/scale125.css" />\n');
} else if (document.cookie.indexOf('fontsize=1') >= 0) {
    fsCookie = 1;
    document.write('<link rel="stylesheet" type="text/css" href="/cps/rde/xchg/SID-3E93EC07-CBEABC5A/bms_de/hs.xsl/scale100.css" />\n');
} else {
    fsCookie = 0;
}
function fsdown() {
    if (fsCookie > 0) {
        fontScale(fsCookie-1);
    }
}
function fsup() {
    if (fsCookie < 3) {
        fontScale(fsCookie+1);
    }
}
function fontScale(fontgr) {
    if (navigator.cookieEnabled) {
        var datum = new Date();
        datum.setTime(datum.getTime() + (1000 * 3600 * 24 * 365));
        document.cookie = 'fontsize=' + fontgr + '; ' + 'expires=' + datum.toGMTString() + '; ' + 'path=/';
//        self.location = self.location;
        window.location.reload(false);
    } else {
        window.alert("Diese Funktion setzt das Akzeptieren von Cookies voraus!");
    }
}

// === Startanimation ===

var currentItem = null;
var undoTimerHodler = false;
$(document).ready(
    function()
    {
        $('#board .ind')
            .bind('mouseenter', doItem);
        $('#board .ind')
            .bind('mouseleave', stopItem);
        $('#board')
            .bind('mouseleave', undoItem);
    }
);
function doItem()
{
    if(undoTimerHodler)
        window.clearTimeout(undoTimerHodler);
    if(currentItem) {
        $(currentItem)
        .animate({height: 34}, 200)
        .find('.color').animate({ height: '28' }, 10);
        $('#board .ind').find('.abstr').css({ display: 'inline' });
        $('#board .ind').find('.btext').css({ display: 'none' });
    } else {
        $('#board .ind').not(this)
        .animate({height: 34}, 200)
        .find('.color').animate({ height: '28' }, 10);
        $('#board .ind').find('.abstr').css({ display: 'inline' });
         $('#board .ind').find('.btext').css({ display: 'none' });
    }
    currentItem = this;
    $(currentItem)
    .animate({height: 62}, 200)
    .find('.color').animate({ height: '56' }, 10);
    $(currentItem).find('.abstr').css({ display: 'none' });
    $(currentItem).find('.btext').css({ display: 'inline' });
    
}
function undoItem()
{
    undoTimerHodler = window.setTimeout(undoTimer, 100);
}
function stopItem()
{
        $('#board .ind').not(this)
        .animate({height: 34}, 200)
        .find('.color').animate({ height: '28' }, 10);
        $('#board .ind').find('.abstr').css({ display: 'inline' });
        $('#board .ind').find('.btext').css({ display: 'none' });
        $('#board .ind').stop();
}
function undoTimer()
{
    $('#board .ind')
    .animate({height: 34}, 200)
    .find('.color').animate({ height: '28' }, 10);
    $('#board .ind').find('.abstr').css({ display: 'inline' });
    $('#board .ind').find('.btext').css({ display: 'none' });
    currentItem = null;
}

/*  */
