
	var windowEasyClosed = false;
	var eiW = 0;
	var eiH = 0;
	var ewW = eiW + 3;
	var ewH = eiH + 3;
	var eHref = '';
	var eSrc = '';
	var eAlt = '';
	var ewTime = null;
	var ewCookie = 'ffff';

	function init( peiW, peiH, peHref, peSrc, peAlt ){		
		 eiW = peiW;
		 eiH = peiH;
		 ewW = eiW + 3;
		 ewH = eiH + 15;
		 eHref = peHref;
		 eSrc = peSrc;
		 eAlt = peAlt;

	};
	
	function loadEasyWindow()
	{
		var windowEasy = document.getElementById( 'windowEasyAlert' );
		var pos = parseInt( windowEasy.style.top );
		if( pos > 0 )
		{
			windowEasy.style.top = ( pos - 5 ) + 'px';
			setTimeout( 'loadEasyWindow()', 30 );
		}
	}
	
	function closeEasyWindow( test )
	{		
		document.getElementById( 'windowEasyAlertBackground' ).style.display = 'none';
		windowEasyClosed = true;
		clearTimeout( ewTime );
	}
	
	function positionEasyWindow()
	{
		divBG = document.getElementById( 'windowEasyAlertBackground' );
		divBG.style.top = ( getScrollTop() + getWindowHeight() - ewH ) + 'px';
		divBG.style.left = ( getScrollLeft() + getWindowWidth() - ewW - 10 ) + 'px';
		
		ewTime = setTimeout( "positionEasyWindow()", 100 );	
	}
	
	// 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;
	}
	
	// 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;
	}	
	document.cookie = ewCookie + '=' + ( parseInt( getCookie( ewCookie ) ) + 1 );
	
	function loadEasyWindowNow()
	{			
		positionEasyWindow();
		loadEasyWindow();
	}
		
		
	function addOnLoadEvent( func )
	{
		if( typeof window.onload != 'function' )
		{
			window.onload = func;
		}
		else
		{
			var oldOnload = window.onload;
			window.onload = function()
			{
				oldOnload();
				func();
			}
		}
	}
	

		
	function runCode(){
		/*
		strWrite = '<style type="text/css">#windowEasyAlertBackground, #windowEasyAlert, #windowEasyTitle, #windowEasyGreenButton, #windowEasyClose, #windowEasyImg, #windowEasyDesc{margin:0px;padding:0px;font:normal 12px Arial;color:#000000;}#windowEasyAlertBackground, #windowEasyAlert{width:' + ewW + 'px;height:' + ewH + 'px;}#windowEasyAlertBackground{position:absolute;right:10px;bottom:0px;overflow:hidden;z-index:5;}#windowEasyAlert{cursor:pointer;position:relative;}#windowEasyTitle{font-weight:bold;color:#FFFFFF;padding-left:23px;line-height:21px;height:21px;text-align:left;}#windowEasyImg{float:left;width:55px;height:55px;margin-right:3px;border:1px solid black;}#windowEasyGreenButton{text-align:center;margin-top:10px;line-height:19px;clear:both;color:#FFFFFF;font-weight:bold;}#windowEasyClose{float:right;}#windowEasyDesc{padding:5px;text-align:left;}</style>';
		strWrite = strWrite + '<div id="windowEasyAlertBackground" onselectstart="return false;">';
		strWrite = strWrite + '  <div id="windowEasyAlert" onClick="closeEasyWindow( false )" style="top:' + ewH + 'px">';
		strWrite = strWrite + '    <table cellpadding="0" cellspacing="0" border="0"><tr><td><a target="_blank" href="' + eHref +'" ><img src="' + eSrc + '" border="0" width="'+ eiW +'" height="' + eiH + '" alt="' + eAlt + '" title="' + eAlt + '"></a></td></tr></table>';
		strWrite = strWrite + '  </div>';
		strWrite = strWrite + '</div>';
		*/
		
		
		
		strWrite = '<style type="text/css">#windowEasyAlertBackground, #windowEasyAlert, #windowEasyTitle, #windowEasyGreenButton, #windowEasyClose, #windowEasyImg, #windowEasyDesc{margin:0px;padding:0px;font:normal 12px Arial;color:#000000;}#windowEasyAlertBackground, #windowEasyAlert{width:' + ewW + 'px;height:' + ewH + 'px;}#windowEasyAlertBackground{position:absolute;right:10px;bottom:0px;overflow:hidden;z-index:5;}#windowEasyAlert{cursor:pointer;position:relative;}#windowEasyTitle{font-weight:bold;color:#FFFFFF;padding-left:23px;line-height:21px;height:21px;text-align:left;}#windowEasyImg{float:left;width:55px;height:55px;margin-right:3px;border:1px solid black;}#windowEasyGreenButton{text-align:center;margin-top:10px;line-height:19px;clear:both;color:#FFFFFF;font-weight:bold;}#windowEasyClose{float:right;}#windowEasyDesc{padding:5px;text-align:left;}</style>';
		strWrite = strWrite + '<div id="windowEasyAlertBackground" onselectstart="return false;">';
		strWrite = strWrite + '  <div id="windowEasyAlert"  style="top:' + ewH  + 'px">';
		strWrite = strWrite + strHtml;
		strWrite = strWrite + '  </div>';
		strWrite = strWrite + '</div>';
		
		//alert   (strWrite) ;
		document.write( strWrite );

		addOnLoadEvent(
			function()
			{
				setTimeout( 'loadEasyWindowNow()', 0 * 1000 );
			}
		);
	}	
	

		

