// 投稿者名別アイコン表示
function getCommentNameImageTag(userName) {
// 投稿者名ごとの画像のURL定義
// ['(投稿者名)', '(画像のURL)']
var userImages = [
['Free', 'http://www.fureai-kajuen.com/ringo/template/free.gif'], 
['sb', 'http://www.fureai-kajuen.com/ringo/template/sb.gif'], 
['moblog', 'http://www.fureai-kajuen.com/ringo/template/moblog.gif'],
['果樹園', 'http://www.fureai-kajuen.com/ringo/template/mark.gif'],
['PC', 'http://www.fureai-kajuen.com/sb2/template/pc.gif'],
['Blog', 'http://www.fureai-kajuen.com/ringo/template/pc_04.gif']
];

// 上記投稿者名以外に表示する画像のURL
var otherImage = 'http://www.fureai-kajuen.com/ringo/template/apple_s.gif';

// imgタグに指定する属性
// 例）var addAttribute = 'class="pict" alt="icon"';
var addAttribute = 'class="pict" alt="icon"';

if ('' == userName) {
if ('' != otherImage) document.write('<img src="'+ otherImage +'" ' + addAttribute + ' />');
return;
}
if (userName.indexOf('</a>') > -1) {
var m = userName.match(/>.+<\/a>/);
if (null != m) userName = m[0].substr(1, m[0].length - 5);
}
for (var i = 0; i < userImages.length; i++) {
if (userImages[i][0] == userName) {
window.document.write('<img src="' + userImages[i][1] + '" ' + addAttribute + ' />');
return;
}
}
if ('' != otherImage) window.document.write('<img src="'+ otherImage +'" ' + addAttribute + ' />');
return;
}
