// JavaScript Document

function accPopup(theURL,winName,features) {
		var newwindow=window.open(theURL,winName,features);
		return false;
}

function getWindowHeight() {
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') {
		windowHeight=window.innerHeight;
	} else {
		if (document.documentElement&&document.documentElement.clientHeight) {
			windowHeight=document.documentElement.clientHeight;
		} else {
			if (document.body&&document.body.clientHeight) {
				windowHeight=document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

function setFooter() { //courtesy Bobby van der Sluis, http://www.alistapart.com/articles/footers
	if (document.getElementById) {
		var windowHeight=getWindowHeight();
		if (windowHeight>0) {
			if (document.getElementById('content')) {
			var contentHeight=document.getElementById('content').offsetHeight;
			}
			var footerElement=document.getElementById('footer');
			var footerHeight=footerElement.offsetHeight;
			if (windowHeight-(contentHeight+footerHeight)>=110) {
				footerElement.style.top=(windowHeight-(contentHeight+footerHeight+100))+'px';
			} else {
				footerElement.style.top='0px';
			}
		}
	}
}

function setQueryFrame() { 
	if (document.getElementById) {
		var windowHeight=getWindowHeight();
		if (windowHeight>0) {
			var frameHeight = windowHeight-350;
			if (frameHeight<320) frameHeight = 320;
			frm = document.getElementById('qfrm');
			frm.style.height = frameHeight+"px";
		}
	}
}

function addPreloader() {
		document.write("<div style=\"position:absolute;top:360px;left:300px;z-index:2;\" id=\"preloader\"><img src=\"../grafik/hg/loading.gif\" /></div>");
}

function removePreloader() {
		var p = document.getElementById('preloader');
		p.parentNode.removeChild(p);
}

window.onresize = function() {setFooter();}
window.onload = function() {
	setFooter();
	}

/*

function getWindowHeight() {
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') {
		windowHeight=window.innerHeight;
	} else {
		if (document.documentElement&&document.documentElement.clientHeight) {
			windowHeight=document.documentElement.clientHeight;
		} else {
			if (document.body&&document.body.clientHeight) {
				windowHeight=document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

window.onload = function() {
		if (document.getElementById) { 
		targ = document.getElementById("offerCol");
		docObj = document.getElementById("leftCol");
		objHeight = document.defaultView.getComputedStyle(docObj,'').getPropertyValue("height");
		//targ.style.height = objHeight;
		//targ.style.overflow = "auto";
		docObj2 = document.getElementById("leftCol2");
		objHeight2 = document.defaultView.getComputedStyle(docObj,'').getPropertyValue("height");
		//alert(objHeight2);
		}
}*/
