//<![CDATA[
addOnloadEvent( modElements );

function addOnloadEvent( funct ) {
	if( 'undefined' != typeof window.addEventListener ) {
		//.. gecko, safari, konqueror and standard
		window.addEventListener('load', funct, false);
	} else if( 'undefined' != typeof document.addEventListener ) {
		//.. opera 7
		document.addEventListener( 'load', funct, false );
	} else if( 'undefined' != typeof window.attachEvent ) {
		//.. win/ie
		window.attachEvent( 'onload', funct );
	}
}
function modElements( )	{
	as = document.getElementsByTagName( "a" );	
	for( i=0; i<as.length; i++ )	{
		as[i].onfocus = blurMe;
		if( as[i].className.indexOf( "external" ) > -1 )
			setTarget( as[i] );
	}
	ins = document.getElementsByTagName( "input" );
	for( i=0; i<ins.length; i++ )	{
		if( !ins[i].onfocus )
		ins[i].onfocus = ( ins[i].type == "submit" || ins[i].type == "image" ) ? blurMe : null;
	}
	
	divs = document.getElementsByTagName( "div" );

	for( i=0; i<divs.length; i++ )	{
		if(divs[i].id.indexOf( "more_" ) == 0)
			divs[i].onclick = expandMore;
	}
	// ---  Ticker starten wenn vorhanden
	if ( 'function' == typeof window.tTicken ) {
		tGo = setInterval( 'tTicken()', tInterval );
	}	
}

function blurMe( )	{ this.blur( ) }

function setTarget( obj )	{
	obj.setAttribute( "target", "_blank" );
}

function openIt(page,w,h,titel,srl) {
	xPos=screen.width/2-(w/2);
	yPos=screen.height/2-(h/2);
	window.open(page,titel,"width="+w+",height="+h+",top="+yPos+",left="+xPos+",scrollbars="+srl);
}
//]]
