// uzywane w oglądaniu kartki (przy miniaturkach)  (lewa strona)

function cImg1() {
    return '<table class="tableShade" cellspacing="0" cellpadding="0" border="0"><tr><td colspan="3" class="top"><img src="/www/_img/common/table-top.gif" alt=""  /></td></tr><tr><td class="middleLeft"><img src="/www/_img/common/table-middleLeft.gif"  alt="" /></td><td class="content">';
}


function cImg2() {
    return '</td><td class="middleRight"><img src="/www/_img/common/table-middleRight.gif"  alt="" /></td></tr><tr><td colspan="3" class="bottom"><img src="/www/_img/common/table-bottom.gif" alt=""  /></td></tr></table>';
}


function showCornImage(imageFileName, imagesFolder, prefix, imageWidth, imageHeight, href){
	
	
	tableCode = cImg1();

	tableCode += getImgText(imageFileName, imagesFolder, imageWidth, imageHeight, href);

	tableCode += cImg2();

    document.write(tableCode);
}

function getImgText(imageFileName, imagesFolder, imageWidth, imageHeight, href){
	var imgText='';
	if (href) imgText += '<a href="'+href+'">';
    imgText += "<img border=0 class=\"image\" src=\""+imagesFolder+"/" + imageFileName + "\"";
	if (imageWidth)	imgText += " width=\""+imageWidth+"\"";
	if (imageHeight) imgText += " height=\""+imageHeight+"\"";
	imgText += ">";
	if (href) imgText += '</a>';
	return imgText; 
}


// uzywane przy dużym zdjęciu w produktach	(prawa strona)

function cImg1b() {
    return '<table class="tableShadeb" cellspacing="0" cellpadding="0" border="0"><tr><td class="topLeft" colspan="2"><img src="/www/_img/common/tableb-topLeft.gif" alt=""  /></td><td class="topRight"><img src="/www/_img/common/tableb-topRight.gif" alt=""  /></td></tr><tr><td class="middleLeft"><img src="/www/_img/common/tableb-middleLeft.gif"  alt="" /></td><td class="content">';
}


function cImg2b() {
    return '</td><td class="middleRight"><img src="/www/_img/common/tableb-middleRight.gif"  alt="" /></td></tr><tr><td colspan="2" class="bottomLeft"><img src="/www/_img/common/tableb-bottomLeft.gif" alt=""  /></td><td class="bottomRight"><img src="/www/_img/common/tableb-bottomRight.gif" alt=""  /></td></tr></table>';
}


function showCornImageb(imageFileName, imagesFolder, prefix, imageWidth, imageHeight, href){
	
	
	tableCode = cImg1b();

	tableCode += getImgTextb(imageFileName, imagesFolder, imageWidth, imageHeight, href);

	tableCode += cImg2b();

    document.write(tableCode);
}

function getImgTextb(imageFileName, imagesFolder, imageWidth, imageHeight, href){
	var imgText='';
	if (href) imgText += '<a href="'+href+'">';
    imgText += "<img border=0 class=\"image\" src=\""+imagesFolder+"/" + imageFileName + "\"";
	if (imageWidth)	imgText += " width=\""+imageWidth+"\"";
	if (imageHeight) imgText += " height=\""+imageHeight+"\"";
	imgText += ">";
	if (href) imgText += '</a>';
	return imgText; 
}







// nagłówki  i lista produktów

function cImg1Prod(style) {
    return '<table class="tableProd '+ style +'"  cellspacing="0" cellpadding="0" border="0"><tr><td class="topLeft" colspan="2"></td><td class="topRight"><img src="/s.gif" alt="" /></td></tr><tr><td class="middleLeft"></td><td class="content">';
}


function cImg2Prod(style) {
    return '</td><td class="middleRight"></td></tr><tr><td colspan="2" class="bottomLeft"></td><td class="bottomRight"></td></tr></table>';
}


function showCornImagedProdHeader(imageFileName, prefix, imageWidth, imageHeight, href, style){
	tableCode = cImg1Prod(style);
	tableCode += getImgTextProdHeader(imageFileName, imageWidth, imageHeight, href, style);
	tableCode += cImg2Prod();
    document.write(tableCode);
}


function getImgTextProdHeader(imageFileName, imageWidth, imageHeight, href, style){
	var imgText='';
	if (href) imgText += '<a href="'+href+'">';
    imgText += "<img border=0 class=\"image\" src=\""+ imageFileName + "\"";
	if (imageWidth)	imgText += " width=\""+imageWidth+"\"";
	if (imageHeight) imgText += " height=\""+imageHeight+"\"";
	imgText += ">";
	if (href) imgText += '</a>';
	return imgText; 
}



function showCornImagedProdList(imageFileName,imagesFolder, prefix, imageWidth, imageHeight, href, style){
	tableCode = cImg1Prod(style);
	tableCode += getImgTextProdList(imageFileName,imagesFolder, imageWidth, imageHeight, href, style);
	tableCode += cImg2Prod();
    document.write(tableCode);
}

function getImgTextProdList(imageFileName, imagesFolder, imageWidth, imageHeight, href){
	var imgText='';
	if (href) imgText += '<a href="'+href+'">';
    imgText += "<img border=0 class=\"image\" src=\""+imagesFolder+"/" + imageFileName + "\"";
	if (imageWidth)	imgText += " width=\""+imageWidth+"\"";
	if (imageHeight) imgText += " height=\""+imageHeight+"\"";
	imgText += ">";
	if (href) imgText += '</a>';
	return imgText; 
}
