// decrypt helper function
function G21_decryptCharcode(n,start,end,offset)
	{
	n = n + offset;
	if (offset > 0 && n > end)	{
		n = start + (n - end - 1);
	} else if (offset < 0 && n < start)	{
		n = end - (start - n - 1);
	}
	return String.fromCharCode(n);
	}
// decrypt string
function G21_decryptString(enc,offset)
	{
	var dec = "";
	var len = enc.length;
	for(var i=0; i < len; i++)	{
		var n = enc.charCodeAt(i);
		if (n >= 0x2B && n <= 0x3A)	{
			dec += G21_decryptCharcode(n,0x2B,0x3A,offset);	// 0-9 . , - + / :
		} else if (n >= 0x40 && n <= 0x5A)	{
			dec += G21_decryptCharcode(n,0x40,0x5A,offset);	// A-Z @
		} else if (n >= 0x61 && n <= 0x7A)	{
			dec += G21_decryptCharcode(n,0x61,0x7A,offset);	// a-z
		} else {
			dec += enc.charAt(i);
		}
	}
	return dec;
	}
// decrypt spam-protected emails
function G21_uncryptMailto(s)
	{
	location.href = G21_decryptString(s,-2);
	}


///////////////////////////////////////////////////////////////////////


// V 2.0 Detailbild anzeigen
function openDetail(img,sizeW,sizeH)
	{
	if(sizeW=='' || sizeH=='')
		{
		sizeW = 300;
		sizeH = 300;
		var resize = true;
		}

	l = screen.width/2-50;
	o = screen.height/2-150;
	windowOptions = 'width='+sizeW+',height='+sizeH+',left='+l+',top='+o+',status=1,scrollbars=0,resizable=1';
	Detailwindow=window.open('blank.html','Detailwindow',windowOptions);
	Detailwindow.document.write('<html>'
	+'<head> '
	+'<title>'+img+'</title> '
	+'<'+'script language="javascript"'+'> '
	+'function resize() { '
	+'if(document.images[0]) { window.resizeTo(document.images[0].width+10,document.images[0].height+54); } '
	+'self.focus();'
	+'} '
	+'<'+'/script'+'>'
	+'</head>'
	+'<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" onLoad="javascript:resize();" onBlur="javascript:window.close();">'
//	+'<table border="0" cellspacing="0" cellpadding="0">'
//	+'<tr>'
//	+'<td valign="top"><img src="'+img+'" id="bigImage" border="0" onClick="JavaScript:window.close();"></td>'
	+'<img src="'+img+'" id="bigImage" border="0" onClick="JavaScript:window.close();">'
//	+'</tr>'
//	+'</table>'
	+'</body>'
	+'</html>');

	Detailwindow.document.close(); 
	}

// V1.0 copyright Grfaix21.de
function Druckansicht(img,w,h) {
       l = screen.width/2-50;
       t = screen.height/2-150;
       w = eval(w) + 16;
       options = "width="+w+",height="+h+",left="+l+",top="+t+",menubar=yes,resizable=yes,scrollbars=yes,status=yes";
       Druckwindow = window.open(img,'Details',options);
       Druckwindow.focus();
}
