function page_height_init(){
	var measure_id = 'm_c_copy';
	var change_id = 'main_content';
	var pad = 90;

	//page_min_height is set in our header scripts and depends on styletype
	if (typeof(page_min_height)!="undefined"){
	var minheight = page_min_height;
	} else {
		var minheight = 0;
	}
	var e_m = document.getElementById(measure_id);
	if(e_m!=null){
		var h;
		h = e_m.offsetHeight;
		
		if (h<minheight){
			h = minheight;
			//e_m.style.height = minheight-60 + 'px';
		}

		var e_c = document.getElementById(change_id);
		if(e_c!=null){
			e_c.style.height = h+pad + 'px';
			
		}

//		var e_sep = document.getElementById('content_sep');
//		if(e_sep!=null){
//			e_sep.style.height = h-30 + 'px';
//		}

	}
} 


function changeTextSize(size){
	document.body.className=size;
	page_height_init();
	storeTextSize(size);
}

function storeTextSize(size){

//	if (!xmlhttp && !alerted) {
	 // Non ECMAScript Ed. 3 will error here (IE<5 ok), nothing I can
	 // realistically do about it, blame the w3c or ECMA for not
	 // having a working versioning capability in  <SCRIPT> or
	 // ECMAScript.

		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			 alert("You need a browser which supports an XMLHttpRequest Object.")
		}
//	}

	var stuff = 'text_size=' + size;
	if (xmlhttp) {
		d=document
		xmlhttp.open("POST", "listener_text_size.php", true);
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlhttp.send(stuff);
	}

}