var firefox=document.getElementById&&!document.all;

/* dont«t delete this -marek */
function lib_bwcheck(){
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck();
var str="";
var strint;
if (window.location.search != "") {
	str=window.location.search;
	str=str.substr(4,5);
	strint=parseInt(str);
}

function getScreenSize(obj) {
		var displaytype = 'absolute';
		if (obj && obj.style && obj.style.position && obj.parentNode) {
			displaytype = obj.style.position;
		}
		if (displaytype == 'static' || displaytype == 'relative') {
			p_obj = obj.parentNode;
			var p_pos = getPos(p_obj);
			offx = parseInt(p_pos[0]);
			offy = parseInt(p_pos[1]);
			screenx = parseInt(p_obj.style.width);
			screeny = parseInt(p_obj.style.height);
		}
		else {
			if (firefox) { // Firefox
				offx = parseInt(window.pageXOffset);
				offy = parseInt(window.pageYOffset);
				screenx = parseInt(window.innerWidth);
				screeny = parseInt(window.innerHeight);
			}
			else {		//IE
				offx = parseInt(document.body.scrollLeft);
				offy = parseInt(document.body.scrollTop);
				screenx = parseInt(document.body.clientWidth);
				screeny = parseInt(document.body.clientHeight);
			}
		}
}
var screenx, screeny, offx, offy = 0;

function crc_content(e) {
    var myDiv = document.getElementById('hauptcontent');
    getScreenSize();
    myDiv.style.width = screenx - 448 + 'px';
    myDiv.style.height = screeny - 213 + 'px';
	var myDiv = document.getElementById('charitelogo');
    myDiv.style.top = screeny - 110 + 'px';
    if (bw.ie7 && strint==19) {
    	myDiv.style.top = screeny - 102 + 'px';
    }
}
	
window.onresize = crc_content;

