function writeSingleImage(pictFile,num,folder)
{
thePict=pictFile;
theFolder=folder;

fileString="images/"+theFolder+"/"+thePict[num];
	
if(window.innerWidth)
	{
	windWidth=window.innerWidth;
	windHeight=window.innerHeight;
	}
else
	{
	windWidth=document.getElementById("scheliga_body").offsetWidth;
	windHeight=document.getElementsByTagName('html')[0].offsetHeight;
	}
a=fileString.indexOf("*");
b=fileString.indexOf("+");

imageString="";    /*fileString.substring(b+1);*/
thePictFile=fileString.substring(0,a);

imgH_W=fileString.substring(a+1,b);
e=imgH_W.indexOf(",");
imgH=imgH_W.substring(0,e);
imgW=imgH_W.substring(e+1);


	newWidth=windWidth-900;
	if(newWidth>300)
		newWidth=300;
	if(newWidth<150)
		newWidth=150;

	if(thePictFile.indexOf("Keramik_Klub")!="-1")
	newWidth=150;

	prozent=Math.round(newWidth/(imgW/100));
	newHeight=Math.round((imgH/100)*prozent);

	if(newHeight>260)
		{
		newHeight=260;
		prozent=Math.round(newHeight/(imgH/100));
	newWidth=Math.round((imgW/100)*prozent);

		}


if(newHeight>(windHeight-330))
	{
	newHeight=(windHeight-330);
	/*newHeight=Math.round((windHeight/5)*2);*/
	
	prozent=Math.round(newHeight/(imgH/100));
	newWidth=Math.round((imgW/100)*prozent);
	}

/*document.getElementById("theText").style.right=390-(280-newWidth)+"px";*/
/*alert(windWidth);*/


newHeight=newHeight+"px";
newWidth=newWidth+"px";

document.write("<span style='white-space:nowrap'><img id='frontImg' name='indexImage' style='vertical-align:top;text-align:right;padding-top:0px;width:"+newWidth+";height:"+newHeight+"' src='"+thePictFile+"' alt=''><img id='sh1' style='vertical-align:top;width:8px;height:"+newHeight+"' src='layout/S1b.gif' alt=''><\/span><br/><span style='white-space:nowrap'><img id='sh2' style='vertical-align:top;width:"+newWidth+";height:8px' src='layout/S2b.gif' alt=''><img id='sh3' style='vertical-align:top;width:8px;height:8px' src='layout/S3b.gif' alt=''><\/span><br/>");
/*<div id='imgText' style='font-size:10px;padding-right:8px;padding-bottom:12px;padding-top:0px;vertical-align:bottom;text-align:right;white-space:normal;width:"+newWidth+"'>"+imageString+"<\/div>*/
}
