function newWindow() {
	var a = newWindow.arguments;
	var i = 0;
	var url = a[i++];
	var wName = a[i++];
	self.name = "opener";
	if (i >= a.length) {
		window.open(url, wName);
		return;
	}
	var opt = a[i++];
	while (i < a.length) opt += "," + a[i++];
	window.open(url, wName, opt);
	return;
}


function $(elm) {
	return document.getElementById(elm);
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

function largerText() {
	var body = document.getElementsByTagName("body")[0];
	var currentSize = parseInt(body.style.fontSize);
	
	if (!currentSize)
		currentSize = 10;
	
	if (currentSize < 20)
		body.style.fontSize = ++currentSize + "px";
}

function smallerText() {
	var body = document.getElementsByTagName("body")[0];
	var currentSize = parseInt(body.style.fontSize);

	if (currentSize > 10)
		body.style.fontSize = --currentSize + "px";
}


addLoadEvent(function() {
	$("text_resize_smaller").onclick = smallerText;
	$("text_resize_larger").onclick = largerText;
});