
var nbimage= 30;
var width= 247;
var height= 146;
var url;
var alte;
function pubimg()
{
numimage= Math.round(Math.random()*(nbimage-1)+1);
if (numimage <= 10)
{
gotosite = "test.hmtl";
url = "/pubacceuil/hp.jpg";
alte = "ceci est un test";
}
if (numimage > 10 && numimage <= 20)
{
gotosite = "index.php?option=com_content&view=article&id=39&Itemid=52&lang=fr";
url = "/pubacceuil/hp2.jpg";
alte = "omnium";
}
if (numimage > 20)
{
gotosite = "test333";
url = "/pubacceuil/cloudhp.jpg";
alte = "test33";
}
if(gotosite != "")
	{
	document.write ('<A HREF="' + gotosite + '">');	
	}
document.write('<IMG SRC="' + url + '" ALT="' + alte + '" height=' + height + ' width="' + width + '" BORDER=0>')
if(gotosite != "")
	{
	document.write('</A>')
	}
}
function visibilite(thingId)
{
var targetElement;
targetElement = document.getElementById(thingId) ;
if (targetElement.style.display == "none")
{
targetElement.style.display = "" ;
}
}
function invisibilite(thingId)
{
var targetElement;
targetElement = document.getElementById(thingId) ;
if (targetElement.style.display == "")
{
targetElement.style.display = "none" ;
} 
}
