var arrTemp=self.location.href.split("?"); 
var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 
var NS = (navigator.appName=="Netscape")?true:false; 
function FitPic() { 
iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
iHeight = (NS)?window.innerHeight:document.body.clientHeight; 
iWidth = document.images[4].width - iWidth; 
iHeight = document.images[4].height - iHeight; 
window.resizeBy(iWidth+35, iHeight+70); 
self.focus(); 
};

function removeelements(){
//store all elements with id=remove to "remove_el"
var remove_el=document.all.remove
//if there is only one element with id=remove
if (remove_el!=''&&remove_el.length==null)
remove_el.style.display='none'
else{
//for each element with id=remove
for (i=0;i<remove_el.length;i++)
remove_el[i].style.display='none'
}
}
function revertback(){
setTimeout("window.location.reload()",50)
}
window.onbeforeprint=removeelements
window.onafterprint=revertback

function test()
{
document.write("<a href=javascript:window.close()><img src='",picUrl,"' alt=Fermer /></a>");
}