//	Création du Div
var objBody = document.getElementsByTagName("body").item(0);
var objOverlay = document.createElement("div");
	objOverlay.setAttribute('id','pub');
	objOverlay.style.position = 'absolute';
	objOverlay.style.index= '10';
	objBody.appendChild(objOverlay);

var div1 = document.getElementById("pub").style;
var objet;
		
	function placeObj(px,py) 
		{
	  	div1.left=px;
	  	div1.top=py;
	 	}
	function Scroll() 
		{
	  	var posy;
	  	if (self.pageYOffset) {
			offsety = self.pageYOffset;
			offsetx = self.pageXOffset;
		} else if (document.documentElement && document.documentElement.scrollTop){
			offsety = document.documentElement.scrollTop;
			offsetx = document.documentElement.scrollLeft;
		} else if (document.body) {
			offsety = document.body.scrollTop;
			offsetx = document.body.scrollLeft;	
		}
	  	placeObj(0,offsety);
		tempo = setTimeout("Scroll()",50);
		}
		if(document.getElementById)
		Scroll();

//	Ouverture de l'image
function showsup(chemin)
	{
		document.getElementById("pub").style.width = larg;
		document.getElementById("pub").style.height = haut;
		document.getElementById("pub").innerHTML = html_haut+html_mil+chemin+html_fin+html_bas;
	}

function closeSup()
	{
	if(document.getElementById)
		{
		document.getElementById("pub").style.width = 1;
		document.getElementById("pub").style.height = 1;
		document.getElementById("pub").innerHTML = '';
		}
	}

if (self.innerHeight) {
	if(document.documentElement.clientWidth){
	larg = document.documentElement.clientWidth; 
	} else {
			larg = self.innerWidth;
		}
		haut = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		larg = document.documentElement.clientWidth;
		haut = document.documentElement.clientHeight;
	} else if (document.body) {
		larg = document.body.clientWidth;
		haut = document.body.clientHeight;
	}
	
html_haut = "<TABLE WIDTH="+larg+" HEIGHT="+haut+" CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD VALIGN=middle ALIGN=center BACKGROUND=skins/img/grille.gif>";
html_bas = "</TD></TR></TABLE>";

html_mil = "<TABLE CELLPADDING=0 CELLSPACING=6 BORDER=0 bgcolor=#000000>";
html_mil += "<TR>";
html_mil += "<TD align=right><A HREF=# onClick=\"closeSup();return(false)\"><IMG SRC='skins/img/close.gif' BORDER=0 WIDTH=57 HEIGHT=18><br><IMG SRC='occasions_img/";
html_fin =" ' BORDER=0 alt='Cliquez pour fermer la fenêtre' >";
html_fin  += "</A></TD>";
html_fin  += "</TR>";
html_fin  += "</TABLE>";
