image_small = new Array();
image_big = new Array();
GoTo = new Array();
image_small[0]= 'ensamini.jpg';         
image_big[0]= 'ensagrand.jpg';        
GoTo[0]= '../galeriephotos/#album=11&photo=207';

var anzahl = 1;   //Ici le nombre de pub

var nr = Math.round((anzahl -1) * Math.random());

var Link = GoTo[nr];
var Image1 = image_small[nr];
var Image2 = image_big[nr];

var tournepage = new Object();

tournepage.ad_url = escape(Link);

tournepage.small_path = 'small.swf'; 
tournepage.small_image = escape(Image1);
tournepage.small_width = '100';
tournepage.small_height = '100';
tournepage.small_params = 'ico=' + tournepage.small_image;

tournepage.big_path = 'big.swf'; 
tournepage.big_image = escape(Image2);
tournepage.big_width = '650';
tournepage.big_height = '650';
tournepage.big_params = 'big=' + tournepage.big_image + '&ad_url=' + tournepage.ad_url;

function showSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "visible";
	}
}

function hideSelectBoxes(){
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "hidden";
	}
}

function sizeup987(){
	document.getElementById('tpageBig').style.top = '0px';
	document.getElementById('tpageSmall').style.top = '-1000px';
	hideSelectBoxes();
}

function sizedown987(){
	document.getElementById("tpageSmall").style.top = '0px';
	document.getElementById("tpageBig").style.top = '-1000px';
	showSelectBoxes();
}

tournepage.putObjects = function () {
// <Small>
document.write('<div id="tpageSmall" style="position:absolute;width:'+ tournepage.small_width +'px;height:'+ tournepage.small_height +'px;z-index:9999;right:0px;top:0px;">');
// object
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"');
document.write(' id="tpageSmallObject" width="'+tournepage.small_width+'" height="'+tournepage.small_height+'">');
// object params
document.write(' <param name="allowScriptAccess" value="always"/> ');
document.write(' <param name="movie" value="'+ tournepage.small_path +'?'+ tournepage.small_params +'"/>');
document.write(' <param name="wmode" value="transparent" />');
document.write(' <param name="quality" value="high" /> ');
document.write(' <param name="FlashVars" value="'+tournepage.small_params+'"/>');
// embed
document.write('<embed src="'+ tournepage.small_path + '?' + tournepage.small_params +'" name="tpageSmallObject" wmode="transparent" quality="high" width="'+ tournepage.small_width +'" height="'+ tournepage.small_height +'" flashvars="'+ tournepage.small_params +'" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
document.write('</object></div>');
document.write('</script>');
// </Small>
// <Big>
document.write('<div id="tpageBig" style="position:absolute;width:'+ tournepage.big_width +'px;height:'+ tournepage.big_height +'px;z-index:9999;right:0px;top:0px;">');
// object
document.write('<a href="' + Link + '"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"');
document.write(' id="tpageBigObject" width="'+ tournepage.big_width +'" height="'+ tournepage.big_height +'">');
// object params
document.write(' <param name="allowScriptAccess" value="always"/> ');
document.write(' <param name="movie" value="'+ tournepage.big_path +'?'+ tournepage.big_params +'"/>');
document.write(' <param name="wmode" value="transparent"/>');
document.write(' <param name="quality" value="high" /> ');
document.write(' <param name="FlashVars" value="'+ tournepage.big_params +'"/>');
// embed
document.write('<embed src="'+ tournepage.big_path + '?' + tournepage.big_params +'" id="tpageBigEmbed" name="tpageBigObject" wmode="transparent" quality="high" width="'+ tournepage.big_width +'" height="'+ tournepage.big_height +'" flashvars="'+ tournepage.big_params +'" swliveconnect="true" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
document.write('</object></a></div>');
// </Big>
setTimeout('document.getElementById("tpageBig").style.top = "-1000px";',1000);
}
tournepage.putObjects();