
function pngalpha() {
	
	if( navigator.appVersion.indexOf('MSIE 6.0') > 0 ) {

		var picId = 0;
		
		var overlayimage = 'images/spacer.gif';

		while( picId < document.images.length ) {
	
			//Bildtyp ermitteln
			var ext = document.images[picId].src;
			ext = ext.substring(ext.length-3,ext.length);
			ext = ext.toLowerCase();

			if( ext == 'png' ) {

				var src = document.images[picId].src;
				var height = document.images[picId].height;
				var width = document.images[picId].width;

				document.images[picId].src = overlayimage;
				document.images[picId].height = height;
				document.images[picId].width = width;
				document.images[picId].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
	
			}

			++picId;
	
		}

	}
	
}


window.onload = pngalpha;






/* Listbox-Height */
var client = {

	getPage: function() { 
		
		// Default-Values for 1024x768
		var pageWidth = 720;
		var pageHeight = 576;
		
		var scrollArr = this.getScroll();
		var winArr = this.getWindow();
		pageWidth = winArr.width + scrollArr.left;
		pageHeight = winArr.height + scrollArr.top;
	
		return { scrollX: scrollArr.left, scrollY: scrollArr.top, winW: winArr.width, winH: winArr.height, pageW: pageWidth, pageY: pageHeight };
	}, 
	
	getScroll: function() { 
		return { left: this.scrollLeft(), top: this.scrollTop() };
	}, 
	
	getWindow: function() { 
		return { width: this.windowWidth(), height: this.windowHeight() };
	},
	
	scrollLeft: function() {
		var xScroll = 0;
		if (self.pageXOffset)
			xScroll = self.pageXOffset;
		else if (document.documentElement && document.documentElement.scrollLeft) 
			xScroll = document.documentElement.scrollLeft;
		else if (document.body)
			xScroll = document.body.scrollLeft;
			
		return xScroll;
	},
	
	scrollTop: function() {
		var yScroll = 0;
		if (self.pageYOffset)
			yScroll = self.pageYOffset;
		else if (document.documentElement && document.documentElement.scrollTop)
			yScroll = document.documentElement.scrollTop;
		else if (document.body)
			yScroll = document.body.scrollTop;
			
		return yScroll;
	},
	
	windowWidth: function() {
		var xWin = 720;
		if (self.innerHeight)
			xWin = self.innerWidth; 
		else if (document.documentElement && document.documentElement.clientWidth) 
			xWin = document.documentElement.clientWidth; 
		else if (document.body) 
			xWin = document.body.clientWidth;
			
		return xWin; 
	},
	
	windowHeight: function() { 
		var yWin = 576;
		if (self.innerHeight)
			yWin = self.innerHeight;
		else if (document.documentElement && document.documentElement.clientHeight)
			yWin = document.documentElement.clientHeight;
		else if (document.body)
			yWin = document.body.clientHeight;
			
		return yWin; 
	}
};



var updateShowBox;
var lastShowBox;

function showBox( id, type )
{
	yScroll = client.scrollTop()
	$j(id).css('top', yScroll );
	
	
	if( type == 0 ) {
		lastShowBox = id;
		// $j('#overFrameInner').html(showBoxContent[id]['text']);
		
		$j(id).fadeIn(1000, function(){ 
			$j(id+' .shadow_box_player').css('display', 'block');
			showBox(id, 2); 
		});
	}
	else if( type == 1 ) {
		lastShowBox = '';
		$j(id+' .shadow_box_player').css('display', 'none');
		$j(id).fadeOut(2000);
	}
	else if( lastShowBox == id ) {
		updateShowBox = setTimeout('showBox("' + id + '", 2)', 500);
	}
}
