// objekte
document.write("<div id='smoother_area' style='visibility: hidden;'><iframe allowtransparency='yes' frameborder='0' style='background-image: url(smoother/pix/background_black_10.png); position: absolute; top: 0px; left: 0px; height: 2000px; width: 100%;' name='smoother_show' id='smoother_show'></iframe></div>");

// initialisieren - bildpreload
smootherFadeTime		=	30;
smootherDeckkraft		=	95;
smootherZaehler			=	5;
smootherInterval		=	0;

for (i=10; i < 100; (i=i+5))
{
	document.write("<img src='smoother/pix/background_black_" + i + ".png' style='position: absolute; top: -100px; left: -100px;'>");
}

// functionen
function smoother( _typ, _id)
{
	if	(smootherInterval)
	{
		            	window.clearInterval(smootherInterval);
	}
	switch	(_typ)
	{
		case 1:
			smootherZaehler															=	10;
            parent.smoother_show.location.href                                      =   _id;
            document.getElementById('smoother_area').style.visibility               =   'visible';
            smootherInterval														=	window.setInterval("smootherFadeIn()", smootherFadeTime);
		break;
		case 2:
			smootherZaehler															=	10;
            parent.smoother_show.location.href                                      =   "smoother/scripts/smoother.php?id=" + _id;
            document.getElementById('smoother_area').style.visibility               =   'visible';
            smootherInterval														=	window.setInterval("smootherFadeIn()", smootherFadeTime);
		break;
	}
}

function smootherFadeIn()
{
            document.getElementById("smoother_show").style.backgroundImage 			=	"url('smoother/pix/background_black_" + smootherZaehler + ".png')";
			smootherZaehler+=5;
            if	(smootherZaehler == smootherDeckkraft)
            {
            	window.clearInterval(smootherInterval);
            	smootherZaehler = 10;
            }
}

function smootherFadeOut()
{
            document.getElementById("smoother_show").style.backgroundImage 			=	"url('smoother/pix/background_black_" + ((smootherDeckkraft + 5) - smootherZaehler) + ".png')";
            if	(smootherZaehler == smootherDeckkraft)
            {
            	window.clearInterval(smootherInterval);
            	smootherZaehler = 10;
            	document.getElementById('smoother_area').style.visibility			=	'hidden';
	            document.getElementById("smoother_show").style.backgroundImage 		=	"url('smoother/pix/background_black_" + (10) + ".png')";
			}
			smootherZaehler+=5;
}

function smootherAusblender()
{
	smootherZaehler 																=	10;
    smootherInterval																=	window.setInterval("smootherFadeOut()", smootherFadeTime);
}