function cImg1() {
    return '<table class="tableShade" cellspacing="0" cellpadding="0"><tr><td>';
}


function cImg2() {
    return '</td><td class="tableShadeTd"><img src="/www/_img/common/shadeCorner.gif"  alt="" /></td></tr><tr><td colspan="2" class="tableShadeTd"><img src="/www/_img/common/shadeCorner.gif" alt=""  /></td></tr></table>';
}

function showCornImage(imageFileName, imagesFolder, prefix, imageWidth, imageHeight, href, alt, popup, popupWidth, popupHeight){
	tableCode = cImg1();

	tableCode += getImgText(imageFileName, imagesFolder, imageWidth, imageHeight, href, alt, popup, popupWidth, popupHeight);

	tableCode += cImg2();

    document.write(tableCode);
}

function getImgText(imageFileName, imagesFolder, imageWidth, imageHeight, href, alt, popup, popupWidth, popupHeight){
	var imgText='';
	if (href) {
		if (popup) imgText += '<a href="javascript:showPopUpWindow(\''+ href +'\','+popupWidth+','+ popupHeight +')">';
		else if (popup == 2) imgText += '<a href="'+href+'" target="_top">';
		else imgText += '<a href="'+href+'">';
	}
    if (imageFileName) imgText += "<img border=0 class=\"image\" src=\""+imagesFolder+"/" + imageFileName + "\"";
	if (!imageFileName) imgText += "<img border=0 class=\"image\" src=\""+imagesFolder +  "\"";
	if (imageWidth)	imgText += " width=\""+imageWidth+"\"";
	if (imageHeight) imgText += " height=\""+imageHeight+"\"";
	if (alt) imgText += " title=\""+alt+"\" alt=\""+alt+"\"";
	imgText += ">";
	if (href) imgText += '</a>';

	return imgText; 
}


