
// Script, damit ein Link in einem iFrame die Hauptseite ganz nach oben setzt
// => http://flashforum.de/forum/archive/index.php/t-173847.html
function iframetop(loc){
top.window.scrollTo(0,0);
window.location.href = loc;
}
// Ende



// Open PopUp
function openHeyPopup(objectLink) {
	window.open(objectLink, "Externer Link",  "width=920,height=700,scrollbars=no");
}
function initHeyPopup()
{	
	if (!document.getElementsByTagName){ return; }
	var anchors = document.getElementsByTagName("a");
	// loop through all anchor tags
	for (var i=0; i<anchors.length; i++){
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "heypopup")){
			anchor.onclick = function () {openHeyPopup(this); return false;}
		}
	}
}
function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}
}
addLoadEvent(initHeyPopup);	// run initLightbox onLoad

