


	var isinit=0;
var yinit=0;

function findPosY(obj)
{
	var curtop = 0;

	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;

	return curtop;
}


function getObj(name)
{
 if (document.getElementById)
 {
	   this.obj = document.getElementById(name);
	   this.style = document.getElementById(name).style;
 }
 else if (document.all)
 {
	   this.obj = document.all[name];
	   this.style = document.all[name].style;
 }
 else if (document.layers)
 {
	   if (document.layers[name])
	   {
	   	this.obj = document.layers[name];
	   	this.style = document.layers[name];
	   }
	   else
	   {
	    this.obj = document.layers.testP.layers[name];
	    this.style = document.layers.testP.layers[name];
	   }
 }
}


function getWinHeight() {
		if (document.all) {
			return window.document.all.main_body.offsetHeight;
		} else {
			return window.innerHeight;
		}
}

function init() {
	isinit=1;
	i=new getObj("footer_container")
	yinit = findPosY(i.obj);
	checkpos();
}


function checkpos() {
	if (isinit) {
		h=150;
		i=new getObj("footer_container")
		wh=getWinHeight();
		mt=wh-h-yinit;
		if (mt<0) mt=0
		i.style.top=mt+"px";
	}
}

window.onresize = checkpos;




/* Seite weiterempfehlen */
function recommend(){
	var str = location.href;
	var adr = escape(str);
	mail_str = "mailto:?subject=AVM FRITZ!Box";
	mail_str += "&body=Look at this page! It's called: FRITZ!Box ...\n";
	mail_str += " Here is the Adress: " + adr;
	location.href = mail_str;
}

function printpreview() {

	var URL = unescape(location.href)
	var xstart = URL.lastIndexOf("eu/") + 3
	var xk = URL.lastIndexOf(".") + 5

	var xend = URL.length
	var t1 = URL.substring(xstart,xk)
	
	// alert(t1);
	purl="http://www.avm.de/eu/en/print_php.php?page="+t1; 
	// alert(purl);
	win = window.open(purl, "printpreview", "width=640,height=600,left=100,top=100,scrollbars=yes, menubar=yes, toolbar=yes");
	win.focus();
}




