var ort = 1;
function gehezur(zahl)
{
	if(window.location.search != "")
		{
		goort=window.location.search;
 		ort=goort.substr(1,goort.length)-1;
 		if (ort < 0 || ort > fotos )
 			{
 			ort = start;
 			}
		}
	else
		{
		ort = start;
	}
	diashowright(ort)
}

function diashowleft(zahl)
{
	if (zahl > 1)	
	{
		zahl = zahl-1
	}	
	else
	{
		zahl=fotos
	}
		ort = zahl
	  bilda="vimg/a_"+db[zahl][1]+".jpg"
	  bildn="vimg/n_"+db[zahl][1]+".jpg"
	  window.document.images[2].src=bilda;
	  window.document.images[3].src=bildn;
  	//window.document.forms[0].titel.value = db[zahl][0];
  	window.document.forms[0].direkt.options[ort-1].selected = true;
  	var text;
  	text = db[zahl][4];
  	while (text.indexOf("§") > -1)
  	{
  		text=text.substring(0,text.indexOf("§"))+String.fromCharCode(13)+text.substring(text.indexOf("§")+1,text.length);
  	}
  	window.document.forms[0].oldtext.value = text;
  	text = db[zahl][5];
  	while (text.indexOf("§") > -1)
  	{
  		text=text.substring(0,text.indexOf("§"))+String.fromCharCode(13)+text.substring(text.indexOf("§")+1,text.length);
  	}
  	window.document.forms[0].newtext.value = text;
  	xx = db[zahl][2];
  	yy = db[zahl][3];
	set_cursor();
}

function diashowright(zahl)
{
	if (zahl < fotos)	
	{
		zahl = zahl+1
	}
		else
	{
		zahl=1
	}	
		ort = zahl
	  bilda="vimg/a_"+db[zahl][1]+".jpg"
	  bildn="vimg/n_"+db[zahl][1]+".jpg"
	  window.document.images[2].src=bilda;
	  window.document.images[3].src=bildn;
  	//window.document.forms[0].titel.value = db[zahl][0];
  	window.document.forms[0].direkt.options[ort-1].selected = true;
  	var text;
  	text = db[zahl][4];
  	while (text.indexOf("§") > -1)
  	{
  		text=text.substring(0,text.indexOf("§"))+String.fromCharCode(13)+text.substring(text.indexOf("§")+1,text.length);
  	}
  	window.document.forms[0].oldtext.value = text;
  	text = db[zahl][5];
  	while (text.indexOf("§") > -1)
  	{
  		text=text.substring(0,text.indexOf("§"))+String.fromCharCode(13)+text.substring(text.indexOf("§")+1,text.length);
  	}
  	window.document.forms[0].newtext.value = text;
  	xx = db[zahl][2];
  	yy = db[zahl][3];
	set_cursor()
}
 
function set_cursor()
{
	xxx=694;
	yyy=264; 
	if (xx<1 || xx>698)
		{
		xx=485;
		}
	if (yy<1 || yy>268)
		{
		yy=130;
		}	
		
	window.document.images[pics+0].width=xx;
	window.document.images[pics+0].height=yy-6;
	window.document.images[pics+1].height=yy-6;
	window.document.images[pics+2].width=xxx-xx;
	window.document.images[pics+2].height=yy-6;

	window.document.images[pics+3].width=xx-6;
	window.document.images[pics+5].width=xxx-xx-6;
	
	window.document.images[pics+6].width=xx;
	window.document.images[pics+6].height=yyy-yy-2;
	window.document.images[pics+7].height=yyy-yy-2;
	window.document.images[pics+8].width=xxx-xx;
	window.document.images[pics+8].height=yyy-yy-2;
}

