browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

/*
function openNewWindow(argImgName, argWidth, argHeight) {
	if (ns3up || ie4up) {
		imageName  = ("" + argImgName);
		imageHeight = ("height=" + argHeight);
		imageWidth = ("width=" + argWidth);
		window.open(imageName, "imageName", "menubar=no,locationbar=no,status=no,dependent=yes,"+ imageHeight + "," + imageWidth);
	}
}
*/

function openNewWindow(argImgName, argWidth, argHeight)
{
	xsize = argWidth+35;// Zusatz für Rand rechts und links
	ysize = argHeight+75; //Zusatz für Rand oben und unten - damit Button angezeit werden kann 
    
	ScreenWidth = screen.width;
	ScreenHeight = screen.height;

	xpos = (ScreenWidth/2)-(xsize/2);
	ypos = (ScreenHeight/2)-(ysize/2);
	

	NewWindow=window.open("","argImgName","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ("<html><head><title>Theatergesellschaft Bad Endorf e.V.");
	NewWindow.document.write ("</title></head>");
	NewWindow.document.write ("<body bgcolor='#cccccc'>");
	NewWindow.document.write ("<table align='center'><tr>");
	NewWindow.document.write ("<td align='center' valign='top'>");
	NewWindow.document.write ("<table border='1' bgcolor='#000000' cellpadding='0' cellspacing='1'><tr><td align='center'>");
	NewWindow.document.write ("<img src=");
	NewWindow.document.write (argImgName);
	NewWindow.document.write (">");
	NewWindow.document.write ("</tr></table>");
	NewWindow.document.write ("</td></tr><tr>");
	NewWindow.document.write ("<td align='center' valign='bottom'>");
	NewWindow.document.write ("<br><center><form><input type='button' value='Fenster schliessen' style='font-family: Verdana; font-size: 10px' onClick='self.close()'>");
	NewWindow.document.write ("</td></tr></table>");
	NewWindow.document.write ("</form></body></html>");
	NewWindow.document.close();
}

function showPicture(bigPic)
{
    picWindow=window.open("" + bigPic, "imageName", "width=420, height=520, screenY=150, top=150, scrollbars=no"); 
    picWindow.focus();
}

function UnCryptMailto(s, shift)
{
	var n=0;
	var r="";
	for(var i=0;i<s.length;i++)
	{ 
		n=s.charCodeAt(i); 
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(shift)); 
	}
	return r;
}

function linkTo_UnCryptMailto(s, shift)	
{
	location.href=UnCryptMailto(s, shift);
}


/* http://www.derwok.de/service/email_stopspam/ */

