function select_archives() {
	document.form1.submit();
}

function select_cat() {
	if ( document.form1.cat.value != 0 ) {
		document.form1.submit();
	}
}

onload = init;
window.onresize = init;
function init() {
	oBox1 = document.getElementById("pg-content-text").offsetHeight;
	oBox2 = document.getElementById("pg-index-sponsor").offsetHeight;
	oBox  = document.getElementById("pg-content").offsetHeight;
	
	if ( oBox < oBox1 ) document.getElementById("pg-content").style.height = oBox1+"px";
	if ( oBox < oBox2 ) document.getElementById("pg-content").style.height = oBox2+"px";
	
	
	if ( document.body.className.substr(0,5) == "inner" ) {
		document.getElementById("pg-main").style.height = document.getElementById("pg-content").offsetHeight+"px";
	}
	
	oHead = document.getElementById("pg-head").offsetHeight;
	oMain = document.getElementById("pg-main").offsetHeight;
	oFoot = document.getElementById("pg-foot").offsetHeight;
	
	//alert( window.innerHeight +" > "+ (oHead + oMain + oFoot) );
	
	if ( window.innerHeight > (oHead + oMain + oFoot) ) {
		document.getElementById("pg-foot").style.position = "absolute";
		document.getElementById("pg-foot").style.top = (window.innerHeight-oFoot)+"px";
	}
}
