var num = Math.floor( Math.random() * 1000 );/* 0-999 */
if		(( num >= 0  ) && ( num < 10 )){ num = "00" + num; }
else if	(( num >= 10 ) && ( num < 100)){ num = "0" + num; }
document.write('<img src=\"http://res.nimg.jp/img/base/head/icon/nico/'+num+'.gif\" alt=\"'+num+'\">');
