// JavaScript Document

/*
window.onerror = err_handler;
function err_handler (msg, url, line) {						// Define the error handler
	top.location = "http://www.chabre2009.com/index.php?page="+escape(location.pathname);
	return true;										// Do nothing (disallow warning dialog)
}

function checkParentFrame () {
	if (self == top && (self.location.replace)) {  // this will load the top frame if it doesn't exist
		location.replace("/index.php?page="+escape(location.pathname));
		alert('me');
	}else{
		if (domain=top.location.href){ // this will normally be denied so the onerror will fire
			tabdomain=domain.split('\/');
			if(tabdomain[2].search("chabre2009") == -1) { // if the top frame isn't the correct domain
				top.location.replace("http://www.chabre2009.com/index.php?page="+escape(location.pathname));
			}
		}
	}
}
//alert(escape(location.pathname));
*/

function changeHeight() {
    var m = document.body.style.margin;
    var a = document.getElementById('bannerRow').offsetTop;
    var t = document.getElementById('content_row').offsetTop;
    var f = document.getElementById('footer_row').offsetTop;
    var b = document.body.scrollHeight - document.getElementById('footer_row').offsetTop;  // visible height - footer height
    var h = document.body.clientHeight - (t + b + 8);
    if (h > 380 ) {
		document.getElementById('content_row').style.height = h + "px";
	    document.getElementById('main').style.height = h + "px";
//    alert ('top ' + a + '\nheader ' + t + '\ncontent ' + h + '\nfooter ' + b + '\nclientheight ' + document.body.clientHeight + '\nscrollheight ' + document.body.scrollHeight);
	}
}



