function avatar(id)
{
	now = new Date()
	y	= now.getYear()
	m	= "0"+now.getMonth();	m= m.substring(m.length-2,m.length)
	d	= "0"+now.getDay();		d= d.substring(d.length-2,d.length)
	h	= "0"+now.getHours();	h= h.substring(h.length-2,h.length)
	i	= "0"+now.getMinutes();	i= i.substring(i.length-2,i.length)
	s	= "0"+now.getSeconds();	s= s.substring(s.length-2,s.length)

	//now	= year+'/'+month+'/'+day+' '+h+':'+i+':'+s
	now	= y+m+d+h+i+s
        //var start = id.substring(0,1);
	//var end   = id.substring(id.length-1,id.length);
	var swfurl	= "http://img.avatar.livedoor.com/swf/"+id+".swf?"+now
	var codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

	var	plugins	= "http://www.macromedia.com/go/getflashplayer"
	var clsid	= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

	document.write("<OBJECT classid='"+clsid+"' codebase='" + codebase + "' WIDTH='135' HEIGHT='175' id='demo' ALIGN=''>")
	document.write("<PARAM NAME=movie VALUE='"+swfurl+"'>")
	document.write("<PARAM NAME=Menu value='FALSE'> <PARAM NAME=quality VALUE=low> <PARAM NAME=loop VALUE=true>")
	document.write("<PARAM NAME=bgcolor VALUE=#EFEBDE>")
	document.write("<EMBED src='"+swfurl+"' quality=low loop=true bgcolor=#EFEBDE WIDTH='135' HEIGHT='175' ")
	document.write("NAME='demo' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE=''></EMBED> </OBJECT>")
        document.write("<br /><a target='_blank' class='avatar_link' href='http://avatar.livedoor.com/?p=LDA_PROC_REPLY_PRESENT&send_to=" + id + "'>プレゼントを贈る</a>")
        document.write("<br /><a target='_blank' class='avatar_link' href='http://avatar.livedoor.com/'>livedoor アバター</a>")
}

