function cpic(name, pic){
	var d = eval('document.'+name);
	d.src = pic;
}
function scrollit_r2l()
{
 window.setTimeout("scrollit_r2l()",150);
 var msg=document.getElementById("marquee").value;
 document.getElementById("marquee").value=msg.substring(1)+msg.substring(0,1);
}

function checkForm(){
	var err = "";
	with(document.prgf){
		if (title.value == "") err += "Der Titel muss gefüllt sein\n";
		if (type.value == "none") err += "Wähle eine Kategorie\n";
		if (description.value == "") err += "Die Beschreibung muss gefüllt sein\n";
		if (begin.value == "none") err += "Wann soll das Event anfangen?\n";
		if (fee.value == "none") err += "Wieviel soll das Event kosten?\n";
		if (err == "") submit();
		else alert(err);
	}	
}
function owinfo(prgid){
		window.open("Detail.php?prgid=" + prgid + "", "owinfo", "status=no, menubar=no, scrollbars=yes, width=600, height=450");
	
}

var description=new Array()
description[0]='<b>Janas Abschiedsparty</b><br>...war wie sieben Jahre in der Zeit zurückversetzt.<br>Manche ändern sich nie.'
description[1]='<b>Wave Gothic Treffen 2005</b><br>Anne Clark, Kiev, Das Ich...'
description[2]='<b>Proberaum in Deutz</b><br>Grösser, jedoch weniger Platz.'
description[3]='<b>Ley mit Hut</b><br>Alle Mitarbeiter unter einen Hut zu bringen<br>ist nicht einfach.'
description[4]='<b>Sojus Xmas 2004</b><br>Weihnachtsfeier im Sojus sind immer ein erfreuliches Wiedersehen mit alten Bekannten.'
description[5]='<b>Hurricane 2004</b><br>Live of Agony, Placebo, Fanta 4...<br>'
description[6]='<b>Essen Motor Show 2003</b><br>Viele bunte Autos'
description[7]='<b>Rainbow 2003</b><br>'
description[8]='<b>Summerjam 2003</b><br>Penetration mit dem Maiskolben'
description[9]='<b>Externstein</b><br>'
description[10]='<b>Rhein - BBall</b><br>Jeden Samstag wieder.'
description[11]='<b>D&uuml;sseldorf</b><br>'
description[12]='<b>Hurricane 2003</b><br>'
description[13]='<b>Trash-Chic</b><br>Geburtstagsfeier von Chrissi und Dennis'
description[14]='<b>27. Geburtstagsfeier</b><br>'

//Do not edit below here

iens6=document.all||document.getElementById
ns4=document.layers

<!--GLOBAL VARIABLES-->
var thename
var theobj
var thetext
var winHeight
var winPositionFromTop
var winWidth
var startH=2
var openTimer
var cssclass="tooltip"
<!--END GLOBAL VARIABLES-->

<!--GLOBAL FUNCTIONS-->

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function setObj(text,theswitch,inwidth,inheight, thisobj) {
	/*thisobj.style.backgroundColor = "#a3a3a3";
	thisobj.style.color = "#000000";
	thisobj.style.borderColor = "#ffffff";
	thisobj.style.borderStyle = "inset";
	thetext=text*/
	/*if(iens6){
		thename = "viewer"
		theobj=document.getElementById? document.getElementById(thename):document.all.thename
		winHeight=100
			if(iens6&&document.all) {
				winPositionFromTop=!window.opera? ietruebody().clientHeight : document.body.clientHeight
				winWidth=(ietruebody().clientWidth-ietruebody().leftMargin)
			}
			if(iens6&&!document.all) {
				winPositionFromTop=window.innerHeight
				winWidth=(window.innerWidth-(ietruebody().offsetLeft+30))
			}
			if(theswitch=="override") {
				winWidth=inwidth
				winHeight=inheight
			}
		theobj.style.width=winWidth+"px"
		theobj.style.height=startH+"px"
			if(iens6&&document.all) {
				theobj.style.top=ietruebody().scrollTop+winPositionFromTop+"px"
				//window.status=winPositionFromTop
				//alert(winPositionFromTop);
				theobj.innerHTML = ""
				theobj.insertAdjacentHTML("BeforeEnd","<table cellpadding=6 cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td class="+cssclass+" width=100% valign=top>"+thetext+"</td></tr></table>")
			}
			if(iens6&&!document.all) {
				theobj.style.top=window.pageYOffset+winPositionFromTop+"px"
				theobj.innerHTML = ""
				theobj.innerHTML="<table cellpadding=6 cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td class="+cssclass+" width=100% valign=top>"+thetext+"</td></tr></table>"
			}
	}
	if(ns4){
		thename = "nsviewer"
		theobj = eval("document."+thename)
		winPositionFromTop=window.innerHeight
		winWidth=window.innerWidth
		winHeight=100
			if(theswitch=="override") {
				winWidth=inwidth
				winHeight=inheight
			}
		theobj.moveTo(0,eval(window.pageYOffset+winPositionFromTop))
		theobj.width=winWidth
		theobj.clip.width=winWidth
		theobj.document.write("<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=1><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>")
		theobj.document.close()
	}*/
//alert(ns4+"dd")
	//viewIttop()
}

function viewIt() {
	if(startH<=winHeight) {
		if(iens6) {
			theobj.style.visibility="visible"
				if(iens6&&document.all) {
					theobj.style.top=(ietruebody().scrollTop+winPositionFromTop)-startH+"px"
				}

				if(iens6&&!document.all) {
					theobj.style.top=(window.pageYOffset+winPositionFromTop)-startH+"px"
				}
			theobj.style.height=startH+"px"
			startH+=7
			openTimer=setTimeout("viewIt()",1)
		}
		if(ns4) {
			theobj.visibility = "visible"
			theobj.moveTo(0,(eval(window.pageYOffset+winPositionFromTop)-startH))
			theobj.height=startH
			theobj.clip.height=(startH)
			startH+=7
			openTimer=setTimeout("viewIt()",1)
			alert(window.pageYOffset+" ; "+winPositionFromTop + " ; " + startH);
		}
	}else{
		clearTimeout(openTimer)
	}
}

function viewIttop() {
	if(startH<=winHeight) {
		if(iens6) {
			theobj.style.visibility="visible"
				if(iens6&&document.all) {
					theobj.style.top=(ietruebody().scrollTop-60)+startH+"px"//fängt oben an und scrollt runter
				}
				if(iens6&&!document.all) {
					theobj.style.top=(window.pageYOffset-60)+startH+"px"
				}
			//theobj.style.height=60
			theobj.style.height=startH+"px"
			startH+=7
			openTimer=setTimeout("viewIttop()",1)
		}
		if(ns4) {
			theobj.visibility = "visible"
			theobj.moveTo(0,(eval(window.pageYOffset+winPositionFromTop)-startH))
			theobj.height=startH
			theobj.clip.height=(startH)
			startH+=7
			openTimer=setTimeout("viewIttop()",1)
		}
	}else{
		clearTimeout(openTimer)
	}
}

function stopIt(thisobj) {
	/*thisobj.style.backgroundColor = "#343434";
	thisobj.style.color = "#ffffff";
	thisobj.style.borderColor = "#343434";
	thisobj.style.borderStyle = "outset";*/
	/*if(iens6) {
		theobj.innerHTML = ""
		theobj.style.visibility="hidden"
		startH=2
	}
	if(ns4) {
		theobj.document.write("")
		theobj.document.close()
		theobj.visibility="hidden"
		theobj.width=0
		theobj.height=0
		theobj.clip.width=0
		theobj.clip.height=0
		startH=2
	}*/
}
<!--END GLOBAL FUNCTIONS-->
function wopen(lx, name){
	winh = screen.availHeight-30	
	winw = screen.availWidth-30
	if(winw > 870) winw = 870;
	//if(screen.availWidth) winw = 870;
	window.open(lx, name, "left=0,top=0,height="+winh+", width="+winw+",menubar=no,toolbar=no,resizable=yes,status=no");
}
function music_load(song){
	//if (music && music.open && !music.closed) alert();
	//music.close();
	winh = 45;
	winw = 170;
	music = window.open("music.php?song="+song, "music_win", "left=0,top=0,height="+winh+", width="+winw+",menubar=no,toolbar=no,resizable=yes,status=no");
	//music.focus();
}
function song_next(){
	//var s_num = music.document.getElementByID('s_num').value;	
	alert(music.document.getElementByID('s_num').value)
	//music_load(s_num);
}

function check_email(){
	var s = document.f_news.in_news.value;

	 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)
	 }
	 if (res) document.f_news.submit();
	 else alert("Emailadresse stimmt nicht!");
	 return(res);
}
