// @version  28.02.2006

//var fPic=null;
function showPic( source,bild,ebene) {
	//if(navigator.appName.indexOf("Netscape")!=-1)
		if(typeof fPic!="undefined" && fPic !=null && !fPic.closed) fPic.close();
		fPic = window.open(source,"win","top=200,left=200,width=10,height=10,resizable=1");
		fPic.document.open();
		fPic.document.write("<html><body style='align:center;valign:middle'>"+
							"<img src='"+source+"' onload='"+
							"window.resizeTo(self.document.images[0].width+30,"+
							"self.document.images[0].height+60)'></body></html>");
		fPic.document.close();
		fPic.focus();
		
		return false;
}

//# Funktionen zum Prüfen von Formularen /////////////////////

/** Email- Format prüfen;
	@param id die ID des Textelementes
 */
function checkEmail( id) {
	var src = document.getElementById(id);
	if( src == null) return true;
	var inhalt = src.value;
	if( ! inhalt || inhalt == "") return true; // Prüfe NICHT auf leeres Feld!
	
	if( ! inhalt.match(/^[_a-zA-Z0-9äöüÄÖÜ-]+(\.[_a-zA-Z0-9äöüÄÖÜ-]+)*@([a-zA-Z0-9äöüÄÖÜ-]+\.)+([a-zA-Z]{2,})$/))
    {
		src.focus();
		src.select();
		return false;
    }
	return true;
}

/** Prüfe Feld auf Leere - weicht ab von anderen ähnlichen Funktionen!
	@param id die ID des Textelementes
 */
function checkEmpty(id) {
	var src = document.getElementById(id);
	if( src == null) return true; // Prüfe keine nichtexistenten Felder
	var inhalt = src.value;
	if( inhalt.length == 0)
	{	
		src.focus();
		return false;
	}
	return true;
}
