﻿// ImageZoom - Begin

function OpenPictureLayer(divImageZoom, ImageID, ImageTagID, pfad) {
    d = document.getElementById(divImageZoom);
    d.style.visibility = 'visible';

    var flashvars = {};
    var params = {};
    params.menu = "false";
    params.quality = "high";
    var attributes = {};
    swfobject.embedSWF("/flash/imagezoom/ProCompImageZoom.swf?ImagePath=/ImageZoom/" + ImageID + "/", "FlashImageZoomLayer", "550px", "550px", "9.0.0", false, flashvars, params, attributes);
    if (document.images[ImageTagID] == '[object]') document.images[ImageTagID].src = pfad;
}
function ClosePictureLayer(divImageZoom, FlashImageZoomLayer) {

    d = document.getElementById(divImageZoom);
    d.style.visibility = 'hidden';

    e = document.getElementById(FlashImageZoomLayer);
    e.style.visibility = 'hidden';
}

// ImageZoom - End

function OpenExternLayer(name) {

    d = document.getElementById(name);
    d.style.visibility = 'visible';
    sW = screen.width;
    sH = screen.height;
    oW = d.offsetWidth;
    oH = d.offsetHeight;

    d.style.left = '100px'; //sW / 2 - oW / 2 + 'px';
    d.style.top = '400px'; //sH / 2 - oH / 2 + 'px';
}

function CloseExternLayer(name) {
    d = document.getElementById(name);
    d.style.visibility = 'hidden';
}

function OpenExternLayerNewsletter(name) {

    d = document.getElementById(name);
    d.style.visibility = 'visible';
    sW = screen.width;
    sH = screen.height;
    oW = d.offsetWidth;
    oH = d.offsetHeight;

    d.style.left = '100px'; //sW / 2 - oW / 2 + 'px';
    d.style.top = '0px'; //sH / 2 - oH / 2 + 'px';
}

function OpenExternLayerUnvalidArticle(name) {

	d = document.getElementById(name);
	d.style.visibility = 'visible';
	sW = screen.width;
	sH = screen.height;
	oW = d.offsetWidth;
	oH = d.offsetHeight;

	d.style.left = '15px'; //sW / 2 - oW / 2 + 'px';
	d.style.top = '200px'; //sH / 2 - oH / 2 + 'px';
}

function CloseExternLayerNewsletter(name) {
    d = document.getElementById(name);
    d.style.visibility = 'hidden';
}