
function getAdr(prefix, postfix, text) {
        document.write('<a href="mailto:' + prefix + '@' + postfix + '">' + (text ? text.replace(/&quot;/g, '"').replace(/%EMAIL%/, prefix + '@' + postfix) : prefix + '@' + postfix) + '</a>');
}

function swapImage(element, newimage) {
    var oldsrc = element.src
    element.src = newimage
    if (!element.onmouseout)
        element.onmouseout = function (event) { swapImage(this, oldsrc); };
}

var sel;
function HideSelects(x,y,w,h) {
    if(xIE4Up && !xMac) {
        var selx, sely, selw, selh, i
        if(!sel)
            sel = document.getElementsByTagName("SELECT");
        for(i = 0; i < sel.length; i++) {
            selx = xPageX(sel[i]);
            sely = xPageY(sel[i]);
            selw = sel[i].offsetWidth;
            selh = sel[i].offsetHeight;
            sel[i].style.visibility = (selx + selw > x && selx < x + w && sely + selh > y && sely < y + h) ? "hidden" : "visible";
        }
    }
}



// deletes leading and trailing spaces in a string - adds the function directly to the String Object, so that all strings inherit this method
String.prototype.trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, '');
}





function activateServiceOfferings(element) {
    oldClass = element.className;
    element.className = oldClass+' active';
    if (!element.onmouseout) {
        element.onmouseout = function (event) { element.className=oldClass; };
    }
}



//Leistungsübersicht

function activateServiceOfferings(element) {
    oldClass = element.className;
    element.className = oldClass+' active';
    if (!element.onmouseout) {
        element.onmouseout = function (event) { element.className=oldClass; };
    }
}
