document.observe("dom:loaded" , function() {
	resizepage();
});
function resizepage() {
	/* we get the img size */
	var dims = $('laphoto').getDimensions();
	var height = dims.height;
	var width  = dims.width;
	/* We resize the page */
	if ( width < 778 )
		width = 778;

	self.focus();
	window.resizeTo(width,height+220)
}
/*
if(typeof window.location.search!='undefined')
	var _us=window.location.search.split('&')
function resizepage()
{
	if(typeof window.resizeTo!='undefined')
	{
		var x=790
			var y=200
			if(typeof document.images['laphoto']!='undefined')
			{
				x=document.images['laphoto'].width
					y=document.images['laphoto'].height
			}
		var fx=x+90

			var fy=y+150+70
			if(fx<790)fx=790
				if(fy<200)fy=200

					if(typeof screen.availWidth!='undefined')
					{
						if(fx>screen.availWidth)fx=screen.availWidth
							if(fy>screen.availHeight)fy=screen.availHeight
					}
		window.resizeTo(fx,fy)
			if(typeof self.focus!='undefined')self.focus();
	}
}

function WGoodPic()
{
	if(typeof _us[0]!='undefined')
		document.images['laphoto'].src=unescape(_us[0].substring(1,_us[0].length))
}
function phtmlschar(ch) 
{
	ch=ch.replace(/&/g,"&amp;")
		ch=ch.replace(/\"/g,"&quot;")
		ch=ch.replace(/\'/g,"&#039;")
		ch=ch.replace(/</g,"&lt;")
		return ch.replace(/>/g,"&gt;")
}

function right(e) 
{
	var msg="Le clic droit sur les images est désactivé.";
	if((navigator.appName=='Microsoft Internet Explorer'&&event.button==2)){
		alert(msg);
		return false;
	}
	return true;
}

function trap()
{
	if(document.images){
		for(i=0;i<document.images.length;i++){
			document.images[i].onmousedown=right;
		}
	}
}
*/

