function eventapp ( o ){
	var aTxt = getDivsByClassName ( "fulltxt", o.parentNode );
	var aTeaser = getDivsByClassName ( "txt", o.parentNode );
	var oLang = document.body.id.toString()
	
	if ( aTxt[ 0 ].style.display == '' || aTxt[ 0 ].style.display == 'none' ){
		aTxt[ 0 ].style.display = 'block'
		aTeaser[ 0 ].style.display = 'none'
		o.style.background = "url( '/images/legoland2006/close.gif' ) 190px no-repeat"
	}else{
		aTxt[ 0 ].style.display = 'none'
		aTeaser[ 0 ].style.display = 'block'
		o.style.background = "url( '/images/legoland2006/read_more.gif' ) 190px no-repeat"
	}	
}

function getDivsByClassName ( sClass, o ) {
	var aElements = new Array ();
	var aTotal = o.getElementsByTagName ( "div" );
	for ( i = 0; i < aTotal.length; i++ ) 
		if ( aTotal.item ( i ).className == sClass ) aElements [ aElements.length ] = aTotal.item ( i );
	return aElements;
}

function openwindow ( s ) {
	window.open( s,"popup","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=1,width=630,height=426,left=100,top=5" )
	return false;
}

function listapp( o ){
	a = o.parentNode
	b = a.getElementsByTagName ( "p" )	
	if ( b.item(0).style.display == 'block' ) b.item(0).style.display = 'none'
	else b.item(0).style.display = 'block'
}

function minifigs (){
	var y 			= Math.round(Math.random()*7)	
	var sUrl 		= "/images/legoland2006/fig_"+y.toString()+".png"
	var oFig 	= getDivsByClassName ( "figure", document.getElementById( 'bar' ));
	if ( document.all )	oFig[ 0 ].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+sUrl+"', sizingMethod='scale')";
	else oFig[ 0 ].style.background = 'url( "'+sUrl+'" )'
}

function openImage( s, w, h ){
	window.open( s,"popup","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=1,width="+w+",height="+h+",left=100,top=5" )
	return false;
}

function checkState (){
     if( document.getElementById( 'top' ).getElementsByTagName( 'object' ) ){
    	setFlashVariables( 'sendmovie','testvar1=true')
    	clearInterval( myInteval )
    }
}

oGod.mOnload( minifigs );
