﻿	var act_div = '#entry_0';
	var old_pic = null;
	var old_small_pic = 0;

	function change_pic(new_pic) {
		if (old_pic != null)
			$('#pic_' + old_pic).hide(0);				

		$('#pic_' + new_pic).fadeIn(500);		
		old_pic = new_pic;
	}

	function change_small_pic(new_small_pic) {
		ChangeImages('small_pic_' + old_small_pic, 'images/pic_switch_0.gif');

		ChangeImages('small_pic_' + new_small_pic, 'images/pic_switch_1.gif');
		old_small_pic = new_small_pic;
	}
	

	function switch_entry(show_div) {

		if (show_div != act_div) {
	
			if (act_div) {
				$(act_div).hide(0);				
				act_div = show_div;
			}
	
//			$(show_div).show(400);
			$(show_div).fadeIn(500);
		}
		
	}


	function auto() {
		$("#header_typo").slideUp("slow");
		setTimeout ('$("#header_bild").slideUp(800)', 800);
	}
	function slideHeaderUp () {
		$("#header_typo").slideUp(800);
		$("#header_bild").slideUp(800);
	}

	function slideHeaderDown () {
		$("#header_typo").slideDown(800);
		$("#header_bild").slideDown(800);
	}





	function findObj(n, d) { 
  		var p,i,x;  

		if (!d) d=document; 
		if ((p=n.indexOf("?"))>0&&parent.frames.length) {
    		d=parent.frames[n.substring(p+1)].document; 
			n=n.substring(0,p);
		}

	 	if (! (x=d[n]) && d.all) 
			x=d.all[n]; 
		
		for (i=0; !x && i<d.forms.length; i++) 
			x=d.forms[i][n];

		for (i=0; !x && d.layers && i<d.layers.length; i++) 
			x=findObj(n,d.layers[i].document);
			
  		if(!x && d.getElementById) 
			x=d.getElementById(n); 
			
		return x;
	}
	
	
	function ChangeImages(name, img_src) { 
  		var obj;

		if ((obj=findObj(name))!=null) 
    		obj.src=img_src; 
	}	

	function ShowHideLayers(name, status) { 
  		var v,obj;

		if ((obj=findObj(name))!=null) { 
			v=status;
    		if (obj.style) { 
				obj=obj.style; 
				v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
			}
    		obj.visibility=v; 
		}
	}	

	function DisplayHideLayers(name, status) { 
  		var v,obj;

		if ((obj=findObj(name))!=null) { 
			v=status;
    		if (obj.style) { 
				obj=obj.style; 
				v=(v=='show')?'block':(v=='hide')?'none':v; 
			}
    		obj.display=v; 
		}
	}

