
function out(imgnum)
{
	theimg = document.images["pic"+imgnum];
	theimg.src = imgsrc[imgnum];
}
function lmout(imgn)
{
	out(imgn);
	start_pop_timer( );
}
function over(imgnum,newimg)
{
	theimg = document.images["pic"+imgnum];
	imgsrc[imgnum] = theimg.src;
	theimg.src = newimg;
}
	

box_up = 10;


function stdover(imgnum)
{
	theimg = document.images["pic"+imgnum];
	imgsrc[imgnum] = theimg.src;
	newimg = theimg.src;
	newimg = newimg.replace( ".gif", "-o.gif" );
	theimg.src = newimg;
	clearTimeout ( timer_id );
}
function toggleBox( obj_id, divstate )
{
    if( document.layers )	   //NN4+
    {
       document.layers[obj_id].visibility = divstate ? "show" : "hide";
    }
    else if( document.getElementById )	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById( obj_id );
        obj.style.visibility = divstate ? "visible" : "hidden";
    }
    else if( document.all )	// IE 4
    {
        document.all[obj_id].style.visibility = divstate ? "visible" : "hidden";
    }
}
function close_all_popups( )
{
	for( i=1; i <= 5; i++ )
	{
		toggleBox( 'lmbox'+i, 0 );
	}
}
var timer_id = null;
function start_pop_timer( )
{
	clearTimeout( timer_id );
	timer_id = setTimeout( "close_all_popups()", 2800 );
}
function over_lm( lmnum )
{
	over(lmnum+10,'imgs/mlb_bx-o.gif');
	for( i=1; i <= 5; i++ )
	{
		if( i != lmnum ) { toggleBox( 'lmbox'+i, 0 );
		//alert( "i="+i+"\nlmnum="+lmnum);
		}
	}
	if( lmnum != box_up ) box_up = 10;
}
function fb_over_lm( lmnum )
{
	over(lmnum+10,'imgs/mlb_bx-o.gif');
	/*for( i=1; i <= 5; i++ )
	{
		if( i != lmnum ) { toggleBox( 'lmbox'+i, 0 );
		}
	}
	if( lmnum != box_up ) box_up = 10;*/
}
function down_lm( lmnum )
{
	toggleBox( 'lmbox'+lmnum, 1 );
	box_up = lmnum;
}
function out_lm( lmnum )
{
	out(lmnum+10);
	start_pop_timer();
}
function fb_out_lm( lmnum )
{
	out(lmnum+10);
	//start_pop_timer();
}


function va_popup(url,winName,winParams)
{
	var theWindow = window.open(url,winName,winParams,0);	
	if( theWindow )	theWindow.focus( );
}
function ref_popup(winName,winParams)	// popup ... with referrer! (In IE, normally popups come with no refferer)
										// To make this work, the HREF needs to link to the URL, and call this function onClick( [] ) ...
{
	var theWindow = window.open('',winName,winParams,0);
	if( theWindow )	theWindow.focus( );
}

// va_glossar ... automatically opens a popup; options like windowsize etc
// are set automatically. The only opion that needs to be set is which
// 'word' is jumped to, via the '#' sign in the URL

function va_glossar( part )
{
	var theWindow = window.open('html/popups/glossar.html#'+part,'Glossar','height=600,width=450,scrollbars=yes',0);
	if( theWindow ) theWindow.focus( );
}

function popupform(myform, windowname)
{
   //if (! window.focus)return true;
   window.open('', windowname, 'height=200,width=400,scrollbars=yes');
   myform.target=windowname;
   return true;
}
/* öffnet neues Fenster ohne Steuerleisten
     Parameter:	x = Href
		w=Fensterbreite
		h=Fensterhöhe
		p=Position links + xx
		n=Name des Fensters
  Aufruf : nw('href-adresse',w,h,p,'FensterName');
*/
function nwr(x,w,h,t,l,n){
if (h == "") h = 100;
if (w == "") w = 100;
if (t == "") t = 10;
if (l == "") l = 10;
if (n == "") n = "login";
var xx = "top="+t+",left="+l+",width="+w+ ",height="+h+", directories=0, status=1, scrollbars=1, resizable=1, toolbar=0,menubar=0";
msgWindow=window.open(x,n,xx);
msgWindow.focus();
 }