// (c) EIKONA AG, it.x informationssysteme gmbh, Alle Rechte vorbehalten.

// History --------------------------------------------------------------------------------
// 11.12.02 mgs Erstellung
// History --------------------------------------------------------------------------------
 

// ----------------------------------------------------------------------------------------
// Allgemeine Zusatzfunktionen.
// ----------------------------------------------------------------------------------------

   //
   // F�rbt Elemente einer Seite ein.
   //
	function js_set_cellcolor(zelle, farbe)
		{
		for(var i = 0; i <= 10; i++)
			{
			if(document.getElementById('zelle_'+i+'_'+zelle))
				{
				document.all['zelle_'+i+'_'+zelle].style.backgroundColor = farbe
				}
			}
		}
		
	   
	   
// ----------------------------------------------------------------------------------------
// U N G E P R � F T E   F U N K T I O N E N ! ! ! 
// ----------------------------------------------------------------------------------------

 function Add_A_Favorite(url,linktitel)
		{
		external.AddFavorite(url,linktitel);
		}

	function nocontextmenu() 
		{
		event.cancelBubble = true 
		event.returnValue  = false;
		return false;
		}
	
	function norightclick(e) 
		{
		if(window.Event) 
			{
			if(e.which==2||e.which==3) 
			return false;
			}
		else 
			if(event.button==2||event.button==3) 
				{
				event.cancelBubble = true 
				event.returnValue  = false;
				return false;
				}
			}

// Diese Zeilen in den Seitenkopf einbinden.
// 
// <SCRIPT language=JavaScript1.2> 
// 		<!--
// 		if(window.Event) 
// 			document.captureEvents(Event.MOUSEUP);
// 
// 		document.oncontextmenu = nocontextmenu;
// 		document.onmousedown   = norightclick;
// 		-->
// </SCRIPT>


//	----------------------------------------------------------------------------------------
//	3 Funktionen f�r Browserfenster�ffner.
//	----------------------------------------------------------------------------------------
	function tmt_winLaunch(theURL,winName,targetName,features) 
		{ 
		eval(winName+"=window.open('"+theURL+"','"+targetName+"','"+features+"')"); eval(targetName+".focus()");
		}
	
	function MM_openBrWindow(theURL,winName,features) 
		{ //v2.0
		window.open(theURL,winName,features);
		}


//	----------------------------------------------------------------------------------------
//	Boxslider aus Container-Elementen
//	----------------------------------------------------------------------------------------
var stop_toggle_slidebox = false;
function box_navigation(str_ziel, str_scroll_to)
	{
	int_duration = '0.5';
	if($(str_ziel))
		{
		if(stop_toggle_slidebox == false && $(str_ziel).innerHTML.length > 0)
			{
			stop_toggle_slidebox = true;
			str_style = $(str_ziel).getStyle('display');
			if(str_style == 'none')
				{
				Effect.SlideDown(str_ziel, {
					duration: int_duration,
					afterFinish: function(){
						if($(str_scroll_to))
							{
							new Effect.ScrollTo($(str_scroll_to));
							}
						stop_toggle_slidebox = false;
						}
					});
				}
			else
				{
				Effect.SlideUp(str_ziel, {
					duration: int_duration,
					afterFinish: function(){stop_toggle_slidebox = false;}
					});
				}
			}
		}
	}

//	----------------------------------------------------------------------------------------
//	Navigation 2. Ebene
//	----------------------------------------------------------------------------------------
	var stop_toggle_navi = false;
	function toggle_navi(str_ziel, str_quelle)
		{
		int_duration = '0.8';
		if(stop_toggle_navi == false)
			{
			stop_toggle_navi = true;
			str_style = $(str_ziel).getStyle('display');
			if(str_style == 'none')
				{
				$(str_quelle).setStyle({'backgroundPosition': '0px -11px'});
				Effect.SlideDown(str_ziel, {
					duration: int_duration,
					afterFinish: function(){stop_toggle_navi = false;}
					});
				}
			else
				{
				$(str_quelle).setStyle({'backgroundPosition': '0px 0px'});
				Effect.SlideUp(str_ziel, {
					duration: int_duration,
					afterFinish: function(){stop_toggle_navi = false;}
					});
				}
			}
		return false;
		}
