function getId(value) {	return document.getElementById(value); }

/* ---------- font size ---------- */

function txtSize(value) {
	document.body.style.fontSize = value + "%";
	getSend("txtSize.asp?txtSize=" + value, null)
}
function setup() {
	if (getId('txtSmall')) getId('txtSmall').href="javascript:void(txtSize('70'))";
	if (getId('txtNormal')) getId('txtNormal').href="javascript:void(txtSize('100'))";
	if (getId('txtBig')) getId('txtBig').href="javascript:void(txtSize('120'))";
}
window.onload = function() { setup(); }






/* ---------- ajax script ---------- */

/* ----- ajax request ----- */
function getSend(url, target) {
	http.open("GET", "/AjaxFiles/" + url, true);
	if (target != null) {
		subject_id = target;
		getId(target).innerHTML = "";
//		getId(target).style.backgroundImage = "url('/AjaxFiles/ajax-loader.gif')";
		http.onreadystatechange = getResponse;
	}
	http.send(null);
}


/* ----- retrieve file ----- */
var subject_id = '';
function getResponse()
{
	if (http.readyState == 4) {
//		getId(subject_id).style.background = "none";
		if (subject_id != '')	getId(subject_id).innerHTML = http.responseText;
	}
}

/* ----- send request ----- */
function getHTTPObject() {
	var xmlhttp;
	/*@cc_on
	@if (@_jscript_version >= 5)
		try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
		catch (e) {
			try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
			catch (E) { xmlhttp = false; }
		}
	@else
		xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try { xmlhttp = new XMLHttpRequest(); }
		catch (e) { xmlhttp = false;} 
	}
	return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object

