/* --------------------------------------------------- */
/*                                                     */
/*      All Javascript hand coded by Alex Nichol       */
/*      alex@aelius.net           www.aelius.net       */
/*                                                     */
/* --------------------------------------------------- */

function aelius_openWin(file, width, height, name) {
	var winName = name;
	var newTop = Math.round((screen.height/2)-(height/2));
	var newLeft = Math.round((screen.width/2)-(width/2));
	var params = "width=" + width + ", height=" + height + ", top=" + newTop + ",left=" + newLeft + ",toolbar=no, scrollbars=no, resizable=no, menubar=no, status=no, directories=no, location=no";
	window.open(file, winName, params);
}

function changeImg(file, id) {
	document.getElementById(id).src = file;	
}

function changeStyle(size) {
	document.getElementById("textSize").href = "css/" + size + "_font.css";
	document.getElementById("sResize").innerHTML = "A";
	document.getElementById("mResize").innerHTML = "A";
	document.getElementById("lResize").innerHTML = "A";
	document.getElementById(size + "Resize").innerHTML = "<u>A</u>";
	set_cookie(size);
}

function set_cookie(value) {
	var date = new Date();
	date.setTime(date.getTime()+(7*24*60*60*1000));
	var expires = "; expires="+date.toGMTString();

	document.cookie = "text="+value+";expires="+expires+"; path=/";
}