// JavaScript Document

       var navis_activated = 0;

       function changeNaviBack(nid) {
	   	   if (document.getElementById(nid).className!='step11' && document.getElementById(nid).className!='step11High') {
	       if (document.getElementById(nid).style.backgroundImage.indexOf('/_images/navi/navi_active.gif') > -1 || document.getElementById(nid).style.backgroundImage.indexOf('/_images/navi/navi_active_high.gif') > -1) {
                       document.getElementById(nid).style.backgroundImage='none';
	       }
               else {
                       if (document.getElementById(nid).className.indexOf('High') > 0) document.getElementById(nid).style.backgroundImage='url(/_images/navi/navi_active_high.gif)';
					   else document.getElementById(nid).style.backgroundImage='url(/_images/navi/navi_active.gif)';
                       document.getElementById(nid).style.backgroundRepeat='repeat-x';
               }
			}
       }

       function activate_navis() {
	      if (navis_activated < 2) {   
		          cur_nav = 1;
	              while (typeof document.getElementById('step_'+cur_nav)!='undefined' && document.getElementById('step_'+cur_nav)) {
				       cur1_is_active = false;
				       if (document.getElementById('step_'+cur_nav).className=='step11') { 
					   	document.getElementById('subcontainer_'+cur_nav).style.display='block';
						cur1_is_active = true;
					   }
					   cur_sub_nav = 1;
					   while (typeof document.getElementById('step_'+cur_nav+'_'+cur_sub_nav)!='undefined' && document.getElementById('step_'+cur_nav+'_'+cur_sub_nav)) {
					       if (document.getElementById('switch_'+cur_nav) && typeof document.getElementById('switch_'+cur_nav)!='undefined') document.getElementById('switch_'+cur_nav).style.display='block';
						   if (cur1_is_active) { 
						   	if (document.getElementById('switch_'+cur_nav) && typeof document.getElementById('switch_'+cur_nav)!='undefined') document.getElementById('switch_'+cur_nav).style.backgroundPosition='center bottom';
						   }
						   cur2_is_active = false;
						   if (document.getElementById('step_'+cur_nav+'_'+cur_sub_nav).className=='step21') { 
					   		if (document.getElementById('switch_'+cur_nav+'_'+cur_sub_nav) && typeof document.getElementById('switch_'+cur_nav+'_'+cur_sub_nav)!='undefined') document.getElementById('subcontainer_'+cur_nav+'_'+cur_sub_nav).style.display='block';
							 cur2_is_active = true;
					   		}
							
							if (typeof document.getElementById('step_'+cur_nav+'_'+cur_sub_nav+'_1')!='undefined' && document.getElementById('step_'+cur_nav+'_'+cur_sub_nav+'_1')) { 
								if (document.getElementById('switch_'+cur_nav+'_'+cur_sub_nav) && typeof document.getElementById('switch_'+cur_nav+'_'+cur_sub_nav)!='undefined') document.getElementById('switch_'+cur_nav+'_'+cur_sub_nav).style.display='block';
								if (cur2_is_active) document.getElementById('switch_'+cur_nav+'_'+cur_sub_nav).style.backgroundPosition='center bottom';
							}
							
					       cur_sub_nav++;
						   navis_activated++;
					   }
					   cur_nav++;
	              }
		    }
       }

	   /* START: überarbeiteter Abschnitt für Navisliding */
       function switch_navi(cur_nav, cur_sub_nav) {
               if (cur_sub_nav==0) {
			   	   	if (document.getElementById('switch_'+cur_nav).style.backgroundPosition.indexOf('bottom')>-1 || document.getElementById('switch_'+cur_nav).style.backgroundPosition=="50% 100%")
						make_blind('subcontainer_'+cur_nav, true,cur_nav,0,true);
					else
						make_blind('subcontainer_'+cur_nav, false,cur_nav,0,true);
			 	}
				else  { 
					if (document.getElementById('switch_'+cur_nav+'_'+cur_sub_nav).style.backgroundPosition.indexOf('bottom')>-1|| document.getElementById('switch_'+cur_nav+'_'+cur_sub_nav).style.backgroundPosition=="50% 100%")
						make_blind('subcontainer_'+cur_nav+'_'+cur_sub_nav, true,cur_nav,cur_sub_nav,true);
					else
						make_blind('subcontainer_'+cur_nav+'_'+cur_sub_nav, false,cur_nav,cur_sub_nav,true);
				}
       }
	   
	   var effect_locked = false;
   
	   function make_blind(id, blind_up, step1_id, step2_id, ismainnavi) {
			if (!effect_locked) { 
				effect_locked = true;
				if (blind_up) {
					if (step2_id!=0) {
						document.getElementById('switch_'+step1_id+'_'+step2_id).style.backgroundPosition='center top';
						
					}
					else {
						if (document.getElementById('switch_'+step1_id) && typeof document.getElementById('switch_'+step1_id)!='undefined') document.getElementById('switch_'+step1_id).style.backgroundPosition='center top';
					}
					Effect.BlindUp(id, {duration:0.75, afterFinish: function(effect) { effect_locked = false;  }});	
				}
				else {
					if (step2_id!=0) {
						document.getElementById('switch_'+step1_id+'_'+step2_id).style.backgroundPosition='center bottom';
						if (ismainnavi) unset_other_navis(step1_id, step2_id);
					}
					else {
						if (document.getElementById('switch_'+step1_id) && typeof document.getElementById('switch_'+step1_id)!='undefined') document.getElementById('switch_'+step1_id).style.backgroundPosition='center bottom';
						if (ismainnavi) unset_other_navis(step1_id, 0);
					}
					Effect.BlindDown(id, {duration:0.75, afterFinish: function(effect) { effect_locked = false; }});
				}
			}
	   }
	   
	   function unset_other_navis(step1_id, step2_id) {
	   		if (step2_id==0) {
				cur_nav = 1;
				while (typeof document.getElementById('step_'+cur_nav)!='undefined' && document.getElementById('step_'+cur_nav)) {
				  	effect_locked = false;
					if (cur_nav!=step1_id && typeof document.getElementById('subcontainer_'+cur_nav)!='undefined' && document.getElementById('subcontainer_'+cur_nav) && document.getElementById('step_'+cur_nav).className!='step11') make_blind('subcontainer_'+cur_nav, true, cur_nav, 0, false);
					cur_nav++;
				}
			}
			else {
				cur_nav = step1_id;
				cur_sub_nav=1;
				while (typeof document.getElementById('step_'+cur_nav+'_'+cur_sub_nav)!='undefined' && document.getElementById('step_'+cur_nav+'_'+cur_sub_nav)) {
					effect_locked = false;
					if (cur_sub_nav!=step2_id && typeof document.getElementById('subcontainer_'+cur_nav+'_'+cur_sub_nav)!='undefined' && document.getElementById('subcontainer_'+cur_nav+'_'+cur_sub_nav) && document.getElementById('step_'+cur_nav+'_'+cur_sub_nav).className!='step21') make_blind('subcontainer_'+cur_nav+'_'+cur_sub_nav, true, cur_nav, cur_sub_nav, false);
					cur_sub_nav++;
				}
			}
	   }	
	   
	   /* ENDE: überarbeiteter Abschnitt für Navisliding */
	   
       window.setTimeout("activate_navis()", 100);
       window.setTimeout("activate_navis()", 250);
       window.setTimeout("activate_navis()", 500);
       window.setTimeout("activate_navis()", 1000);
       window.setTimeout("activate_navis()", 2500);
       window.setTimeout("activate_navis()", 5000);
       window.setTimeout("activate_navis()", 10000);
