function showshout()
{
Fensteroptionen="toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0";
Grafikfenster=window.open("com_showshoutquery.php", "", Fensteroptionen + ",width=300,height=126");
Grafikfenster.focus();
}
function showgroupmem(mem_id, mem_groupid)
{
Fensteroptionen="toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0";
Grafikfenster=window.open("com_group_mem_edit.php?memid=" + mem_id + "&groupid=" + mem_groupid, "", Fensteroptionen + ",width=500,height=350");
Grafikfenster.focus();
}
function showorakelonline()
{
Fensteroptionen="toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0";
Grafikfenster=window.open("orakel/orakel.php", "", Fensteroptionen + ",width=800,height=600");
Grafikfenster.focus();
}
function showradio()
{
Fensteroptionen="toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0";
Grafikfenster=window.open("radio/radio_start.php", "", Fensteroptionen + ",width=600,height=500");
Grafikfenster.focus();
}
function EMail(s)
{
 var a = false;
 var res = false;
 if(typeof(RegExp) == 'function')
 {
  var b = new RegExp('abc');
  if(b.test('abc') == true){a = true;}
  }

 if(a == true)
 {
  reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)'+
                   '(\\@)([a-zA-Z0-9\\-\\.]+)'+
                   '(\\.)([a-zA-Z]{2,4})$');
  res = (reg.test(s));
 }
 else
 {
  res = (s.search('@') >= 1 &&
         s.lastIndexOf('.') > s.search('@') &&
         s.lastIndexOf('.') >= s.length-5)
 }
 return(res);
}
function chkcpForm() {
if (document.changeprofil.action.value == "sendform") 
{
	if(EMail(document.changeprofil.user_email.value) == false)
					  {
					  alert("E-Mail ungültig")
					  return
					  }
					  else
					  {
						document.changeprofil.submit()	
					  }
}
}
function chkregForm() {
if (document.reguser.action.value == "sendreg") 
{
	   var i
	   var anzahl
	   var auswahl
	   var bilderids
	   bilderids = ""
	   anzahl = 0
	    var reg = /\W/
	 if(reg.exec(document.reguser.user_nick.value))
	 {
	  alert("Keine Sonderzeichen im Benutzernamen erlaubt!")
	  return
	 }
	  if(document.reguser.user_passwort.value.length < 4)
	  {
	  alert("Das Passwort muss mindestens 4 Zeichen lang sein.")
	  return
	  }
	  if(reg.exec(document.reguser.user_passwort.value))
	  {
	  alert("Keine Sonderzeichen im Passwort erlaubt!")
	  return
	  }
	  if(document.reguser.user_passwort.value != document.reguser.user_passwort2.value )
	  {
	  alert("Die Passwörter stimmen nicht überein")
	  return
	  }
	  if(document.reguser.user_nick.value.length < 4)
	  {
	  alert("Der Benutzername muss mindestens 4 Zeichen lang sein.")
	  return
	  }
	  else
	  {
		  if(document.reguser.user_vname.value.length < 1)
		  {
		  alert("Gib bitte deinen Vornamen bitte an.")
		  return
		  }
		  else
		  {
			  if(document.reguser.user_name.value.length < 1)
			  {
			  alert("Gib bitte deinen Nachnamen an.")
			  return
			  }
			  else
			  {
				  if(document.reguser.user_plz.value.length < 4)
				  {
				  alert("Gib bitte die PLZ deines Wohnortes an.")
				  return
				  }
				  else
				  {
					  if(EMail(document.reguser.user_email.value) == false)
					  {
					  alert("E-Mail Adresse ungültig")
					  return
					  }
					  else
					  {
							  
							  if(document.reguser.user_email.value != document.reguser.user_reemail.value)
							  {
							  alert("Die E-Mail Adressen passen nicht überein.")
							  return
							  }
							  else
							  {
								  if(document.reguser.agb.checked == false)
								  {
									alert("Bitte bestätige die AGB'S")
									return
								  }
								  else
								  {
									document.reguser.submit() 
								  }
							  }
					  }
				  }
			  }
		  }
	 }

}
}
function showeventform( Breite, Hoehe)
	{
	Fensteroptionen="toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0";
	Grafikfenster=window.open('showeventform.php', "", Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
	Grafikfenster.focus();
	}
function showchat()
	{
	Fensteroptionen="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0";
	Grafikfenster=window.open('chatapplet/chat.php', "", Fensteroptionen + ',width=700,height=500');
	Grafikfenster.focus();
	}
	
function confirm_del(Message)
{	entscheidung = confirm(Message)
		if(entscheidung)
		{
		 document.delform.submit()
		}
		else
		{
		return
		}
}

function confirm_delpost(Message, path)
{	entscheidung = confirm(Message)
		if(entscheidung)
		{
		 document.location = path
		}
		else
		{
		return
		}
}

function sendeventForm() {
	if (document.sendevent.action.value == "sendevent") 
	{
	  if(document.sendevent.event_titel.value.length < 1)
	  {
		  alert("Gib bitte einen Eventnamen an.")
		  return
	  }
	  if(document.sendevent.event_text.value.length < 1)
	  {
		  alert("Also eine Beschreibung des Events muss schon dabei sein.")
		  return
	  }
	  if(document.sendevent.event_date_days.value.length < 1)
	  {
		  alert("Also das Datum brauchen wir schon.")
		  return
	  }
	  if(document.sendevent.event_date_month.value.length < 1)
	  {
		  alert("Also das Datum brauchen wir schon.")
		  return
	  }
	  if(document.sendevent.event_date_year.value.length < 1)
	  {
		  alert("Also das Datum brauchen wir schon.")
		  return
	  }
     document.sendevent.submit()
	}
}
function sendadmineventForm() {
	if (document.sendevent.action.value == "sendevent") 
	{
	  if(document.sendevent.event_titel.value.length < 1)
	  {
		  alert("Gib bitte einen Eventnamen an.")
		  return
	  }
	  if(document.sendevent.event_text.value.length < 1)
	  {
		  alert("Also eine Beschreibung des Events muss schon dabei sein.")
		  return
	  }
	  if(document.sendevent.event_date_days.value.length < 1)
	  {
		  alert("Also das Datum brauchen wir schon.")
		  return
	  }
	  if(document.sendevent.event_date_month.value.length < 1)
	  {
		  alert("Also das Datum brauchen wir schon.")
		  return
	  }
	  if(document.sendevent.event_date_year.value.length < 1)
	  {
		  alert("Also das Datum brauchen wir schon.")
		  return
	  }
     document.sendevent.submit()
	}
}
function sendnewsquery() {
	if (document.newsquery.newsquerysend.value == "1") 
	{
		 var reg = /\W/
		 if(reg.exec(document.newsquery.news_picname.value))
		 {
		  alert("Keine Sonderzeichen im Bildnamen erlaubt!")
		  return
		 }
	  if(document.newsquery.news_titel.value.length < 1)
	  {
		  alert("Gib bitte einen Newstitel an.")
		  return
	  }
	  if(document.newsquery.news_text.value.length < 1)
	  {
		  alert("Eine Neuigkeit benötigt ja wohl einen Inhalt.")
		  return
	  }
	 
     document.newsquery.submit()
	}
}
function sendnewspicquery() {
	if (document.newspicquery.newspicquerysend.value == "1") 
	{
		 var reg = /\W/
		 if(reg.exec(document.newspicquery.news_picname.value))
		 {
		   alert("Keine Sonderzeichen im Bildnamen erlaubt!")
		  return
		 }	 
     document.newspicquery.submit()
	}
}
function sendnewseditquery() {
	if (document.newseditquery.newseditquerysend.value == "1") 
	{
	  if(document.newseditquery.news_titel.value.length < 1)
	  {
		  alert("Gib bitte einen Newstitel an.")
		  return
	  }
	  if(document.newseditquery.news_text.value.length < 1)
	  {
		  alert("Eine Neuigkeit benötigt ja wohl einen Inhalt.")
		  return
	  }
	 
     document.newseditquery.submit()
	}
}
function showimage(GrafikURL, Breite, Hoehe)
		{
		Fensteroptionen="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0";
	
		Grafikfenster=window.open("", "", Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
		Grafikfenster.focus();
		Grafikfenster.document.open();
		with(Grafikfenster)
		{
			document.write("<html><head>");
			document.write("<title>Party Guides</title>");
			document.write("</head>");
			document.write("<body leftmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" topmargin=\"0\">");
			document.write("<img border=\"0\" onclick=\"window.close();\" src=\""+ GrafikURL +"\" title=\"Zum Schließen auf das Foto klicken\">");
			document.write("</body></html>");
		}
		}
	function showgal(ID, Breite, Hoehe, galid)
	{
	Fensteroptionen="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0";
	Grafikfenster=window.open('com_showpic.php?galid=' + galid + '&picid=' + ID + '&breite='+ Breite + '&high=' + Hoehe, "", Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
	Grafikfenster.focus();
	}