function confirmSubmit()
{
var agree=confirm("Sind Sie sicher?");
if (agree)
	return true ;
else
	return false ;
}

// ######### Freizeitplaner #############

function OpenFreizeitPlaner()
{
   PopUp = 0;
   PopUp = window.open("","fzperftkreis","width=789,height=566,directories=0,location=0,menubar=0,resizeable=0,scrollbars=0,status=0,toolbar=0");

 	if (PopUp)
   	{
	   	    PopUp.location.href = "http://erftkreis.tourtorial.de/index.php3";    
   	}
}

// ######### Bildungsnetz Karte #############


function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
   var obj = document.layers ? document.layers[szDivID] :
   document.getElementById ?  document.getElementById(szDivID).style :
   document.all[szDivID].style;
   obj.display = document.layers ? (iState ? "show" : "hide") :
   (iState ? "inline" : "none");
}

function addFormEvent(func) {
  if (!document.getElementById | !document.getElementsByTagName) return
  var oldonload=window.onload
  if (typeof window.onload != 'function') { window.onload=func }
  else {
    window.onload=function() { oldonload(); func() }
  }
}

// fade effekt anfang
function $(v) { return(document.getElementById(v)); }
function $S(v) { return($(v).style); }
function uni(v,id,s,top) { var ob=$S(id),b=v/100; ob.opacity=b; ob.top=top+'px'; ob.MozOpacity=b; ob.KhtmlOpacity=b; ob.filter="alpha(opacity="+v+")"; }
function zero(v) { v=parseInt(v); return(!isNaN(v)?v:0); }

function fade(id,ln,s) { 
	var top=zero(parseInt($S(id).top));
	function opacity(oStart,oEnd,ln) { 
		var speed=Math.round(ln/100),timer=0;
		if(oStart>oEnd) { 
			for(i=oStart; i>=oEnd; i--) { 
				setTimeout("uni("+i+",'"+id+"','','"+(top--)+"')",timer*speed); 
				timer++; 
			} 
			setTimeout("$S('"+id+"').display='none';",timer*speed); 
		}
	else if(oStart<oEnd) { $S(id).display='inline'; for(i=oStart; i<=oEnd; i++) { setTimeout("uni("+i+",'"+id+"','"+1+"','"+(top++)+"')",timer*speed); timer++; } }
	}
	if(s==1 || (!s && $S(id).opacity==0)) opacity(0,100,ln); else opacity(100,0,ln);
}
// fade effekt ende


function showDiv(id){
	if (!document.getElementsByTagName) return
	if (document.getElementById(id).style.display=='block'){
		document.getElementById(id).style.display='none'
	}
	else{
		document.getElementById(id).style.display='block'
	}
	//  focus is moved by the href of the link to the start of the help
}

function write_map() {
	document.write('<div id="karte"><h3>Mitglieder auf der Karte<\/h3><div id="map"><\/div><\/div>'); 
	load();
}

function plusMinus(id) {
    if (!document.getElementsByTagName) return
    if(document.getElementById(id).className=='more') {
        document.getElementById(id).className='less';
    } else
        document.getElementById(id).className='more';
    return;
}

function hideDiv(id) {
	if (!document.getElementsByTagName) return	
	document.getElementById(id).style.display = 'none'
}

function init_help_kontaktform() {
	if (!document.getElementsByTagName) return
	hideDiv('hlp_mailMessage');
	hideDiv('hlp_mailName');
	hideDiv('hlp_mailEmail');
	hideDiv('hlp_mailPhone');
	hideDiv('hlp_cc');
}

function init_help_produktform() {
	if (!document.getElementsByTagName) return
	hideDiv('hlp_menge');
	hideDiv('hlp_prename');
	hideDiv('hlp_lastname');
	hideDiv('hlp_street');
	hideDiv('hlp_zip');
	hideDiv('hlp_city');
	hideDiv('hlp_mail');
	hideDiv('hlp_cc');
}

function init_help_kontakt() {
	if (!document.getElementsByTagName) return
	hideDiv('hlp_mailMessage');
	hideDiv('hlp_mailName');
	hideDiv('hlp_mailEmail');
	hideDiv('hlp_mailPhone');
}

function init_hh_menue() {
	if (!document.getElementsByTagName) return
	hideDiv('hh_menue_1');
	hideDiv('hh_menue_2');
	hideDiv('hh_menue_3');
	hideDiv('hh_menue_4');
}

function toggle_ehrenamt_text() {
	if (document.getElementById('ehrenamt_text_div').style.display=='block'){
		document.getElementById('ehrenamt_text_div').style.display='none'
	}
	else {
		document.getElementById('ehrenamt_text_div').style.display='block'
	}
}