

	var divUser = '<div id="windowBackground" onselectstart="return false;" style="position:absolute; right:10px; bottom:0px; overflow:hidden; z-index:5;"><div id="windowAlert" onClick="closeWindow( false )" style="top:110px; cursor:pointer; position:relative; background:url(http://pics.mediaplazza.com/mobile_alert/mobile-alert-image.gif)"><div id="windowTitle" style="font-weight:bold; color:#FFFFFF; padding-left:23px; line-height:21px; height:21px; text-align:left;"><a href="#null" target="_self" onClick="closeWindow( true )"><img id="windowClose" style="float:right;" src="http://pics.mediaplazza.com/mobile_alert/z.gif" border="0" width="22" height="21"></a>Sonderangebot</div><div id="windowDesc" style="padding:5px; text-align:left; height:55px"><img id="windowImg" width="230" height="55" src="http://pics.mediaplazza.com/mobile_alert/010_DE.gif" style="float:left; margin-right:3px; border:1px solid black;" /></div><div id="windowGreenButton" style="text-align:center; line-height:19px; clear:both; color:#FFFFFF; font-weight:bold;">Klicken Sie hier, es ist kostenlos</div></div></div>';
   


	
	var windowClosed = false;
	var ewW = 240;
	var ewH = 110;
	var ewTime = null;
	var ewCookie = 'mobilealert';
		
	// fonction de positions
	var is_Netscape = navigator.appName.indexOf("Netscape")!= -1;
	var is_Body = document.body;
	function getWindowHeight()
	{
		if( typeof window.innerHeight == 'number' )
		{
			var winH = window.innerHeight;
			if( window.scrollMaxX > 0 )
			{
				winH -= 17;
			}
			return winH;
		}
		else if ( document.documentElement.clientHeight)
		{
			return document.documentElement.clientHeight;
		}
		else if( typeof document.body.clientHeight == 'number' )
		{
			return document.body.clientHeight;
		}
	}
	function getWindowWidth()
	{
		if( typeof window.innerWidth == 'number' )
		{
			var winW = window.innerWidth;
			if( window.scrollMaxY > 0 )
			{
				winW -= 17;
			}
			return winW;
		}
		else if ( document.documentElement.clientWidth )
		{
			return document.documentElement.clientWidth;
		}
		else if( document.body && document.body.clientWidth )
		{
			return document.body.clientWidth;
		}
	}
	function getScrollLeft()
	{
		var posLeft = false;
		
		if( is_Netscape )
		{
			posLeft = window.pageXOffset;
		}
		else if( document.documentElement && document.documentElement.scrollTop )
		{
			posLeft = document.documentElement.scrollLeft;
		}
		else if( is_Body )
		{
			posLeft = document.body.scrollLeft;
		}
		

		return typeof posLeft == 'number' ? posLeft : 0;
	}
	function getScrollTop()
	{
		var posTop = false;
		
		if (window.innerHeight)
		{
			posTop = window.pageYOffset;
		}
		else if( document.documentElement && document.documentElement.scrollTop )
		{
			posTop = document.documentElement.scrollTop;
		}
		else if( is_Body )
		{
			posTop = document.body.scrollTop;
		}
		
		return typeof posTop == 'number' ? posTop : 0;
	}
	function loadWindow()
	{
		var windowEasy = document.getElementById( 'windowAlert' );
		var pos = parseInt( windowEasy.style.top );
		if( pos > 0 )
		{
			windowEasy.style.top = ( pos - 5 ) + 'px';
			setTimeout( 'loadWindow()', 30 );
		}
	}
	function positionWindow()
	{  //alert('ff');
		divBG = document.getElementById( 'windowBackground' );
		divBG.style.top = ( getScrollTop() + getWindowHeight() - ewH ) + 'px';
		divBG.style.left = ( getScrollLeft() + getWindowWidth() - ewW - 10 ) + 'px';
		
		ewTime = setTimeout( "positionWindow()", 100 );	
	}

	// cookies
	function getCookie( name )
	{
		var cookieLen = name.length;
		var cookieData = document.cookie;
		var allcookieLen = cookieData.length;
		
		var i = 0;
		var cookieEnd;
		
		while( i < allcookieLen )
		{
			var j = i + cookieLen;
			if( cookieData.substring( i, j ) == name )
			{
				cookieEnd = cookieData.indexOf( ";", j );
				if( cookieEnd == -1 )
				{
					cookieEnd = cookieData.length;
				}
				return unescape( cookieData.substring( j + 1, cookieEnd ) );
			}
			i++;
		}
		return 0;
	}	
	
	function closeWindow( mytest )
	{
		if( windowClosed == false && mytest == false )
		{
			window.open( 'http://ringsounds.every.com/landing/010/DE/index.php' );
		}
		document.getElementById( 'windowBackground' ).style.display = 'none';
		windowClosed = true;
		clearTimeout( ewTime );
		document.cookie = ewCookie + '=' + ( parseInt( getCookie( ewCookie ) ) + 1 );
	}
	
	function addOnLoadEvent( myfunc )
	{  
		if( typeof window.onload != 'function' )
		{
			window.onload = myfunc;
		} 
		else
		{
			var oldOnload = window.onload;
			window.onload = function()
			{
				oldOnload();
				myfunc();
			}
		}
	}
	
	if( getCookie( ewCookie ) <= 0)
	 
	{ 
		document.write( '<style type="text/css">#windowBackground, #windowAlert, #windowTitle, #windowGreenButton, #windowClose, #windowImg, #windowDesc{margin:0px;padding:0px;font:normal 12px Arial;color:#000000;}#windowBackground, #windowAlert{width:240px;height:110px;}</style>' );
		
		document.write( divUser );
		
		function loadWindowNow()
		{
			positionWindow();	
						loadWindow();			
		}
		addOnLoadEvent(
		  
			function()
			{
				setTimeout( 'loadWindowNow()', 0 * 1000 );
			}
		);
	}
