/**********************************************************************/
/* Funktion oeffnet ein	Pop-Up-Fenster							             			*/	
/**********************************************************************/
function open_window(url, w, h, name, scroll, resize, tool, location)  
{
	var winleft = (screen.width - w) / 2; 
	var wintop = (screen.height - h) / 2;
	var winprops = "height="+h+",width="+w+",top="+wintop+",left="+winleft+",scrollbars="+scroll+",resizable="+resize+",toolbar="+tool+",location="+location;
	var win = window.open(url, name, winprops);
	if(window.focus) 
	{
		win.focus();
	}
}
/**********************************************************************/
/* Funktion laed Images vor          																  */	
/**********************************************************************/
function preload_images() 
{ 
  var d=document; 
	if(d.images)
	{ 
		if(!d.MM_p) d.MM_p=new Array();
   	var i,j=d.MM_p.length,a=preload_images.arguments; 
		for(i=0; i<a.length; i++)
		{
   		if (a[i].indexOf("#")!=0)
			{ 
				d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
			}
		}
	}
}	


function scroll_now(_y,_id,_action)
{
	document.getElementById(_id).scrollTop=_y;
	if(_action=="open")
	{
		if(_y<286) 
		{
			_abstand = (287-_y) / 3.5;
			_y=_y+_abstand;
			_y=Math.round(_y);
			setTimeout("scroll_now("+_y+",'"+_id+"','"+_action+"');",1);
		}
	}
	if(_action=="close")
	{
		if(_y>0) 
		{
			_abstand = ((-1)-_y) / 3.5;
			_y=_y+_abstand;
			_y=Math.round(_y);
			setTimeout("scroll_now("+_y+",'"+_id+"','"+_action+"');",1);
		}
	}
}

function do_scroll(_id,_action)
{
	if(_action=="open") scroll_now(0,_id,_action);
	if(_action=="close") scroll_now(286,_id,_action);
}

function elm(_name,_domain,_ext)
{
	document.write("<a href=\"mailto:");
	document.write(_name);
	document.write("@");
	document.write(_domain);
	document.write(".");
	document.write(_ext);
	document.write("\">");
	document.write(_name);
	document.write("@");
	document.write(_domain);
	document.write(".");
	document.write(_ext);
	document.write("</a>");
}

var haystackText = "";
function findMyText(needle, replacement) 
{
     if (haystackText.length == 0) {
          haystackText = document.getElementsByTagName("body")[0].innerHTML;
     }
     var match = new RegExp(needle, "ig");     
     var replaced = "";
     if (replacement.length > 0) {
          replaced = haystackText.replace(match, replacement);
     }
     else {
          var boldText = "<span class=search_hilight>" + needle + "</span>";
          replaced = haystackText.replace(match, boldText);
     }
     document.getElementsByTagName("body")[0].innerHTML = replaced;
}

function hide_content()
{
	var browser = navigator.userAgent;
	if(browser.indexOf("MSIE")!=-1)
	{
		for(i=0;i<100;i++)
		{
			if(document.getElementsByTagName('object')[i]=="[object]") document.getElementsByTagName('object')[i].style.visibility='hidden';
			if(document.getElementsByTagName('object')[i]!="[object]") i=100;
		}
		document.getElementsByTagName('body')[0].style.visibility='hidden';
	}
}