function foo(elm,size) {
	if (elm.clientHeight >= size) {
		return size +"px";
	} else {
		return "default";
	}
}
if(window.autoresize == window.autoresized) autosize=1; else 
	{
	autosize=0;
	document.write('<style>.message_zone_message img{ max-width:100000px;}.message_auteur_signature img{ max-width:100000px;}</style>');
	}

function foo2(elm,size) {
	if(autosize==1){
	if (elm.clientWidth >= size) {
		return size +"px";
	} else return "";	
	} else return "";
}
trues=0;
function truesize(obj) {
	if(autosize){
	if(obj.width>400)
			{
			url=obj.src;
			document.getElementById('linebase').innerHTML+="<div id='truesize"+trues+"' style=\"position:absolute; left:50px; top:"+y+"px;\" onClick=\"hidetrues("+trues+")\"><img src='"+url+"'></div>";				
		
			if(trues>0)
				{
				tru=trues-1;
				eval("document.getElementById('truesize"+tru+"').style.visibility='hidden'");
				eval("document.getElementById('truesize"+tru+"').innerHTML=''");							
				}
			trues=trues+1;
			}
	}
}
function hidetrues(tru)
	{
	eval("document.getElementById('truesize"+tru+"').style.visibility='hidden'");
	eval("document.getElementById('truesize"+tru+"').innerHTML=''");
	}
function position(e) {
			y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
			y=y-30;
			}
function format_date(format,time)
	{
	var temps = new Date();
	t=temps.getTime();
	temps.setTime(t+(time*1000));
	var Y = temps.getFullYear();
	var y2 = temps.getYear();
	var m = temps.getMonth() + 1;
	if(m<10) m="0"+m;
	var d = temps.getDate();
	if(d<10) d="0"+d;
	var H = temps.getHours();
	if(H<10) H="0"+H;
	var i = temps.getMinutes();
	if(i<10) i="0"+i;
	var s = temps.getSeconds();
	if(s<10) s="0"+s;	
	format=format.replace('i',i);
	format=format.replace('m',m);
	format=format.replace('H',H);
	format=format.replace('s',s);
	format=format.replace('d',d);
	format=format.replace('y',y2);
	format=format.replace('Y',Y);
	return format;
	}
	
/*
function format_date(format,time)
	{
	var temps = new Date();
	dif1=Math.round(temps.getTime()/300000)*300;
	dif2=Math.round(<?=time()?>/300)*300;			
	temps.setTime((time+dif1-dif2)*1000);
	var Y = temps.getFullYear();
	var y2 = temps.getYear();
	var m = temps.getMonth() + 1;
	if(m<10) m="0"+m;
	var d = temps.getDate();
	if(d<10) d="0"+d;
	var H = temps.getHours();
	if(H<10) H="0"+H;
	var i = temps.getMinutes();
	if(i<10) i="0"+i;
	var s = temps.getSeconds();
	if(s<10) s="0"+s;	
	format=format.replace('i',i);
	format=format.replace('m',m);
	format=format.replace('H',H);
	format=format.replace('s',s);
	format=format.replace('d',d);
	format=format.replace('y',y2);
	format=format.replace('Y',Y);
	document.write(format);
	}
if(document.cookie.indexOf('time=')==-1) 
	{
	g = new Date;
	m=g.getMonth()+1;
	document.cookie='time='+g.getFullYear()+"/"+m+"/"+g.getDate()+"/"+g.getHours()+"/"+g.getMinutes();
	document.cookie='truetime=<?=date('Y/m/d/H/i')?>';
	}
*/
document.onmousemove=position
y=0;