// JavaScript Document
function popup (weitergabe) {
	var breite = screen.width/2-400;
	var hoehe = screen.height/2-300;
	if (window.offen && !offen.closed){
		offen.focus();
	}
	else {
		offen = window.open("fotoanzeigelarge.php?id="+weitergabe+"", "Kontakt", "left="+breite+",top="+hoehe+",width=800,height=600" );
	}
}
/*
// Google Scroll Layer
getViewportScrollY = function() {
    var scrollY = 0;
    if(document.documentElement && document.documentElement.scrollTop)
    {
        scrollY = document.documentElement.scrollTop;
    }
    else if(document.body && document.body.scrollTop)
    {
        scrollY = document.body.scrollTop;
    }
    else if(window.pageYOffset)
    {
        scrollY = window.pageYOffset;
    }
    else if(window.scrollY) {
        scrollY = window.scrollY;
    }
    return scrollY;
};

getViewportWidth = function()
{
    var width = 0;
    if(document.documentElement && document.documentElement.clientWidth)
    {
        width = document.documentElement.clientWidth;
    }
    else if(document.body && document.body.clientWidth)
    {
        width = document.body.clientWidth;
    }
    else if(window.innerWidth)
    {
        width = window.innerWidth - 18;
    }
    return width;
};

function make_sticky(elementID, top_position, leftOffset)
{
    var scraper = document.getElementById(elementID);

    if (typeof scraper == 'undefined') return;

    scraper.style.top = (getViewportScrollY() < top_position)? top_position + "px": getViewportScrollY() + "px";

    window.setTimeout('make_sticky("'+elementID+'",'+top_position+')', 300);
};
*/
// Tooltip Startpage
wmtt = null;

document.onmousemove = updateWMTT;

function updateWMTT(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (wmtt != null) {
		wmtt.style.left = (x + 20) + "px";
		wmtt.style.top 	= (y + 20) + "px";
	}
}

function showWMTT(id) {
	wmtt = document.getElementById(id);
	wmtt.style.display = "block"
}

function hideWMTT() {
	wmtt.style.display = "none";
}


