﻿function addbookmark() {
    var bookmarkurl = document.location
    var bookmarktitle = "Industrie- und Werbedruck Westphal GmbH"
    if (document.all) {
        window.external.AddFavorite(bookmarkurl, bookmarktitle)
    }
    else {
        alert("Drücken Sie [Strg] + [D] um diese Seite in den Lesezeichen abzulegen.");
    }
}
function leeren() {
    document.getElementById('ctl00_tbSearch').value = '';

}
function swapPanel(id) {
    objId = id;
    if (document.getElementById) {
        if (document.getElementById(objId)) {
            if (document.getElementById(objId).style.display == 'none') {
                document.getElementById(objId).style.display = 'block';
            }
            else {
                document.getElementById(objId).style.display = 'none';
            }
        }
        else {
            alert('Objekt {' + objId + '} wurde nicht gefunden!');
        }
    }
}
function MM_openBrWindow(theURL, winName, features) { //v2.0
    window.open(theURL, winName, features);
}
function hidePanel(id) {
    objId = id;
    if (document.getElementById) {
        if (document.getElementById(objId)) {
            document.getElementById(objId).style.display = 'none';
        }
        else {
            alert('Objekt {' + objId + '} wurde nicht gefunden!');
        }
    }
}

function openModalWin(url, options) {
    if (navigator.appName != 'Microsoft Internet Explorer') {
        window.captureEvents(Event.CLICK | Event.FOCUS);
    }

    winModalWindow = window.open(url,
    	'ModalWin',
    	'dependent=yes,' + options);
    window.onclick = function IgnorEvents(e) { return false; };
    window.onfocus = function HandleFocus() {
        if (winModalWindow) {
            if (!winModalWindow.closed) {
                winModalWindow.focus();
            }
            else {
                if (navigator.appName != 'Microsoft Internet Explorer') {
                    window.releaseEvents(Event.CLICK | Event.FOCUS);
                }
                window.onclick = ''
            }
        }
        return false;
    };
    winModalWindow.focus();
} 

