function roll(imgId, imgSrc) {
	document.getElementById(imgId).src = imgSrc;
}
function message(m, s, i) {
	var o = document.getElementById(i);
	o.innerHTML = m;
	if (s == 1) {
		o.style.visibility = "visible";
	} else {
		o.style.visibility = "hidden";
	}
}
img01 = new Image();
img01.src = "/images/icon_word_o.gif";
img02 = new Image();
img02.src = "/images/icon_printer_o.gif";
img03 = new Image();
img03.src = "/images/icon_newwindow_o.gif";

function popup(url) {
	var width  = 700;
	var height = 500;
	var left   = (screen.width  - width)/2;
	var top    = (screen.height - height)/2;
	var params = 'width='+width+', height='+height;
	params += ', top='+top+', left='+left;
	params += ', directories=no';
	params += ', location=no';
	params += ', menubar=no';
	params += ', resizable=no';
	params += ', scrollbars=no';
	params += ', status=no';
	params += ', toolbar=no';
	newwin=window.open(url,'windowname5', params);
	if (window.focus) {newwin.focus()}
	return false;
}
function getPageOffsetLeft(el) {
	var x;
	// Return the x coordinate of an element relative to the page.
	x = el.offsetLeft;
	if (el.offsetParent != null)
		x += getPageOffsetLeft(el.offsetParent);
	return x;
}

function getPageOffsetTop(el) {
	var y;
	// Return the x coordinate of an element relative to the page.
	y = el.offsetTop;
	if (el.offsetParent != null)
		y += getPageOffsetTop(el.offsetParent);
	return y;
}
function showHide(element, state, el) {
	document.getElementById(element).style.left=getPageOffsetLeft(el)-160;
	document.getElementById(element).style.top=getPageOffsetTop(el);
	document.getElementById(element).style.visibility=state;
}