function writeLayer(ID, parentID, sText, iWidth, iHeight) {
	if (iWidth == null || iHeight == null) {
		iWidth = 352; iHeight = 264;
	}

	sText = '<img src="' + sText + '" width="' + iWidth + '" height="' + iHeight + '">';
	doWrite(ID, parentID, sText);
	return;
}

function writeLayerPop(ID, parentID, sText, iWidth, iHeight, linkURL, wWidth, wHeight) {
	if (iWidth == null || iHeight == null) {
		iWidth = 352; iHeight = 264;
	}

	sText = '<a href="javascript:popUrl(\'' + linkURL + '\', ' + wWidth + ',' + wHeight + ');"><img src="' + sText + '" width="' + iWidth + '" height="' + iHeight + '"></a>';
	doWrite(ID, parentID, sText);
	return;
}

function doWrite(ID, parentID, sText) {
	if (document.layers) {
		var oLayer;

		if (parentID) {
			oLayer = eval('document.' + parentID + '.document.' + ID + '.document');
		} else {
			oLayer = document.layers[ID].document;
		}

		oLayer.open();
		oLayer.write(sText);
		oLayer.close();
	}  else if (parseInt(navigator.appVersion) >= 5 && navigator.appName == "Netscape") {
		document.getElementById(ID).innerHTML = sText;
	} else if (document.all) {
		document.all[ID].innerHTML = sText
	}
	return;
}

function popUrl(link, width, height) {
	win = window.open(link, 'plan', 'height=' + height + ',width=' + width + ',scrollbars=no, resizable=yes, status=no, toolbar=no');
	win.focus();
	return;
}

