function ShowImage(url, w, h, caption) {
	var onload = '';
	if ((w == 0) || (h == 0)) {
		w = 600;
		h = 400;
		onload = 	"if ((this.width <= screen.availWidth) && (this.height <= screen.availHeight)) {"
						+" window.moveTo(Math.round((screen.availWidth - this.width)/2), Math.round((screen.availHeight - this.height)/2));"
						+" window.resizeBy(this.width - (window.offsetWidth ? window.offsetWidth : document.documentElement.clientWidth), this.height - (window.offsetHeight ? window.offsetHeight : document.documentElement.clientHeight));"
					+"} else {"
						+" window.moveTo(0, 0); window.resizeTo(screen.availWidth, screen.availHeight);"
					+"}";
	};
	w = window.open('', 'picture', 'width='+w+', height='+h+', location=no, status=no, scrollbars=yes, resizable=no');
	w.focus();
	caption = caption.split('"').join("&quot;");
	caption = caption.split('<').join("&lt;");
	caption = caption.split('>').join("&gt;");
	w.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'
						+'<html style="overflow:auto;"><head><title>'+caption+'</title></head><body style="margin:0px;padding:0px">'
						+'<img onload="'+onload+'" onclick="window.close()" src="'+url+'" alt="'+caption+'"></body></html>');
	w.document.close();
	return false;
};
function ShowDoc(url, w, h) {
	if (!w) w = 600;
	if (!h) h = 460;
	w = window.open(url, '', 'width='+w+', height='+h+', location=no, status=no, scrollbars=yes, resizable=yes');
	w.focus();
	return false;
};
