var imageList = new Array('images/products/layer4.png', 'images/products/layer12.png', 'images/products/layer16.png');

function openPopupDatenschutzerklaerung()
{
	popupDatenschutzerklaerung = window.open("Datenschutzerklaehrung.htm","datenschutzerklaehrungPopup","width=590,height=717px,resizable=no,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no");
	popupDatenschutzerklaerung.focus();
}
function openPopupNutzungsbedingungen()
{
	popupNutzungsbedingungen = window.open("nutzungsbedingungen.htm","nutzungsbedingungPopup","width=590,height=717px,resizable=no,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no");
	popupNutzungsbedingungen.focus();
}
function showErrorObject(id, cssClass)
{
	if(cssClass)
	{
		document.getElementById(id).className=cssClass;
		document.getElementById('ErrorMessageContainer').style.visibility='visible';
	}
	else
	{
		document.getElementById(id).className='errorinputline';
		document.getElementById('ErrorMessageContainer').style.visibility='visible';
	}
}

function showCheckboxError(id)
{
	document.getElementById(id).className='errorcheckbox';
	document.getElementById('ErrorMessageContainer').style.visibility='visible';
}

function switchImage(index) {
    if (fastAnimation != '') {
        $('#ProductArea').hide(fastAnimation, function () {
            $('#OverlayArea').show();
            for (var i = 0; i < 4; i++) {
                target = '#Detail' + i;
                if (index == i) {
                    $(target).show(fastAnimation);
                }
                else {
                    $(target).hide();
                }
            }
        });
    }
    else {
        $('#ProductArea').hide();
        $('#OverlayArea').show();
        for (var i = 0; i < 4; i++) {
            target = '#Detail' + i;
            if (index == i) {
                $(target).show();
            }
            else {
                $(target).hide();
            }
        }
    }

    return 0;
}

function hideDetail() {
    if (fastAnimation != '') {
        $('#OverlayArea').hide(fastAnimation, function () {
            $('#ProductArea').show(fastAnimation);
        });
    }
    else {
        $('#OverlayArea').hide();
        $('#ProductArea').show();
    }
    curIndex = -1
}
